Click or drag to resize
DigitalRuneIUIRenderer Interface
Manages and renders the visual appearance of a UI.

Namespace: DigitalRune.Game.UI.Rendering
Assembly: DigitalRune.Game.UI (in DigitalRune.Game.UI.dll) Version: 1.8.0.0 (1.8.0.14553)
Syntax
public interface IUIRenderer

The IUIRenderer type exposes the following members.

Methods
Properties
  NameDescription
Public propertyGraphicsDevice
Gets the graphics device.
Public propertySpriteBatch
Gets the sprite batch that is used to draw all images for the UI controls.
Public propertyTemplates
Gets the UI control templates that define the game object properties for the different styles.
Top
Remarks

A renderer draws a control when the Render(UIControl, UIRenderContext) method is called. Controls are usually rendered by copying images from a texture atlas to the screen - but different renderers can use different methods. The renderer has a SpriteBatch that is used to render the images. BeginBatch can be called to start a batch with the default settings of the renderer. BeginBatch is normally automatically called when a UIScreen is rendered and the batch is finished with EndBatch when the whole screen was rendered. This way all controls are rendered as a single batch. If a control must be rendered with different render states or a different sprite batch, EndBatch must be called to flush the current batch.

See Also