Skip to content

LiteFX::Rendering::RenderBackend::findAdapter

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

Synopsis

Declared in <litefx/rendering.hpp>

virtual adapter_type const* findAdapter(GpuPreference preference) const override = 0;

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