Table of Contents

Class ElementRenderer

Namespace
Stride.UI.Renderers
Assembly
Stride.UI.dll

Base class for UI element renderers

public class ElementRenderer : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Inheritance
ElementRenderer
Implements
Derived
Inherited Members
Extension Methods

Constructors

ElementRenderer(IServiceRegistry)

Create an instance of an UI element renderer.

public ElementRenderer(IServiceRegistry services)

Parameters

services IServiceRegistry

The list of registered services

Properties

Batch

Gets a reference to the UI image drawer.

public UIBatch Batch { get; }

Property Value

UIBatch

Content

A reference to the game asset manager.

public IContentManager Content { get; }

Property Value

IContentManager

DecreaseStencilValueState

A depth stencil state that decrease the stencil value if the stencil test passes.

public DepthStencilStateDescription DecreaseStencilValueState { get; }

Property Value

DepthStencilStateDescription

GraphicsDevice

A reference to the game graphic device.

public GraphicsDevice GraphicsDevice { get; }

Property Value

GraphicsDevice

IncreaseStencilValueState

A depth stencil state that increase the stencil value if the stencil test passes.

public DepthStencilStateDescription IncreaseStencilValueState { get; }

Property Value

DepthStencilStateDescription

KeepStencilValueState

A depth stencil state that keep the stencil value in any cases.

public DepthStencilStateDescription KeepStencilValueState { get; }

Property Value

DepthStencilStateDescription

Methods

RenderClipping(UIElement, UIRenderingContext)

Render the clipping region of the provided UIElement.

public virtual void RenderClipping(UIElement element, UIRenderingContext context)

Parameters

element UIElement

The element to render.

context UIRenderingContext

The rendering context containing information how to draw the element.

Remarks

The render target, the depth stencil buffer and the depth stencil state are already correctly set when entering this function. If the user wants to perform some intermediate rendering, it is his responsibility to bind them back correctly before the final rendering.

RenderColor(UIElement, UIRenderingContext)

Render the provided UIElement.

public virtual void RenderColor(UIElement element, UIRenderingContext context)

Parameters

element UIElement

The element to render.

context UIRenderingContext

The rendering context containing information how to draw the element.

Remarks

The render target, the depth stencil buffer and the depth stencil state are already correctly set when entering this function. If the user wants to perform some intermediate rendering, it is his responsibility to bind them back correctly before the final rendering.