Skip to main content

D3D12Surface

The D3D12Surface class extends the Surface class to provide Direct3D12-specific functionality for managing a rendering surface. It includes methods for interacting with Direct3D12 devices, command queues, and command lists, enabling rendering operations in the context of Direct3D12. The class supports managing swap chains, render targets, and depth-stencil buffers, which are essential for rendering operations.

#include <platform/TellusimSurface.h>

Inheritance

Constructors

D3D12Surface()
explicit D3D12Surface(D3D12Context &context)

Methods

Current device.

IDXGIFactory4 *getFactory() const
ID3D12Device *getDevice() const
ID3D12CommandQueue *getQueue() const
ID3D12GraphicsCommandList *getCommand() const

Swap chain.

void setSwapChain(IDXGISwapChain *swap_chain)
IDXGISwapChain *getSwapChain() const

Render targets.

void setRenderTarget(ID3D12Resource *render_target)
void setDepthStencil(ID3D12Resource *depth_stencil)
ID3D12Resource *getRenderTarget() const
ID3D12Resource *getDepthStencil() const

Render target views.

void setRenderTargetView(size_t render_target_view)
void setDepthStencilView(size_t depth_stencil_view)
size_t getRenderTargetView() const
size_t getDepthStencilView() const

Surface formats.

uint32_t getColorDXGIFormat() const
uint32_t getDepthDXGIFormat() const