Skip to content

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

Finds an adapter using its unique ID.

Synopsis

Declared in <litefx/backends/dx12.hpp>

[[dllimport, dllexport]] virtual DirectX12GraphicsAdapter const* findAdapter(Optional<UInt64> const& adapterId = std::nullopt) const override;

Description

Note that the adapter ID is optional, which allows the back-end to return a default adapter instance. Which adapter is used as default adapter, depends on the actual back-end implementation. The interface does not make any constraints on the default adapter to choose. A naive implementation might simply return the first available adapter.

Return Value

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

Parameters

NameDescription
adapterIdThe unique ID of the adapter, or std::nullopt to find the default adapter.

See Also

IGraphicsAdapter