LiteFX 0.3.1.2022
Computer Graphics Engine
|
Defines a back-end, that provides a device instance for a certain surface and graphics adapter. More...
#include <rendering.hpp>
Inherits LiteFX::Rendering::IRenderBackend.
Public Types | |
using | device_type = TGraphicsDevice |
using | surface_type = device_type::surface_type |
using | adapter_type = device_type::adapter_type |
using | swap_chain_type = device_type::swap_chain_type |
using | command_queue_type = device_type::command_queue_type |
using | command_buffer_type = device_type::command_buffer_type |
using | factory_type = device_type::factory_type |
using | barrier_type = device_type::barrier_type |
using | descriptor_layout_type = factory_type::descriptor_layout_type |
using | vertex_buffer_type = factory_type::vertex_buffer_type |
using | index_buffer_type = factory_type::index_buffer_type |
using | buffer_type = factory_type::buffer_type |
using | image_type = factory_type::image_type |
using | sampler_type = factory_type::sampler_type |
using | frame_buffer_type = device_type::frame_buffer_type |
using | render_pass_type = device_type::render_pass_type |
using | pipeline_layout_type = device_type::pipeline_layout_type |
using | render_pipeline_type = device_type::render_pipeline_type |
using | compute_pipeline_type = device_type::compute_pipeline_type |
using | shader_program_type = device_type::shader_program_type |
using | input_assembler_type = device_type::input_assembler_type |
using | rasterizer_type = device_type::rasterizer_type |
Public Member Functions | |
virtual | ~RenderBackend () noexcept=default |
virtual Array< const adapter_type * > | listAdapters () const =0 |
virtual const adapter_type * | findAdapter (const Optional< UInt64 > &adapterId=std::nullopt) const =0 |
Finds an adapter using its unique ID. More... | |
virtual void | registerDevice (String name, UniquePtr< device_type > &&device)=0 |
template<typename ... TArgs> | |
device_type * | createDevice (String name, const adapter_type &adapter, UniquePtr< surface_type > &&surface, TArgs &&... _args) |
Creates a new graphics device. More... | |
virtual void | releaseDevice (const String &name)=0 |
Destroys and removes a device from the backend. More... | |
virtual device_type * | 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 device_type * | 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 device_type * | 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 device_type * | 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::Rendering::IRenderBackend | |
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... | |
Defines a back-end, that provides a device instance for a certain surface and graphics adapter.
TBackend | The type of the backend derived from the interface. Must implement IRenderBackend. |
TGraphicsDevice | The type of the graphics device. Must implement GraphicsDevice. |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::adapter_type = device_type::adapter_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::barrier_type = device_type::barrier_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::buffer_type = factory_type::buffer_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::command_buffer_type = device_type::command_buffer_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::command_queue_type = device_type::command_queue_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::compute_pipeline_type = device_type::compute_pipeline_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::descriptor_layout_type = factory_type::descriptor_layout_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::device_type = TGraphicsDevice |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::factory_type = device_type::factory_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::frame_buffer_type = device_type::frame_buffer_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::image_type = factory_type::image_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::index_buffer_type = factory_type::index_buffer_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::input_assembler_type = device_type::input_assembler_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::pipeline_layout_type = device_type::pipeline_layout_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::rasterizer_type = device_type::rasterizer_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::render_pass_type = device_type::render_pass_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::render_pipeline_type = device_type::render_pipeline_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::sampler_type = factory_type::sampler_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::shader_program_type = device_type::shader_program_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::surface_type = device_type::surface_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::swap_chain_type = device_type::swap_chain_type |
using LiteFX::Rendering::RenderBackend< TBackend, TGraphicsDevice >::vertex_buffer_type = factory_type::vertex_buffer_type |
|
virtualdefaultnoexcept |
|
inline |
Creates a new graphics device.
_args | The arguments that are passed to the graphics device constructor. |
|
pure virtualnoexcept |
Looks up a device and returns a pointer to it, or nullptr
, if no device with the provided name could be found.
Implements LiteFX::Rendering::IRenderBackend.
Implemented in LiteFX::Rendering::Backends::DirectX12Backend, and LiteFX::Rendering::Backends::VulkanBackend.
|
pure virtualnoexcept |
Looks up a device and returns a pointer to it, or nullptr
, if no device with the provided name could be found.
Implements LiteFX::Rendering::IRenderBackend.
Implemented in LiteFX::Rendering::Backends::DirectX12Backend, and LiteFX::Rendering::Backends::VulkanBackend.
|
pure virtual |
Finds an adapter using its unique ID.
Implements LiteFX::Rendering::IRenderBackend.
Implemented in LiteFX::Rendering::Backends::DirectX12Backend, and LiteFX::Rendering::Backends::VulkanBackend.
|
pure virtual |
Implemented in LiteFX::Rendering::Backends::DirectX12Backend, and LiteFX::Rendering::Backends::VulkanBackend.
|
inlinevirtualnoexcept |
Looks up a device and returns a pointer to it, or nullptr
, if no device with the provided name could be found.
Reimplemented from LiteFX::Rendering::IRenderBackend.
|
inlinevirtualnoexcept |
Looks up a device and returns a pointer to it, or nullptr
, if no device with the provided name could be found.
Reimplemented from LiteFX::Rendering::IRenderBackend.
|
pure virtual |
|
pure virtual |
Destroys and removes a device from the backend.
name | The name of the device. |
Implemented in LiteFX::Rendering::Backends::DirectX12Backend, and LiteFX::Rendering::Backends::VulkanBackend.