LiteFX 0.4.1.2025
Computer Graphics Engine
|
The interface to access a render backend. More...
#include <rendering_api.hpp>
Inherits LiteFX::IBackend.
Inherited by LiteFX::Rendering::RenderBackend< DirectX12Device >, LiteFX::Rendering::RenderBackend< VulkanDevice >, and LiteFX::Rendering::RenderBackend< TGraphicsDevice >.
Public Member Functions | |
~IRenderBackend () noexcept override=default | |
Enumerable< SharedPtr< const IGraphicsAdapter > > | listAdapters () const |
Lists all available graphics adapters. | |
virtual const IGraphicsAdapter * | findAdapter (const Optional< UInt64 > &adapterId=std::nullopt) const noexcept=0 |
Finds an adapter using its unique ID. | |
virtual IGraphicsDevice * | device (const String &name) noexcept=0 |
Looks up a device and returns a pointer to it, or nullptr , if no device with the provided name could be found. | |
virtual const IGraphicsDevice * | device (const String &name) const noexcept=0 |
Looks up a device and returns a pointer to it, or nullptr , if no device with the provided name could be found. | |
virtual const IGraphicsDevice * | operator[] (const String &name) const noexcept |
Looks up a device and returns a pointer to it, or nullptr , if no device with the provided name could be found. | |
virtual IGraphicsDevice * | operator[] (const String &name) noexcept |
Looks up a device and returns a pointer to it, or nullptr , if no device with the provided name could be found. | |
![]() | |
virtual | ~IBackend () noexcept=default |
virtual BackendType | type () const noexcept=0 |
Gets the type of the backend. | |
const BackendState & | state () const noexcept |
Returns the state of the backend. | |
virtual StringView | name () const noexcept=0 |
Gets the name of the backend. | |
Protected Member Functions | |
IRenderBackend () noexcept=default | |
IRenderBackend (IRenderBackend &&) noexcept=default | |
IRenderBackend (const IRenderBackend &)=default | |
IRenderBackend & | operator= (const IRenderBackend &)=default |
IRenderBackend & | operator= (IRenderBackend &&) noexcept=default |
![]() | |
IBackend () noexcept=default | |
IBackend (const IBackend &)=default | |
IBackend (IBackend &&) noexcept=default | |
IBackend & | operator= (const IBackend &)=default |
IBackend & | operator= (IBackend &&) noexcept=default |
BackendState & | state () noexcept |
Returns the state of the backend. | |
virtual void | activate ()=0 |
Called by the parent App, if the backend is started. | |
virtual void | deactivate ()=0 |
Called by the parent App, if the backend is stopped. | |
The interface to access a render backend.
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
protecteddefault |
|
overridedefaultnoexcept |
|
pure virtualnoexcept |
Looks up a device and returns a pointer to it, or nullptr
, if no device with the provided name could be found.
name | The name of the device. |
nullptr
, if no device could be found.Implemented in LiteFX::Rendering::Backends::DirectX12Backend, LiteFX::Rendering::Backends::VulkanBackend, LiteFX::Rendering::RenderBackend< TGraphicsDevice >, LiteFX::Rendering::RenderBackend< DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanDevice >.
|
pure virtualnoexcept |
Looks up a device and returns a pointer to it, or nullptr
, if no device with the provided name could be found.
name | The name of the device. |
nullptr
, if no device could be found.Implemented in LiteFX::Rendering::Backends::DirectX12Backend, LiteFX::Rendering::Backends::VulkanBackend, LiteFX::Rendering::RenderBackend< TGraphicsDevice >, LiteFX::Rendering::RenderBackend< DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanDevice >.
|
pure virtualnoexcept |
Finds an adapter using its unique ID.
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.
adapterId | The unique ID of the adapter, or std::nullopt to find the default adapter. |
nullptr
, if no adapter could be found.Implemented in LiteFX::Rendering::Backends::DirectX12Backend, LiteFX::Rendering::Backends::VulkanBackend, LiteFX::Rendering::RenderBackend< TGraphicsDevice >, LiteFX::Rendering::RenderBackend< DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanDevice >.
|
inline |
Lists all available graphics adapters.
|
protecteddefault |
|
protecteddefaultnoexcept |
|
inlinevirtualnoexcept |
Looks up a device and returns a pointer to it, or nullptr
, if no device with the provided name could be found.
name | The name of the device. |
nullptr
, if no device could be found.Reimplemented in LiteFX::Rendering::RenderBackend< TGraphicsDevice >, LiteFX::Rendering::RenderBackend< DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanDevice >.
|
inlinevirtualnoexcept |
Looks up a device and returns a pointer to it, or nullptr
, if no device with the provided name could be found.
name | The name of the device. |
nullptr
, if no device could be found.Reimplemented in LiteFX::Rendering::RenderBackend< TGraphicsDevice >, LiteFX::Rendering::RenderBackend< DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanDevice >.