Table of Contents

Class GameWindowRenderer

Namespace
Stride.Games
Assembly
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
Inheritance
GameWindowRenderer
Implements
Inherited Members
Extension Methods

Constructors

GameWindowRenderer(IServiceRegistry, GameContext)

Initializes a new instance of the GameWindowRenderer class.

public GameWindowRenderer(IServiceRegistry registry, GameContext gameContext)

Parameters

registry IServiceRegistry

The registry.

gameContext GameContext

The window context.

Properties

GameContext

Gets the underlying native window.

public GameContext GameContext { get; }

Property Value

GameContext

The underlying native window.

PreferredBackBufferFormat

Gets or sets the preferred back buffer format.

public PixelFormat PreferredBackBufferFormat { get; set; }

Property Value

PixelFormat

The preferred back buffer format.

PreferredBackBufferHeight

Gets or sets the height of the preferred back buffer.

public int PreferredBackBufferHeight { get; set; }

Property Value

int

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

int

The width of the preferred back buffer.

PreferredDepthStencilFormat

Gets or sets the preferred depth stencil format.

public PixelFormat PreferredDepthStencilFormat { get; set; }

Property Value

PixelFormat

The preferred depth stencil format.

Presenter

Gets or sets the presenter.

public GraphicsPresenter Presenter { get; protected set; }

Property Value

GraphicsPresenter

The presenter.

Window

Gets the window.

public GameWindow Window { get; }

Property Value

GameWindow

The window.

Methods

BeginDraw()

Starts the drawing of a frame. This method is followed by calls to Draw and EndDraw.

public override bool BeginDraw()

Returns

bool

true if Draw should occur, false otherwise

CreateOrUpdatePresenter()

protected virtual void CreateOrUpdatePresenter()

Destroy()

Disposes of object resources.

protected override void Destroy()

EndDraw()

Ends the drawing of a frame. This method is preceeded by calls to Draw and BeginDraw.

public override void EndDraw()

Initialize()

This method is called when the component is added to the game.

public override void Initialize()

Remarks

This method can be used for tasks like querying for services the component needs and setting up non-graphics resources.