class SwapChain
The FidelityFX Cauldron Framework
api/platform-agnostic representation of the swapchain object.
File location: framework/cauldron/framework/inc/render/swapchain.h
Methods
Return type |
Description |
---|---|
static SwapChain* |
SwapChain instance creation function. Implemented per api/platform to return the correct internal resource type.
|
ResourceFormat |
GetSwapChainFormat () const
Returns the swap chain resource’s format.
|
size_t |
Returns the configured backbuffer count for this run.
|
Returns the current “SwapChainRenderTarget“.
|
|
const ResourceViewInfo |
GetBackBufferRTV () const
Returns the current back buffer’s render target view “ResourceViewInfo“.
|
const ResourceViewInfo |
GetBackBufferRTV (uint8_t idx) const
Returns the specified back buffer’s render target view “ResourceViewInfo“.
|
uint8_t |
GetBackBufferIndex () const
Returns the current back buffer’s index.
|
const DisplayMode |
GetSwapChainDisplayMode () const
Returns the swap chain’s configured “DisplayMode“.
|
const HDRMetadata & |
GetHDRMetaData () const
Returns the swap chain’s configured “HDRMetadata“.
|
void |
OnResize (uint32_t width, uint32_t height) = 0
Callback invoked while processing OnResize events.
|
void |
WaitForSwapChain () = 0
Waits until the last submitted swap chain has finished presenting. Only waits when we run too far ahead.
|
void |
Present () = 0
Executes device presentation of the swapchain.
|
bool |
IsFrameInterpolation () const
Indicates if this is a replacement frame interpolation swapchain.
|
void |
GetLastPresentCount (UINT* pLastPresentCount)
Gets the last present count for the swapchain.
|
void |
GetRefreshRate (double* outRefreshRate)
Gets the current refresh rate for the swapchain.
|
void |
DumpSwapChainToFile (std::experimental::filesystem::path filePath) = 0
Creates a screenshot of the current swap chain.
|
DisplayMode |
CheckAndGetDisplayModeRequested (DisplayMode DispMode)
Verifies if requested display mode can be supported.
|
void |
Prepares the HDRMetadata based on the selected display mode for the run.
|
void |
SetHDRMetadataAndColorspace () = 0
Calculates and sets HDRMetadata and color space information.
|
SwapChainInternal* |
GetImpl () = 0
Gets the internal implementation for api/platform parameter accessors.
|
const SwapChainInternal* |
GetImpl () const = 0
|
Detailed description
The FidelityFX Cauldron Framework
api/platform-agnostic representation of the swapchain object. Interface for all presentation-related interfaces.
Fields
Type |
Description |
---|---|
static const wchar_t* |
s_SwapChainRTName
The name associated with swapchain resources.
|
Methods
CreateSwapchain
SwapChain instance creation function. Implemented per api/platform to return the correct internal resource type.
GetSwapChainFormat
Returns the swap chain resource’s format.
GetBackBufferCount
Returns the configured backbuffer count for this run.
GetBackBufferRT
SwapChainRenderTarget * GetBackBufferRT ()
Returns the current SwapChainRenderTarget
.
GetBackBufferRTV
const ResourceViewInfo GetBackBufferRTV () const
Returns the current back buffer’s render target view ResourceViewInfo
.
GetBackBufferRTV
const ResourceViewInfo GetBackBufferRTV (uint8_t idx) const
Returns the specified back buffer’s render target view ResourceViewInfo
.
GetBackBufferIndex
Returns the current back buffer’s index.
GetSwapChainDisplayMode
Returns the swap chain’s configured DisplayMode
.
GetHDRMetaData
const HDRMetadata & GetHDRMetaData () const
Returns the swap chain’s configured HDRMetadata
.
OnResize
Callback invoked while processing OnResize events.
WaitForSwapChain
Waits until the last submitted swap chain has finished presenting. Only waits when we run too far ahead.
Present
Executes device presentation of the swapchain.
IsFrameInterpolation
Indicates if this is a replacement frame interpolation swapchain.
GetLastPresentCount
Gets the last present count for the swapchain.
GetRefreshRate
Gets the current refresh rate for the swapchain.
DumpSwapChainToFile
Creates a screenshot of the current swap chain.
CheckAndGetDisplayModeRequested
Verifies if requested display mode can be supported.
PopulateHDRMetadataBasedOnDisplayMode
Prepares the HDRMetadata based on the selected display mode for the run.
SetHDRMetadataAndColorspace
Calculates and sets HDRMetadata and color space information.
GetImpl
Gets the internal implementation for api/platform parameter accessors.