LiteFX 0.3.1.2022
Computer Graphics Engine
|
The interface to access a render backend. More...
#include <rendering_api.hpp>
Inherits LiteFX::IBackend.
Inherited by LiteFX::Rendering::RenderBackend< DirectX12Backend, DirectX12Device >, LiteFX::Rendering::RenderBackend< VulkanBackend, VulkanDevice >, and LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >.
Public Member Functions | |
virtual | ~IRenderBackend () noexcept=default |
Array< const IGraphicsAdapter * > | listAdapters () const |
Lists all available graphics adapters. More... | |
virtual const IGraphicsAdapter * | findAdapter (const Optional< UInt64 > &adapterId=std::nullopt) const =0 |
Finds an adapter using its unique ID. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Public Member Functions inherited from LiteFX::IBackend | |
virtual | ~IBackend () noexcept=default |
virtual BackendType | type () const noexcept=0 |
Gets the type of the backend. More... | |
const BackendState & | state () const noexcept |
Returns the state of the backend. More... | |
virtual String | name () const noexcept=0 |
Gets the name of the backend. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from LiteFX::IBackend | |
BackendState & | state () noexcept |
Returns the state of the backend. More... | |
virtual void | activate ()=0 |
Called by the parent App, if the backend is started. More... | |
virtual void | deactivate ()=0 |
Called by the parent App, if the backend is stopped. More... | |
The interface to access a render backend.
|
virtualdefaultnoexcept |
|
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< TBackend, TGraphicsDevice >, LiteFX::Rendering::RenderBackend< DirectX12Backend, DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanBackend, 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< TBackend, TGraphicsDevice >, LiteFX::Rendering::RenderBackend< DirectX12Backend, DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanBackend, VulkanDevice >.
|
pure virtual |
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::RenderBackend< TBackend, TGraphicsDevice >, LiteFX::Rendering::Backends::DirectX12Backend, LiteFX::Rendering::Backends::VulkanBackend, LiteFX::Rendering::RenderBackend< DirectX12Backend, DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanBackend, VulkanDevice >.
|
inline |
Lists all available graphics adapters.
|
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< TBackend, TGraphicsDevice >, LiteFX::Rendering::RenderBackend< DirectX12Backend, DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanBackend, 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< TBackend, TGraphicsDevice >, LiteFX::Rendering::RenderBackend< DirectX12Backend, DirectX12Device >, and LiteFX::Rendering::RenderBackend< VulkanBackend, VulkanDevice >.