Skip to content

LiteFX::Rendering::GraphicsFactory

Describes a factory that creates objects for a GraphicsDevice.

Synopsis

Declared in <litefx/rendering.hpp>

template<
    typename TDescriptorLayout,
    typename TBuffer,
    typename TVertexBuffer,
    typename TIndexBuffer,
    typename TImage,
    typename TSampler,
    typename TBLAS,
    typename TTLAS>
requires meta::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> &&
        std::derived_from<TBLAS, IBottomLevelAccelerationStructure> &&
        std::derived_from<TTLAS, ITopLevelAccelerationStructure>
class GraphicsFactory
    : public IGraphicsFactory

Base Classes

NameDescription
IGraphicsFactoryThe interface for a graphics factory.

Type Aliases

Member Functions

NameDescription
~GraphicsFactory [destructor] [virtual]Destructor
allocate allocate overloads
beginDefragmentation [virtual]Starts a defragmentation process for the resources allocated from the factory.
beginDefragmentationPass [virtual]Starts a new defragmentation pass.
canAlias [virtual]Checks if the resources described by allocationInfos can be overlapped.
createAllocator [virtual]Creates a virtual allocator that can be used to manage allocation from a custom block of memory.
createBottomLevelAccelerationStructure Creates a bottom-level acceleration structure.
createBuffer createBuffer overloads
createIndexBuffer Creates an index buffer, based on the layout.
createSampler Creates a texture sampler.
createSamplers [virtual]Creates a series of texture samplers.
createTexture Creates a texture.
createTextures [virtual]Creates a series of textures.
createTopLevelAccelerationStructure Creates a top-level acceleration structure.
createVertexBuffer Creates a vertex buffer, based on the layout.
detailedMemoryStatistics [virtual]Returns detailed memory statistics.
endDefragmentationPass [virtual]Ends a defragmentation pass.
memoryStatistics [virtual]Returns an array of objects, that contain information about the current memory usage and available memory for a memory heap.
shared_from_this Returns a shared pointer to the current object instance.
supportsResizableBaseAddressRegister [virtual]Returns true, if the GPU supports resizable base address register (ReBAR) and false otherwise.
tryCreateBuffer tryCreateBuffer overloads
tryCreateIndexBuffer Tries to create an index buffer, based on the layout.
tryCreateTexture Tries to create a texture.
tryCreateVertexBuffer Tries to create a vertex buffer, based on the layout.
weak_from_this Returns a weak pointer to the current object instance.

Using Declarations

Protected Types

NameDescription
Allocator An allocator used to allocate the shared object.

Protected Member Functions

NameDescription
GraphicsFactory [constructor]Constructors
operator= Assignment operators

Protected Static Member Functions

NameDescription
create Generic factory method used to create instances of the shared object.

Template Parameters

NameDescription
TDescriptorLayoutThe type of the descriptor layout. Must implement IDescriptorLayout.
TVertexBufferThe type of the vertex buffer. Must implement VertexBuffer.
TIndexBufferThe type of the index buffer. Must implement IndexBuffer.
TImageThe type of the image. Must inherit from IImage.
TBufferThe type of the buffer. Must inherit from IBuffer.
TSamplerThe type of the sampler. Must inherit from ISampler.
TBLASThe type of the bottom-level acceleration structure. Must implement IBottomLevelAccelerationStructure.
TTLASThe type of the top-level acceleration structure. Must implement ITopLevelAccelerationStructure.

Derived Classes

NameDescription
DirectX12GraphicsFactory A graphics factory that produces objects for a DirectX12Device.
VulkanGraphicsFactory A graphics factory that produces objects for a VulkanDevice.