IUIRenderer Interface |
Namespace: DigitalRune.Game.UI.Rendering
The IUIRenderer type exposes the following members.
Name | Description | |
---|---|---|
BeginBatch |
Calls the Begin method of the
SpriteBatch with default settings.
| |
EndBatch |
Calls End method of the
SpriteBatch to commit the current batch.
| |
GetAttributeT |
Gets a style-specific attribute value.
| |
GetCursor |
Gets a mouse cursor.
| |
GetFont |
Gets a sprite font.
| |
GetTexture |
Gets a texture.
| |
Render |
Renders the specified control.
|
Name | Description | |
---|---|---|
GraphicsDevice |
Gets the graphics device.
| |
SpriteBatch |
Gets the sprite batch that is used to draw all images for the UI controls.
| |
Templates |
Gets the UI control templates that define the game object properties for the different
styles.
|
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.