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¶
| Name | Description |
|---|---|
| backend | The backend from which the device got created. |
| adapter | The adapter the device uses for drawing. |
| surface | The surface, the device should draw to. |
| format | The initial surface format, device uses for drawing. |
| renderArea | The initial size of the render area. |
| backBuffers | The initial number of back buffers. |
| enableVsync | The initial setting for vertical synchronization. |
| features | The features that should be supported by this device. |
| globalBufferHeapSize | The size of the global heap for constant buffers, shader resources and images. |
| globalSamplerHeapSize | The size of the global heap for samplers. |