Skip to content

LiteFX::Rendering::Backends::DirectX12SwapChain

Implements a DirectX 12 swap chain.

Synopsis

Declared in <litefx/backends/dx12.hpp>

class [[dllimport, dllexport]] DirectX12SwapChain final
    : public SwapChain<IDirectX12Image>
    , public ComResource<IDXGISwapChain4>

Base Classes

NameDescription
SwapChain<IDirectX12Image>Represents a swap chain, i.e. a chain of multiple IImage instances, that can be presented to a ISurface.
ComResource<IDXGISwapChain4>A resource that is hold by a ComPtr.

Type Aliases

Member Functions

NameDescription
DirectX12SwapChain [constructor] [deleted]Copy constructor
DirectX12SwapChain [constructor] [deleted]Move constructor
~DirectX12SwapChain [destructor] [virtual]Destructor
operator= [deleted]Copy assignment operator
operator= [deleted]Move assignment operator
addTimingEvent [virtual]Adds a new timing event.
buffers [virtual]Returns the number of images in the swap chain.
device [virtual]Returns the swap chain's parent device instance.
getSurfaceFormats [virtual]Returns an array of supported formats, that can be drawn to the surface.
handle [virtual]Returns the resource managed by the class.
image [virtual]Returns the current swap chain back buffer image.
image [virtual]Returns the swap chain present image for backBuffer.
images [virtual]Returns an array of the swap chain present images.
present [virtual]Queues a present that gets executed after fence has been signaled on the default graphics queue.
readTimingEvent [virtual]Reads the current time stamp value (in ticks) of a timing event.
renderArea [virtual]Returns the size of the render area.
reset [virtual]Causes the swap chain to be re-created. All frame and command buffers will be invalidated and rebuilt.
resolveQueryId [virtual]Returns the query ID for the timing event.
supportsVariableRefreshRate Returns true, if the adapter supports variable refresh rates (i.e. tearing is allowed).
surfaceFormat [virtual]Returns the swap chain image format.
swapBackBuffer [virtual]Swaps the front buffer with the next back buffer in order.
timestampQueryHeap Returns the query heap for the current frame.
timingEvent [virtual]Returns the timing event registered for queryId.
timingEvents [virtual]Returns all registered timing events.
verticalSynchronization [virtual]Returns true, if vertical synchronization should be used, otherwise false.

Protected Member Functions

NameDescription
operator= [deleted]Assignment operator
operator= Assignment operator
operator= Assignment operator
operator= Assignment operator
handle [virtual]Returns the resource managed by the class.

Friends

NameDescription
LiteFX::Rendering::Backends::DirectX12DeviceImplements a DirectX 12 graphics device.
LiteFX::Rendering::Backends::DirectX12ImageImplements a DirectX12 IImage.
LiteFX::Rendering::Backends::DirectX12RenderPassImplements a DirectX 12 render pass.
LiteFX::Rendering::Backends::DirectX12SwapChain::DirectX12SwapChainImpl
LiteFX::PimplPtrA smart pointer that manages an implementation instance for a public interface class.