Skip to content

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,
    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

NameDescription
backendThe backend from which the device is created.
adapterThe adapter the device uses for drawing.
surfaceThe surface, the device should draw to.
featuresThe features that should be supported by this device.
extensionsThe required extensions the device gets initialized with.
deviceExtensionObjectsA pointer to additional extension objects (such as device features) that are stored in the devices's pNext chain during device creation.
globalDescriptorHeapSizeThe size of the global descriptor heap in bytes.