LiteFX::Rendering::GraphicsDevice
Represents the graphics device that a rendering back-end is doing work on.
Synopsis
Declared in <litefx/rendering.hpp>
template<
typename TFactory,
typename TSurface,
typename TGraphicsAdapter,
typename TSwapChain,
typename TCommandQueue,
typename TRenderPass,
typename TRenderPipeline,
typename TComputePipeline,
typename TRayTracingPipeline,
typename TBarrier>
requires meta::implements<TSurface, ISurface> &&
meta::implements<TGraphicsAdapter, IGraphicsAdapter> &&
meta::implements<TSwapChain, SwapChain<typename TFactory::image_type>> &&
meta::implements<TCommandQueue, CommandQueue<typename TCommandQueue::command_buffer_type>> &&
meta::implements<TFactory, GraphicsFactory<typename TFactory::descriptor_layout_type, typename TFactory::buffer_type, typename TFactory::vertex_buffer_type, typename TFactory::index_buffer_type, typename TFactory::image_type, typename TFactory::sampler_type, typename TFactory::bottom_level_acceleration_structure_type, typename TFactory::top_level_acceleration_structure_type>> &&
meta::implements<TRenderPass, RenderPass<TCommandQueue, typename TRenderPass::frame_buffer_type>> &&
meta::implements<TRenderPipeline, RenderPipeline<typename TRenderPipeline::pipeline_layout_type, typename TRenderPipeline::shader_program_type, typename TRenderPipeline::input_assembler_type, typename TRenderPipeline::rasterizer_type>> &&
meta::implements<TComputePipeline, ComputePipeline<typename TComputePipeline::pipeline_layout_type, typename TComputePipeline::shader_program_type>> &&
meta::implements<TRayTracingPipeline, RayTracingPipeline<typename TRayTracingPipeline::pipeline_layout_type, typename TRayTracingPipeline::shader_program_type>> &&
meta::implements<TBarrier, Barrier<typename TFactory::buffer_type, typename TFactory::image_type>>
class GraphicsDevice
: public IGraphicsDevice
Description
The graphics device is the central instance of a renderer. It has two major roles. First, it maintains the GraphicsFactory instance, that is used to facilitate common objects. Second, it owns the device state, which contains objects required for communication between your application and the graphics driver. Most notably, those objects contain the SwapChain instance and the CommandQueue instances used for data and command transfer.
Base Classes
Type Aliases
Member Functions
Protected Types
| Name | Description |
Allocator | An allocator used to allocate the shared object. |
Protected Member Functions
Protected Static Member Functions
| Name | Description |
create | Generic factory method used to create instances of the shared object. |
Template Parameters
| Name | Description |
| TFactory | The type of the graphics factory. Must implement GraphicsFactory. |
| TSurface | The type of the surface. Must implement ISurface. |
| TGraphicsAdapter | The type of the graphics adapter. Must implement IGraphicsAdapter. |
| TSwapChain | The type of the swap chain. Must implement SwapChain. |
| TCommandQueue | The type of the command queue. Must implement CommandQueue. |
| TRenderPass | The type of the render pass. Must implement RenderPass. |
| TRenderPipeline | The type of the render pipeline. Must implement RenderPipeline. |
| TComputePipeline | The type of the compute pipeline. Must implement ComputePipeline. |
| TRayTracingPipeline | The type of the ray-tracing pipeline. Must implement RayTracingPipeline. |
| TBarrier | The type of the memory barrier. Must implement Barrier. |
Derived Classes