Table of Contents

Class GraphicsPresenter

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

This class is a frontend to SharpDX.DXGI.SwapChain and SharpDX.DXGI.SwapChain1.

public abstract class GraphicsPresenter : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Inheritance
GraphicsPresenter
Implements
Derived
Inherited Members
Extension Methods

Remarks

In order to create a new GraphicsPresenter, a GraphicsDevice should have been initialized first.

Constructors

GraphicsPresenter(GraphicsDevice, PresentationParameters)

Initializes a new instance of the GraphicsPresenter class.

protected GraphicsPresenter(GraphicsDevice device, PresentationParameters presentationParameters)

Parameters

device GraphicsDevice

The device.

presentationParameters PresentationParameters

Properties

BackBuffer

Gets the default back buffer for this presenter.

public abstract Texture BackBuffer { get; }

Property Value

Texture

DepthStencilBuffer

Gets the default depth stencil buffer for this presenter.

public Texture DepthStencilBuffer { get; protected set; }

Property Value

Texture

Description

Gets the description of this presenter.

public PresentationParameters Description { get; }

Property Value

PresentationParameters

GraphicsDevice

Gets the graphics device.

public GraphicsDevice GraphicsDevice { get; }

Property Value

GraphicsDevice

The graphics device.

IsFullScreen

Gets or sets fullscreen mode for this presenter.

public abstract bool IsFullScreen { get; set; }

Property Value

bool

true if this instance is full screen; otherwise, false.

Remarks

This method is only valid on Windows Desktop and has no effect on Windows Metro.

NativePresenter

Gets the underlying native presenter (can be a SharpDX.DXGI.SwapChain or SharpDX.DXGI.SwapChain1 or null, depending on the platform).

public abstract object NativePresenter { get; }

Property Value

object

The native presenter.

PresentInterval

Gets or sets the PresentInterval. Default is to wait for one vertical blanking.

public PresentInterval PresentInterval { get; set; }

Property Value

PresentInterval

The present interval.

Methods

BeginDraw(CommandList)

public virtual void BeginDraw(CommandList commandList)

Parameters

commandList CommandList

CreateDepthStencilBuffer()

Creates the depth stencil buffer.

protected virtual void CreateDepthStencilBuffer()

Destroy()

Disposes of object resources.

protected override void Destroy()

EndDraw(CommandList, bool)

public virtual void EndDraw(CommandList commandList, bool present)

Parameters

commandList CommandList
present bool

OnDestroyed()

Called when [destroyed].

protected virtual void OnDestroyed()

OnRecreated()

Called when [recreated].

public virtual void OnRecreated()

Present()

Presents the Backbuffer to the screen.

public abstract void Present()

ProcessPresentationParameters()

protected virtual void ProcessPresentationParameters()

ReleaseCurrentDepthStencilBuffer()

protected void ReleaseCurrentDepthStencilBuffer()

Resize(int, int, PixelFormat)

Resizes the current presenter, by resizing the back buffer and the depth stencil buffer.

public void Resize(int width, int height, PixelFormat format)

Parameters

width int
height int
format PixelFormat

ResizeBackBuffer(int, int, PixelFormat)

protected abstract void ResizeBackBuffer(int width, int height, PixelFormat format)

Parameters

width int
height int
format PixelFormat

ResizeDepthStencilBuffer(int, int, PixelFormat)

protected abstract void ResizeDepthStencilBuffer(int width, int height, PixelFormat format)

Parameters

width int
height int
format PixelFormat