GraphicsPresenter Class
Namespace: Stride.GraphicsAssembly: Stride.Graphics.dll
This class is a frontend to
public abstract class GraphicsPresenter : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Remarks
In order to create a new GraphicsPresenter, a GraphicsDevice should have been initialized first.
Name | Description | |
---|---|---|
Constructors | ||
GraphicsPresenter(GraphicsDevice, PresentationParameters) | Initializes a new instance of the GraphicsPresenter class. |
|
Properties | ||
BackBuffer | Gets the default back buffer for this presenter. |
|
DepthStencilBuffer | Gets the default depth stencil buffer for this presenter. |
|
Description | Gets the description of this presenter. |
|
GraphicsDevice | Gets the graphics device. |
|
IsFullScreen | Gets or sets fullscreen mode for this presenter. |
|
NativePresenter | Gets the underlying native presenter (can be a SharpDX.DXGI.SwapChain or SharpDX.DXGI.SwapChain1 or null, depending on the platform). |
|
PresentInterval | Gets or sets the PresentInterval. Default is to wait for one vertical blanking. |
|
Methods | ||
BeginDraw(CommandList) | ||
CreateDepthStencilBuffer() | Creates the depth stencil buffer. |
|
Destroy() | ||
EndDraw(CommandList, Boolean) | ||
OnDestroyed() | Called when [destroyed]. |
|
OnRecreated() | Called when [recreated]. |
|
Present() | Presents the Backbuffer to the screen. |
|
ProcessPresentationParameters() | ||
ReleaseCurrentDepthStencilBuffer() | ||
Resize(Int32, Int32, PixelFormat) | Resizes the current presenter, by resizing the back buffer and the depth stencil buffer. |
|
ResizeBackBuffer(Int32, Int32, PixelFormat) | ||
ResizeDepthStencilBuffer(Int32, Int32, PixelFormat) |
Constructors
GraphicsPresenter(GraphicsDevice, PresentationParameters)
Initializes a new instance of the GraphicsPresenter class.
protected GraphicsPresenter(GraphicsDevice device, PresentationParameters presentationParameters)
Parameters
Type | Name | Description |
---|---|---|
GraphicsDevice | device | The device. |
PresentationParameters | presentationParameters |
Properties
BackBuffer
Gets the default back buffer for this presenter.
public abstract Texture BackBuffer { get; }
Property Value
Type | Description |
---|---|
Texture |
DepthStencilBuffer
Gets the default depth stencil buffer for this presenter.
public Texture DepthStencilBuffer { get; protected set; }
Property Value
Type | Description |
---|---|
Texture |
Description
Gets the description of this presenter.
public PresentationParameters Description { get; }
Property Value
Type | Description |
---|---|
PresentationParameters |
GraphicsDevice
Gets the graphics device.
public GraphicsDevice GraphicsDevice { get; }
Property Value
Type | Description |
---|---|
GraphicsDevice | The graphics device. |
IsFullScreen
Gets or sets fullscreen mode for this presenter.
public abstract bool IsFullScreen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
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
Type | Description |
---|---|
System.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
Type | Description |
---|---|
PresentInterval | The present interval. |
Methods
BeginDraw(CommandList)
public virtual void BeginDraw(CommandList commandList)
Parameters
Type | Name | Description |
---|---|---|
CommandList | commandList |
CreateDepthStencilBuffer()
Creates the depth stencil buffer.
protected virtual void CreateDepthStencilBuffer()
Destroy()
protected override void Destroy()
Overrides
EndDraw(CommandList, Boolean)
public virtual void EndDraw(CommandList commandList, bool present)
Parameters
Type | Name | Description |
---|---|---|
CommandList | commandList | |
System.Boolean | present |
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(Int32, Int32, 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
Type | Name | Description |
---|---|---|
System.Int32 | width | |
System.Int32 | height | |
PixelFormat | format |
ResizeBackBuffer(Int32, Int32, PixelFormat)
protected abstract void ResizeBackBuffer(int width, int height, PixelFormat format)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | |
System.Int32 | height | |
PixelFormat | format |
ResizeDepthStencilBuffer(Int32, Int32, PixelFormat)
protected abstract void ResizeDepthStencilBuffer(int width, int height, PixelFormat format)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | |
System.Int32 | height | |
PixelFormat | format |