Class GPUSwapChain
GPU swap chain object that provides rendering to native window backbuffer.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Graphics/GPUSwapChain.h
Syntax
public class GPUSwapChain : public GPUResource
Constructors
GPUSwapChain()
Declaration
protected GPUSwapChain()
Fields
_downloadTask
_format
_height
Declaration
protected int32 _height = 0
Field Value
int32
|
_presentCount
Declaration
protected uint64 _presentCount = 0
Field Value
uint64
|
_width
Declaration
protected int32 _width = 0
Field Value
int32
|
_window
Declaration
protected Window* _window = nullptr
Field Value
Window
|
Methods
Begin(RenderTask* task)
Begin task rendering.
Declaration
public virtual void Begin(RenderTask* task)
Parameters
RenderTask
task
Active task |
CopyBackbuffer(GPUContext* context, GPUTexture* dst)
Copies the backbuffer contents to the destination texture.
Declaration
public virtual void CopyBackbuffer(GPUContext* context, GPUTexture* dst) = 0
Parameters
GPUContext
context
The GPU commands context. |
GPUTexture
dst
The destination texture. It must match the output dimensions and format. No staging texture support. |
DownloadDataAsync(TextureData& result)
Creates GPU async task that will gather render target data from the GPU.
Declaration
public virtual Task* DownloadDataAsync(TextureData& result)
Parameters
TextureData
result
Result data |
Returns
Task
Download data task (not started yet) |
End(RenderTask* task)
End task rendering.
Declaration
public virtual void End(RenderTask* task)
Parameters
RenderTask
task
Active task |
GetAspectRatio()
The output backbuffer aspect ratio.
Declaration
public float GetAspectRatio() const
Returns
float
|
GetBackBufferView()
Gets the view for the output back buffer texture (for the current frame rendering).
Declaration
public virtual GPUTextureView* GetBackBufferView() = 0
Returns
GPUTextureView
The output texture view to use. |
GetFormat()
The output backbuffer surface format.
Declaration
public PixelFormat GetFormat() const
Returns
PixelFormat
|
GetHeight()
The output backbuffer height (in pixels).
Declaration
public int32 GetHeight() const
Returns
int32
|
GetPresentCount()
Gets amount of backbuffer swaps.
Declaration
public uint64 GetPresentCount() const
Returns
uint64
|
GetResourceType()
Gets the GPU resource type.
Declaration
public virtual GPUResourceType GetResourceType() const final override
Returns
GPUResourceType
|
Overrides
GetSize()
The output backbuffer width and height (in pixels).
Declaration
public Float2 GetSize() const
Returns
Float2
|
GetWidth()
The output backbuffer width (in pixels).
Declaration
public int32 GetWidth() const
Returns
int32
|
GetWindow()
Gets the linked window.
Declaration
public Window* GetWindow() const
Returns
Window
|
IsFullscreen()
True if running in fullscreen mode.
Declaration
public virtual bool IsFullscreen() = 0
Returns
bool
True if is in fullscreen mode, otherwise false |
IsReady()
Checks if task is ready to render.
Declaration
public virtual bool IsReady() const
Returns
bool
True if is ready, otherwise false |
Present(bool vsync)
Present back buffer to the output.
Declaration
public virtual void Present(bool vsync)
Parameters
bool
vsync
True if use vertical synchronization to lock frame rate. |
Resize(int32 width, int32 height)
Resize output back buffer.
Declaration
public virtual bool Resize(int32 width, int32 height) = 0
Parameters
int32
width
New output width (in pixels). |
int32
height
New output height (in pixels). |
Returns
bool
True if cannot resize the buffers, otherwise false. |
SetFullscreen(bool isFullscreen)
Set the fullscreen state.
Declaration
public virtual void SetFullscreen(bool isFullscreen) = 0
Parameters
bool
isFullscreen
Fullscreen mode to apply |
ToString()
Gets the string representation of this object.
Declaration
public virtual String ToString() const override
Returns
String
|