LiteFX::Rendering::Backends::VulkanDevice::create¶
Initializes the device instance.
Synopsis¶
Declared in <litefx/backends/vulkan.hpp>
[[dllimport, dllexport]] static SharedPtr<VulkanDevice> create(
VulkanBackend const& backend,
VulkanGraphicsAdapter const& adapter,
UniquePtr<VulkanSurface>&& surface,
Format format,
Size2d const& renderArea,
UInt32 backBuffers,
bool enableVsync = false,
GraphicsDeviceFeatures features = { },
Span<String> extensions = { },
void* deviceExtensionObjects = nullptr,
size_t globalDescriptorHeapSize = DEFAULT_DESCRIPTOR_HEAP_SIZE);
Description¶
Providing an extension chain using deviceExtensionObjects allows to customize which extensions to load and enable. User-defined extensions provided this way will be picked up and patched with the required settings accordingly. Settings enabled by the user will not be disabled this way, with the exception of features that are controlled by the features property.
Return Value¶
A shared pointer to the new device instance.
Parameters¶
| Name | Description |
|---|---|
| backend | The backend from which the device is 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. |
| extensions | The required extensions the device gets initialized with. |
| deviceExtensionObjects | A pointer to additional extension objects (such as device features) that are stored in the devices's pNext chain during device creation. |
| globalDescriptorHeapSize | The size of the global descriptor heap in bytes. |