Skip to content

LiteFX::Rendering::Backends::DirectX12Device::create

Initializes the device instance.

Synopsis

Declared in <litefx/backends/dx12.hpp>

[[dllimport, dllexport]] static SharedPtr<DirectX12Device> create(
    DirectX12Backend const& backend,
    DirectX12GraphicsAdapter const& adapter,
    UniquePtr<DirectX12Surface>&& surface,
    Format format,
    Size2d const& renderArea,
    UInt32 backBuffers,
    bool enableVsync = false,
    GraphicsDeviceFeatures features = {},
    UInt32 globalBufferHeapSize = D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1,
    UInt32 globalSamplerHeapSize = D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE);

Return Value

A shared pointer to the new device instance.

Parameters

NameDescription
backendThe backend from which the device got created.
adapterThe adapter the device uses for drawing.
surfaceThe surface, the device should draw to.
formatThe initial surface format, device uses for drawing.
renderAreaThe initial size of the render area.
backBuffersThe initial number of back buffers.
enableVsyncThe initial setting for vertical synchronization.
featuresThe features that should be supported by this device.
globalBufferHeapSizeThe size of the global heap for constant buffers, shader resources and images.
globalSamplerHeapSizeThe size of the global heap for samplers.