|
virtual | ~GraphicsFactory () noexcept=default |
|
virtual UniquePtr< TBuffer > | createBuffer (const BufferType &type, const BufferUsage &usage, const size_t &elementSize, const UInt32 &elements=1, const bool &allowWrite=false) const =0 |
|
virtual UniquePtr< TBuffer > | createBuffer (const String &name, const BufferType &type, const BufferUsage &usage, const size_t &elementSize, const UInt32 &elements=1, const bool &allowWrite=false) const =0 |
|
virtual UniquePtr< TVertexBuffer > | createVertexBuffer (const vertex_buffer_layout_type &layout, const BufferUsage &usage, const UInt32 &elements=1) const =0 |
|
virtual UniquePtr< TVertexBuffer > | createVertexBuffer (const String &name, const vertex_buffer_layout_type &layout, const BufferUsage &usage, const UInt32 &elements=1) const =0 |
|
virtual UniquePtr< TIndexBuffer > | createIndexBuffer (const index_buffer_layout_type &layout, const BufferUsage &usage, const UInt32 &elements) const =0 |
|
virtual UniquePtr< TIndexBuffer > | createIndexBuffer (const String &name, const index_buffer_layout_type &layout, const BufferUsage &usage, const UInt32 &elements) const =0 |
|
virtual UniquePtr< TImage > | createAttachment (const Format &format, const Size2d &size, const MultiSamplingLevel &samples=MultiSamplingLevel::x1) const =0 |
|
virtual UniquePtr< TImage > | createAttachment (const String &name, const Format &format, const Size2d &size, const MultiSamplingLevel &samples=MultiSamplingLevel::x1) const =0 |
|
virtual UniquePtr< TImage > | createTexture (const Format &format, const Size3d &size, const ImageDimensions &dimension=ImageDimensions::DIM_2, const UInt32 &levels=1, const UInt32 &layers=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, const bool &allowWrite=false) const =0 |
|
virtual UniquePtr< TImage > | createTexture (const String &name, const Format &format, const Size3d &size, const ImageDimensions &dimension=ImageDimensions::DIM_2, const UInt32 &levels=1, const UInt32 &layers=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, const bool &allowWrite=false) const =0 |
|
virtual Array< UniquePtr< TImage > > | createTextures (const UInt32 &elements, const Format &format, const Size3d &size, const ImageDimensions &dimension=ImageDimensions::DIM_2, const UInt32 &layers=1, const UInt32 &levels=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, const bool &allowWrite=false) const =0 |
|
virtual UniquePtr< TSampler > | createSampler (const FilterMode &magFilter=FilterMode::Nearest, const FilterMode &minFilter=FilterMode::Nearest, const BorderMode &borderU=BorderMode::Repeat, const BorderMode &borderV=BorderMode::Repeat, const BorderMode &borderW=BorderMode::Repeat, const MipMapMode &mipMapMode=MipMapMode::Nearest, const Float &mipMapBias=0.f, const Float &maxLod=std::numeric_limits< Float >::max(), const Float &minLod=0.f, const Float &anisotropy=0.f) const =0 |
|
virtual UniquePtr< TSampler > | createSampler (const String &name, const FilterMode &magFilter=FilterMode::Nearest, const FilterMode &minFilter=FilterMode::Nearest, const BorderMode &borderU=BorderMode::Repeat, const BorderMode &borderV=BorderMode::Repeat, const BorderMode &borderW=BorderMode::Repeat, const MipMapMode &mipMapMode=MipMapMode::Nearest, const Float &mipMapBias=0.f, const Float &maxLod=std::numeric_limits< Float >::max(), const Float &minLod=0.f, const Float &anisotropy=0.f) const =0 |
|
virtual Array< UniquePtr< TSampler > > | createSamplers (const UInt32 &elements, const FilterMode &magFilter=FilterMode::Nearest, const FilterMode &minFilter=FilterMode::Nearest, const BorderMode &borderU=BorderMode::Repeat, const BorderMode &borderV=BorderMode::Repeat, const BorderMode &borderW=BorderMode::Repeat, const MipMapMode &mipMapMode=MipMapMode::Nearest, const Float &mipMapBias=0.f, const Float &maxLod=std::numeric_limits< Float >::max(), const Float &minLod=0.f, const Float &anisotropy=0.f) const =0 |
|
virtual | ~IGraphicsFactory () noexcept=default |
|
UniquePtr< IBuffer > | createBuffer (const BufferType &type, const BufferUsage &usage, const size_t &elementSize, const UInt32 &elements=1, const bool &allowWrite=false) const |
| Creates a buffer of type type . More...
|
|
UniquePtr< IBuffer > | createBuffer (const String &name, const BufferType &type, const BufferUsage &usage, const size_t &elementSize, const UInt32 &elements=1, const bool &allowWrite=false) const |
| Creates a buffer of type type . More...
|
|
UniquePtr< IVertexBuffer > | createVertexBuffer (const IVertexBufferLayout &layout, const BufferUsage &usage, const UInt32 &elements=1) const |
| Creates a vertex buffer, based on the layout More...
|
|
UniquePtr< IVertexBuffer > | createVertexBuffer (const String &name, const IVertexBufferLayout &layout, const BufferUsage &usage, const UInt32 &elements=1) const |
| Creates a vertex buffer, based on the layout More...
|
|
UniquePtr< IIndexBuffer > | createIndexBuffer (const IIndexBufferLayout &layout, const BufferUsage &usage, const UInt32 &elements) const |
| Creates an index buffer, based on the layout . More...
|
|
UniquePtr< IIndexBuffer > | createIndexBuffer (const String &name, const IIndexBufferLayout &layout, const BufferUsage &usage, const UInt32 &elements) const |
| Creates an index buffer, based on the layout . More...
|
|
UniquePtr< IImage > | createAttachment (const Format &format, const Size2d &size, const MultiSamplingLevel &samples=MultiSamplingLevel::x1) const |
| Creates an image that is used as render target attachment. More...
|
|
UniquePtr< IImage > | createAttachment (const String &name, const Format &format, const Size2d &size, const MultiSamplingLevel &samples=MultiSamplingLevel::x1) const |
| Creates an image that is used as render target attachment. More...
|
|
UniquePtr< IImage > | createTexture (const Format &format, const Size3d &size, const ImageDimensions &dimension=ImageDimensions::DIM_2, const UInt32 &levels=1, const UInt32 &layers=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, const bool &allowWrite=false) const |
| Creates a texture, based on the layout . More...
|
|
UniquePtr< IImage > | createTexture (const String &name, const Format &format, const Size3d &size, const ImageDimensions &dimension=ImageDimensions::DIM_2, const UInt32 &levels=1, const UInt32 &layers=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, const bool &allowWrite=false) const |
| Creates a texture, based on the layout . More...
|
|
Array< UniquePtr< IImage > > | createTextures (const UInt32 &elements, const Format &format, const Size3d &size, const ImageDimensions &dimension=ImageDimensions::DIM_2, const UInt32 &layers=1, const UInt32 &levels=1, const MultiSamplingLevel &samples=MultiSamplingLevel::x1, const bool &allowWrite=false) const |
| Creates an array of textures, based on the layout . More...
|
|
UniquePtr< ISampler > | createSampler (const FilterMode &magFilter=FilterMode::Nearest, const FilterMode &minFilter=FilterMode::Nearest, const BorderMode &borderU=BorderMode::Repeat, const BorderMode &borderV=BorderMode::Repeat, const BorderMode &borderW=BorderMode::Repeat, const MipMapMode &mipMapMode=MipMapMode::Nearest, const Float &mipMapBias=0.f, const Float &maxLod=std::numeric_limits< Float >::max(), const Float &minLod=0.f, const Float &anisotropy=0.f) const |
| Creates a texture sampler, based on the layout . More...
|
|
UniquePtr< ISampler > | createSampler (const String &name, const FilterMode &magFilter=FilterMode::Nearest, const FilterMode &minFilter=FilterMode::Nearest, const BorderMode &borderU=BorderMode::Repeat, const BorderMode &borderV=BorderMode::Repeat, const BorderMode &borderW=BorderMode::Repeat, const MipMapMode &mipMapMode=MipMapMode::Nearest, const Float &mipMapBias=0.f, const Float &maxLod=std::numeric_limits< Float >::max(), const Float &minLod=0.f, const Float &anisotropy=0.f) const |
| Creates a texture sampler, based on the layout . More...
|
|
Array< UniquePtr< ISampler > > | createSamplers (const UInt32 &elements, const FilterMode &magFilter=FilterMode::Nearest, const FilterMode &minFilter=FilterMode::Nearest, const BorderMode &borderU=BorderMode::Repeat, const BorderMode &borderV=BorderMode::Repeat, const BorderMode &borderW=BorderMode::Repeat, const MipMapMode &mipMapMode=MipMapMode::Nearest, const Float &mipMapBias=0.f, const Float &maxLod=std::numeric_limits< Float >::max(), const Float &minLod=0.f, const Float &anisotropy=0.f) const |
| Creates an array of texture samplers, based on the layout . More...
|
|
template<typename TDescriptorLayout, typename TBuffer, typename TVertexBuffer, typename TIndexBuffer, typename TImage, typename TSampler>
requires rtti::implements<TDescriptorLayout,
IDescriptorLayout> && std::derived_from<TVertexBuffer,
VertexBuffer<typename TVertexBuffer::vertex_buffer_layout_type>> && std::derived_from<TIndexBuffer,
IndexBuffer<typename TIndexBuffer::index_buffer_layout_type>> && std::derived_from<TImage,
IImage> && std::derived_from<TBuffer,
IBuffer> && std::derived_from<TSampler,
ISampler>
class LiteFX::Rendering::GraphicsFactory< TDescriptorLayout, TBuffer, TVertexBuffer, TIndexBuffer, TImage, TSampler >
Describes a factory that creates objects for a GraphicsDevice.
Initial resource states depend on the provided BufferUsage. Staging and Dynamic resources are always initialized in ResourceState::GenericRead state, while Resource and Readback resources are initialized in ResourceState::CopyDestination state. Images (and attachments) can only be used as Resource, so they are always created as copy destination. Images require a transfer from a buffer, followed by an explicit Barrier into the state required by the shader. Attachments are implicitly transitioned at the beginning and end of a render pass, so you typically do not need to create an explicit barrier for them.
- Template Parameters
-
TDescriptorLayout | The type of the descriptor layout. Must implement IDescriptorLayout. |
TVertexBuffer | The type of the vertex buffer. Must implement VertexBuffer. |
TIndexBuffer | The type of the index buffer. Must implement IndexBuffer. |
TImage | The type of the image. Must inherit from IImage. |
TBuffer | The type of the buffer. Must inherit from IBuffer. |
TSampler | The type of the sampler. Must inherit from ISampler. |