Class GameWindowRenderer
A GameSystem that allows to draw to another window or control. Currently only valid on desktop with Windows.Forms.
public class GameWindowRenderer : GameSystemBase, IDisposable, ICollectorHolder, IGameSystemBase, IComponent, IReferencable, IUpdateable, IDrawable, IContentable
- Inheritance
-
Game
Window Renderer
- Implements
- Inherited Members
- Extension Methods
Constructors
GameWindowRenderer(IServiceRegistry, GameContext)
Initializes a new instance of the Game
Parameters
registry
IServiceRegistry The registry.
gameContext
GameContext The window context.
Properties
GameContext
Gets the underlying native window.
Property Value
- Game
Context The underlying native window.
PreferredBackBufferFormat
Gets or sets the preferred back buffer format.
Property Value
- Pixel
Format The preferred back buffer format.
PreferredBackBufferHeight
Gets or sets the height of the preferred back buffer.
Property Value
- int
The height of the preferred back buffer.
PreferredBackBufferWidth
Gets or sets the width of the preferred back buffer.
Property Value
- int
The width of the preferred back buffer.
PreferredDepthStencilFormat
Gets or sets the preferred depth stencil format.
Property Value
- Pixel
Format The preferred depth stencil format.
Presenter
Gets or sets the presenter.
Property Value
- Graphics
Presenter The presenter.
Window
Gets the window.
Property Value
- Game
Window The window.
Methods
BeginDraw()
Starts the drawing of a frame. This method is followed by calls to Draw and EndDraw.
Returns
- bool
true
if Draw should occur,false
otherwise
CreateOrUpdatePresenter()
Destroy()
Disposes of object resources.
EndDraw()
Ends the drawing of a frame. This method is preceeded by calls to Draw and BeginDraw.
Initialize()
This method is called when the component is added to the game.
Remarks
This method can be used for tasks like querying for services the component needs and setting up non-graphics resources.