Skip to content

LiteFX::Rendering::Backends::DirectX12Backend::findAdapter

Finds an adapter using a preference setting, based on the user preferences made in the operating system settings.

Synopsis

Declared in <litefx/backends/dx12.hpp>

[[dllimport, dllexport]] virtual DirectX12GraphicsAdapter const* findAdapter(GpuPreference preference) const override;

Description

Note that the backend might return any adapter if the operating system does not support GPU preference settings, or if the backend does not support querying adapters from such a setting.

The Vulkan backend only supports this method if the DirectX 12 backend is also available, as it performs the query through DXGI.

Return Value

A pointer to a graphics adapter, or nullptr, if no adapter could be found.

Parameters

NameDescription
preferenceThe profile for the preferred adapter.

See Also

IGraphicsAdapter