GameWindowRenderer Class
Namespace: Stride.GamesAssembly: Stride.Games.dll
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
              | Name | Description | |
|---|---|---|
| Constructors | ||
| GameWindowRenderer(IServiceRegistry, GameContext) | Initializes a new instance of the GameWindowRenderer class.  | 
                          |
| Properties | ||
| GameContext | Gets the underlying native window.  | 
                          |
| PreferredBackBufferFormat | Gets or sets the preferred back buffer format.  | 
                          |
| PreferredBackBufferHeight | Gets or sets the height of the preferred back buffer.  | 
                          |
| PreferredBackBufferWidth | Gets or sets the width of the preferred back buffer.  | 
                          |
| PreferredDepthStencilFormat | Gets or sets the preferred depth stencil format.  | 
                          |
| Presenter | Gets or sets the presenter.  | 
                          |
| Window | Gets the window.  | 
                          |
| Methods | ||
| BeginDraw() | ||
| CreateOrUpdatePresenter() | ||
| Destroy() | ||
| EndDraw() | ||
| Initialize() | ||
Constructors
GameWindowRenderer(IServiceRegistry, GameContext)
Initializes a new instance of the GameWindowRenderer class.
public GameWindowRenderer(IServiceRegistry registry, GameContext gameContext)
              Parameters
| Type | Name | Description | 
|---|---|---|
| IServiceRegistry | registry | The registry.  | 
                  
| GameContext | gameContext | The window context.  | 
                  
Properties
GameContext
Gets the underlying native window.
public GameContext GameContext { get; }
              Property Value
| Type | Description | 
|---|---|
| GameContext | The underlying native window.  | 
                  
PreferredBackBufferFormat
Gets or sets the preferred back buffer format.
public PixelFormat PreferredBackBufferFormat { get; set; }
              Property Value
| Type | Description | 
|---|---|
| PixelFormat | The preferred back buffer format.  | 
                  
PreferredBackBufferHeight
Gets or sets the height of the preferred back buffer.
public int PreferredBackBufferHeight { get; set; }
              Property Value
| Type | Description | 
|---|---|
| System.Int32 | The height of the preferred back buffer.  | 
                  
PreferredBackBufferWidth
Gets or sets the width of the preferred back buffer.
public int PreferredBackBufferWidth { get; set; }
              Property Value
| Type | Description | 
|---|---|
| System.Int32 | The width of the preferred back buffer.  | 
                  
PreferredDepthStencilFormat
Gets or sets the preferred depth stencil format.
public PixelFormat PreferredDepthStencilFormat { get; set; }
              Property Value
| Type | Description | 
|---|---|
| PixelFormat | The preferred depth stencil format.  | 
                  
Presenter
Gets or sets the presenter.
public GraphicsPresenter Presenter { get; protected set; }
              Property Value
| Type | Description | 
|---|---|
| GraphicsPresenter | The presenter.  | 
                  
Window
Gets the window.
public GameWindow Window { get; }
              Property Value
| Type | Description | 
|---|---|
| GameWindow | The window.  | 
                  
Methods
BeginDraw()
public override bool BeginDraw()
              Returns
| Type | Description | 
|---|---|
| System.Boolean | 
Overrides
CreateOrUpdatePresenter()
protected virtual void CreateOrUpdatePresenter()
              Destroy()
protected override void Destroy()
              Overrides
EndDraw()
public override void EndDraw()
              Overrides
Initialize()
public override void Initialize()