LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::Rendering::IGraphicsFactory Class Referenceabstract

The interface for a graphics factory. More...

#include <rendering_api.hpp>

Inherits LiteFX::SharedObject.

Inherited by LiteFX::Rendering::GraphicsFactory< DirectX12DescriptorLayout, IDirectX12Buffer, IDirectX12VertexBuffer, IDirectX12IndexBuffer, IDirectX12Image, IDirectX12Sampler, DirectX12BottomLevelAccelerationStructure, DirectX12TopLevelAccelerationStructure >, LiteFX::Rendering::GraphicsFactory< VulkanDescriptorLayout, IVulkanBuffer, IVulkanVertexBuffer, IVulkanIndexBuffer, IVulkanImage, IVulkanSampler, VulkanBottomLevelAccelerationStructure, VulkanTopLevelAccelerationStructure >, and LiteFX::Rendering::GraphicsFactory< TDescriptorLayout, TBuffer, TVertexBuffer, TIndexBuffer, TImage, TSampler, TBLAS, TTLAS >.

Public Member Functions

 ~IGraphicsFactory () noexcept override=default
 
SharedPtr< IBuffercreateBuffer (BufferType type, ResourceHeap heap, size_t elementSize, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer of type type .
 
SharedPtr< IBuffercreateBuffer (const IDescriptorSetLayout &descriptorSet, UInt32 binding, ResourceHeap heap, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer that can be bound to a specific descriptor.
 
SharedPtr< IBuffercreateBuffer (const IDescriptorSetLayout &descriptorSet, UInt32 binding, ResourceHeap heap, UInt32 elementSize, UInt32 elements, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer that can be bound to a specific descriptor.
 
SharedPtr< IBuffercreateBuffer (const IPipeline &pipeline, UInt32 space, UInt32 binding, ResourceHeap heap, UInt32 elementSize, UInt32 elements, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer that can be bound to a descriptor of a specific descriptor set.
 
SharedPtr< IBuffercreateBuffer (const IPipeline &pipeline, UInt32 space, UInt32 binding, ResourceHeap heap, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer that can be bound to a descriptor of a specific descriptor set.
 
SharedPtr< IBuffercreateBuffer (const String &name, BufferType type, ResourceHeap heap, size_t elementSize, UInt32 elements, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer of type type .
 
SharedPtr< IBuffercreateBuffer (const String &name, const IDescriptorSetLayout &descriptorSet, UInt32 binding, ResourceHeap heap, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer that can be bound to a specific descriptor.
 
SharedPtr< IBuffercreateBuffer (const String &name, const IDescriptorSetLayout &descriptorSet, UInt32 binding, ResourceHeap heap, size_t elementSize, UInt32 elements, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer that can be bound to a specific descriptor.
 
SharedPtr< IBuffercreateBuffer (const String &name, const IPipeline &pipeline, UInt32 space, UInt32 binding, ResourceHeap heap, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer that can be bound to a descriptor of a specific descriptor set.
 
SharedPtr< IBuffercreateBuffer (const String &name, const IPipeline &pipeline, UInt32 space, UInt32 binding, ResourceHeap heap, size_t elementSize, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a buffer that can be bound to a descriptor of a specific descriptor set.
 
SharedPtr< IVertexBuffercreateVertexBuffer (const IVertexBufferLayout &layout, ResourceHeap heap, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a vertex buffer, based on the layout
 
SharedPtr< IVertexBuffercreateVertexBuffer (const String &name, const IVertexBufferLayout &layout, ResourceHeap heap, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a vertex buffer, based on the layout
 
SharedPtr< IIndexBuffercreateIndexBuffer (const IIndexBufferLayout &layout, ResourceHeap heap, UInt32 elements, ResourceUsage usage=ResourceUsage::Default) const
 Creates an index buffer, based on the layout .
 
SharedPtr< IIndexBuffercreateIndexBuffer (const String &name, const IIndexBufferLayout &layout, ResourceHeap heap, UInt32 elements, ResourceUsage usage=ResourceUsage::Default) const
 Creates an index buffer, based on the layout .
 
SharedPtr< IImagecreateTexture (Format format, const Size3d &size, ImageDimensions dimension=ImageDimensions::DIM_2, UInt32 levels=1, UInt32 layers=1, MultiSamplingLevel samples=MultiSamplingLevel::x1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a texture.
 
SharedPtr< IImagecreateTexture (const String &name, Format format, const Size3d &size, ImageDimensions dimension=ImageDimensions::DIM_2, UInt32 levels=1, UInt32 layers=1, MultiSamplingLevel samples=MultiSamplingLevel::x1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a texture.
 
Generator< SharedPtr< IImage > > createTextures (Format format, const Size3d &size, ImageDimensions dimension=ImageDimensions::DIM_2, UInt32 layers=1, UInt32 levels=1, MultiSamplingLevel samples=MultiSamplingLevel::x1, ResourceUsage usage=ResourceUsage::Default) const
 Creates a series of textures.
 
SharedPtr< ISamplercreateSampler (FilterMode magFilter=FilterMode::Nearest, FilterMode minFilter=FilterMode::Nearest, BorderMode borderU=BorderMode::Repeat, BorderMode borderV=BorderMode::Repeat, BorderMode borderW=BorderMode::Repeat, MipMapMode mipMapMode=MipMapMode::Nearest, Float mipMapBias=0.f, Float maxLod=std::numeric_limits< Float >::max(), Float minLod=0.f, Float anisotropy=0.f) const
 Creates a texture sampler.
 
SharedPtr< ISamplercreateSampler (const String &name, FilterMode magFilter=FilterMode::Nearest, FilterMode minFilter=FilterMode::Nearest, BorderMode borderU=BorderMode::Repeat, BorderMode borderV=BorderMode::Repeat, BorderMode borderW=BorderMode::Repeat, MipMapMode mipMapMode=MipMapMode::Nearest, Float mipMapBias=0.f, Float maxLod=std::numeric_limits< Float >::max(), Float minLod=0.f, Float anisotropy=0.f) const
 Creates a texture sampler.
 
Generator< SharedPtr< ISampler > > createSamplers (FilterMode magFilter=FilterMode::Nearest, FilterMode minFilter=FilterMode::Nearest, BorderMode borderU=BorderMode::Repeat, BorderMode borderV=BorderMode::Repeat, BorderMode borderW=BorderMode::Repeat, MipMapMode mipMapMode=MipMapMode::Nearest, Float mipMapBias=0.f, Float maxLod=std::numeric_limits< Float >::max(), Float minLod=0.f, Float anisotropy=0.f) const
 Creates a series of texture samplers.
 
UniquePtr< IBottomLevelAccelerationStructurecreateBottomLevelAccelerationStructure (AccelerationStructureFlags flags=AccelerationStructureFlags::None) const
 Creates a bottom-level acceleration structure.
 
UniquePtr< IBottomLevelAccelerationStructurecreateBottomLevelAccelerationStructure (StringView name, AccelerationStructureFlags flags=AccelerationStructureFlags::None) const
 Creates a bottom-level acceleration structure.
 
UniquePtr< ITopLevelAccelerationStructurecreateTopLevelAccelerationStructure (AccelerationStructureFlags flags=AccelerationStructureFlags::None) const
 Creates a top-level acceleration structure.
 
UniquePtr< ITopLevelAccelerationStructurecreateTopLevelAccelerationStructure (StringView name, AccelerationStructureFlags flags=AccelerationStructureFlags::None) const
 Creates a top-level acceleration structure.
 
- Public Member Functions inherited from LiteFX::SharedObject
virtual ~SharedObject () noexcept=default
 Destroys the shared object.
 
template<typename TSelf >
auto shared_from_this (this TSelf &&self) noexcept
 Returns a shared pointer to the current object instance.
 
template<typename TSelf >
auto weak_from_this (this TSelf &&self) noexcept -> WeakPtr< std::remove_reference_t< TSelf > >
 Returns a weak pointer to the current object instance.
 

Protected Member Functions

 IGraphicsFactory () noexcept=default
 
 IGraphicsFactory (IGraphicsFactory &&) noexcept=default
 
 IGraphicsFactory (const IGraphicsFactory &)=default
 
IGraphicsFactoryoperator= (const IGraphicsFactory &)=default
 
IGraphicsFactoryoperator= (IGraphicsFactory &&) noexcept=default
 
- Protected Member Functions inherited from LiteFX::SharedObject
 SharedObject () noexcept=default
 Initializes a new shared object.
 
 SharedObject (SharedObject &&) noexcept=default
 
 SharedObject (const SharedObject &)=default
 
SharedObjectoperator= (SharedObject &&) noexcept=default
 
SharedObjectoperator= (const SharedObject &)=default
 

Additional Inherited Members

- Static Protected Member Functions inherited from LiteFX::SharedObject
template<typename T , typename... TArgs>
static auto create (TArgs &&... args) -> SharedPtr< T >
 Generic factory method used to create instances of the shared object.
 

Detailed Description

The interface for a graphics factory.

Constructor & Destructor Documentation

◆ IGraphicsFactory() [1/3]

LiteFX::Rendering::IGraphicsFactory::IGraphicsFactory ( )
protecteddefaultnoexcept

◆ IGraphicsFactory() [2/3]

LiteFX::Rendering::IGraphicsFactory::IGraphicsFactory ( IGraphicsFactory && )
protecteddefaultnoexcept

◆ IGraphicsFactory() [3/3]

LiteFX::Rendering::IGraphicsFactory::IGraphicsFactory ( const IGraphicsFactory & )
protecteddefault

◆ ~IGraphicsFactory()

LiteFX::Rendering::IGraphicsFactory::~IGraphicsFactory ( )
overridedefaultnoexcept

Member Function Documentation

◆ createBottomLevelAccelerationStructure() [1/2]

UniquePtr< IBottomLevelAccelerationStructure > LiteFX::Rendering::IGraphicsFactory::createBottomLevelAccelerationStructure ( AccelerationStructureFlags flags = AccelerationStructureFlags::None) const
inline

Creates a bottom-level acceleration structure.

This method is only supported if the GraphicsDeviceFeature::RayTracing feature is enabled.

Parameters
flagsThe flags that define how the acceleration structure is built.
Returns
The bottom-level acceleration structure instance.
See also
IBottomLevelAccelerationStructure

◆ createBottomLevelAccelerationStructure() [2/2]

UniquePtr< IBottomLevelAccelerationStructure > LiteFX::Rendering::IGraphicsFactory::createBottomLevelAccelerationStructure ( StringView name,
AccelerationStructureFlags flags = AccelerationStructureFlags::None ) const
inline

Creates a bottom-level acceleration structure.

This method is only supported if the GraphicsDeviceFeature::RayTracing feature is enabled.

Parameters
nameThe name of the acceleration structure resource.
flagsThe flags that define how the acceleration structure is built.
Returns
The bottom-level acceleration structure instance.
See also
IBottomLevelAccelerationStructure

◆ createBuffer() [1/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( BufferType type,
ResourceHeap heap,
size_t elementSize,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer of type type .

Parameters
typeThe type of the buffer.
heapThe heap to allocate the buffer on.
elementSizeThe size of an element in the buffer (in bytes).
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createBuffer() [2/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( const IDescriptorSetLayout & descriptorSet,
UInt32 binding,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer that can be bound to a specific descriptor.

Parameters
descriptorSetThe layout of the descriptors parent descriptor set.
bindingThe binding point of the descriptor within the parent descriptor set.
heapThe heap to allocate the buffer on.
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createBuffer() [3/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( const IDescriptorSetLayout & descriptorSet,
UInt32 binding,
ResourceHeap heap,
UInt32 elementSize,
UInt32 elements,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer that can be bound to a specific descriptor.

Parameters
descriptorSetThe layout of the descriptors parent descriptor set.
bindingThe binding point of the descriptor within the parent descriptor set.
heapThe heap to allocate the buffer on.
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createBuffer() [4/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( const IPipeline & pipeline,
UInt32 space,
UInt32 binding,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer that can be bound to a descriptor of a specific descriptor set.

Parameters
pipelineThe pipeline that provides the descriptor set.
spaceThe space, the descriptor set is bound to.
bindingThe binding point of the descriptor within the parent descriptor set.
heapThe heap to allocate the buffer on.
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createBuffer() [5/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( const IPipeline & pipeline,
UInt32 space,
UInt32 binding,
ResourceHeap heap,
UInt32 elementSize,
UInt32 elements,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer that can be bound to a descriptor of a specific descriptor set.

Parameters
pipelineThe pipeline that provides the descriptor set.
spaceThe space, the descriptor set is bound to.
bindingThe binding point of the descriptor within the parent descriptor set.
heapThe heap to allocate the buffer on.
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createBuffer() [6/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( const String & name,
BufferType type,
ResourceHeap heap,
size_t elementSize,
UInt32 elements,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer of type type .

Parameters
nameThe name of the buffer.
typeThe type of the buffer.
heapThe heap to allocate the buffer on.
elementSizeThe size of an element in the buffer (in bytes).
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createBuffer() [7/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( const String & name,
const IDescriptorSetLayout & descriptorSet,
UInt32 binding,
ResourceHeap heap,
size_t elementSize,
UInt32 elements,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer that can be bound to a specific descriptor.

Parameters
nameThe name of the buffer.
descriptorSetThe layout of the descriptors parent descriptor set.
bindingThe binding point of the descriptor within the parent descriptor set.
heapThe heap to allocate the buffer on.
elementSizeThe size of an element in the buffer (in bytes).
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createBuffer() [8/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( const String & name,
const IDescriptorSetLayout & descriptorSet,
UInt32 binding,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer that can be bound to a specific descriptor.

Parameters
nameThe name of the buffer.
descriptorSetThe layout of the descriptors parent descriptor set.
bindingThe binding point of the descriptor within the parent descriptor set.
heapThe heap to allocate the buffer on.
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createBuffer() [9/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( const String & name,
const IPipeline & pipeline,
UInt32 space,
UInt32 binding,
ResourceHeap heap,
size_t elementSize,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer that can be bound to a descriptor of a specific descriptor set.

Parameters
nameThe name of the buffer.
pipelineThe pipeline that provides the descriptor set.
spaceThe space, the descriptor set is bound to.
bindingThe binding point of the descriptor within the parent descriptor set.
heapThe heap to allocate the buffer on.
elementSizeThe size of an element in the buffer (in bytes).
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createBuffer() [10/10]

SharedPtr< IBuffer > LiteFX::Rendering::IGraphicsFactory::createBuffer ( const String & name,
const IPipeline & pipeline,
UInt32 space,
UInt32 binding,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a buffer that can be bound to a descriptor of a specific descriptor set.

Parameters
nameThe name of the buffer.
pipelineThe pipeline that provides the descriptor set.
spaceThe space, the descriptor set is bound to.
bindingThe binding point of the descriptor within the parent descriptor set.
heapThe heap to allocate the buffer on.
elementsThe number of elements in the buffer (in case the buffer is an array).
usageThe intended usage for the buffer.
Returns
The instance of the buffer.

◆ createIndexBuffer() [1/2]

SharedPtr< IIndexBuffer > LiteFX::Rendering::IGraphicsFactory::createIndexBuffer ( const IIndexBufferLayout & layout,
ResourceHeap heap,
UInt32 elements,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates an index buffer, based on the layout .

An index buffer can be used by different RenderPipelines, as long as they share a common input assembler state.

The size of the buffer is computed from the element size index buffer layout, times the number of elements given by the elements parameter.

Parameters
layoutThe layout of the index buffer.
heapThe heap to allocate the buffer on.
elementsThe number of elements within the vertex buffer (i.e. the number of indices).
usageThe intended usage for the buffer.
Returns
The instance of the index buffer.

◆ createIndexBuffer() [2/2]

SharedPtr< IIndexBuffer > LiteFX::Rendering::IGraphicsFactory::createIndexBuffer ( const String & name,
const IIndexBufferLayout & layout,
ResourceHeap heap,
UInt32 elements,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates an index buffer, based on the layout .

An index buffer can be used by different RenderPipelines, as long as they share a common input assembler state.

The size of the buffer is computed from the element size index buffer layout, times the number of elements given by the elements parameter.

Parameters
nameThe name of the buffer.
layoutThe layout of the index buffer.
heapThe heap to allocate the buffer on.
usageThe intended usage for the buffer.
elementsThe number of elements within the vertex buffer (i.e. the number of indices).
Returns
The instance of the index buffer.

◆ createSampler() [1/2]

SharedPtr< ISampler > LiteFX::Rendering::IGraphicsFactory::createSampler ( const String & name,
FilterMode magFilter = FilterMode::Nearest,
FilterMode minFilter = FilterMode::Nearest,
BorderMode borderU = BorderMode::Repeat,
BorderMode borderV = BorderMode::Repeat,
BorderMode borderW = BorderMode::Repeat,
MipMapMode mipMapMode = MipMapMode::Nearest,
Float mipMapBias = 0.f,
Float maxLod = std::numeric_limits<Float>::max(),
Float minLod = 0.f,
Float anisotropy = 0.f ) const
inline

Creates a texture sampler.

Parameters
nameThe name of the sampler.
magFilterThe filter operation used for magnifying.
minFilterThe filter operation used for minifying.
borderUThe border mode along the U-axis.
borderVThe border mode along the V-axis.
borderWThe border mode along the W-axis.
mipMapModeThe mip map mode.
mipMapBiasThe mip map bias.
maxLodThe maximum level of detail value.
minLodThe minimum level of detail value.
anisotropyThe level of anisotropic filtering.
Returns
The instance of the sampler.
See also
createSamplers

◆ createSampler() [2/2]

SharedPtr< ISampler > LiteFX::Rendering::IGraphicsFactory::createSampler ( FilterMode magFilter = FilterMode::Nearest,
FilterMode minFilter = FilterMode::Nearest,
BorderMode borderU = BorderMode::Repeat,
BorderMode borderV = BorderMode::Repeat,
BorderMode borderW = BorderMode::Repeat,
MipMapMode mipMapMode = MipMapMode::Nearest,
Float mipMapBias = 0.f,
Float maxLod = std::numeric_limits<Float>::max(),
Float minLod = 0.f,
Float anisotropy = 0.f ) const
inline

Creates a texture sampler.

Parameters
magFilterThe filter operation used for magnifying.
minFilterThe filter operation used for minifying.
borderUThe border mode along the U-axis.
borderVThe border mode along the V-axis.
borderWThe border mode along the W-axis.
mipMapModeThe mip map mode.
mipMapBiasThe mip map bias.
maxLodThe maximum level of detail value.
minLodThe minimum level of detail value.
anisotropyThe level of anisotropic filtering.
Returns
The instance of the sampler.
See also
createSamplers

◆ createSamplers()

Generator< SharedPtr< ISampler > > LiteFX::Rendering::IGraphicsFactory::createSamplers ( FilterMode magFilter = FilterMode::Nearest,
FilterMode minFilter = FilterMode::Nearest,
BorderMode borderU = BorderMode::Repeat,
BorderMode borderV = BorderMode::Repeat,
BorderMode borderW = BorderMode::Repeat,
MipMapMode mipMapMode = MipMapMode::Nearest,
Float mipMapBias = 0.f,
Float maxLod = std::numeric_limits<Float>::max(),
Float minLod = 0.f,
Float anisotropy = 0.f ) const
inline

Creates a series of texture samplers.

Parameters
magFilterThe filter operation used for magnifying.
minFilterThe filter operation used for minifying.
borderUThe border mode along the U-axis.
borderVThe border mode along the V-axis.
borderWThe border mode along the W-axis.
mipMapModeThe mip map mode.
mipMapBiasThe mip map bias.
maxLodThe maximum level of detail value.
minLodThe minimum level of detail value.
anisotropyThe level of anisotropic filtering.
Returns
A generator for sampler instances.
See also
createSampler

◆ createTexture() [1/2]

SharedPtr< IImage > LiteFX::Rendering::IGraphicsFactory::createTexture ( const String & name,
Format format,
const Size3d & size,
ImageDimensions dimension = ImageDimensions::DIM_2,
UInt32 levels = 1,
UInt32 layers = 1,
MultiSamplingLevel samples = MultiSamplingLevel::x1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a texture.

A texture in LiteFX is always backed by GPU-only visible memory and thus can only be transferred to/from. Thus you typically have to create a buffer using createBuffer first that holds the actual image bytes. You than can transfer/copy the contents into the texture.

Parameters
nameThe name of the texture image.
formatThe format of the texture image.
sizeThe dimensions of the texture.
dimensionThe dimensionality of the texture.
layersThe number of layers (slices) in this texture.
levelsThe number of mip map levels of the texture.
samplesThe number of samples, the texture should be sampled with.
usageThe intended usage for the buffer.
Returns
The instance of the texture.
See also
createTextures

◆ createTexture() [2/2]

SharedPtr< IImage > LiteFX::Rendering::IGraphicsFactory::createTexture ( Format format,
const Size3d & size,
ImageDimensions dimension = ImageDimensions::DIM_2,
UInt32 levels = 1,
UInt32 layers = 1,
MultiSamplingLevel samples = MultiSamplingLevel::x1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a texture.

A texture in LiteFX is always backed by GPU-only visible memory and thus can only be transferred to/from. Thus you typically have to create a buffer using createBuffer first that holds the actual image bytes. You than can transfer/copy the contents into the texture.

Parameters
formatThe format of the texture image.
sizeThe dimensions of the texture.
dimensionThe dimensionality of the texture.
layersThe number of layers (slices) in this texture.
levelsThe number of mip map levels of the texture.
samplesThe number of samples, the texture should be sampled with.
usageThe intended usage for the buffer.
Returns
The instance of the texture.
See also
createTextures

◆ createTextures()

Generator< SharedPtr< IImage > > LiteFX::Rendering::IGraphicsFactory::createTextures ( Format format,
const Size3d & size,
ImageDimensions dimension = ImageDimensions::DIM_2,
UInt32 layers = 1,
UInt32 levels = 1,
MultiSamplingLevel samples = MultiSamplingLevel::x1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a series of textures.

Parameters
formatThe format of the texture images.
sizeThe dimensions of the textures.
layersThe number of layers (slices) in this texture.
levelsThe number of mip map levels of the textures.
samplesThe number of samples, the textures should be sampled with.
usageThe intended usage for the buffer.
Returns
A generator for texture instances.
See also
createTexture

◆ createTopLevelAccelerationStructure() [1/2]

UniquePtr< ITopLevelAccelerationStructure > LiteFX::Rendering::IGraphicsFactory::createTopLevelAccelerationStructure ( AccelerationStructureFlags flags = AccelerationStructureFlags::None) const
inline

Creates a top-level acceleration structure.

This method is only supported if the GraphicsDeviceFeature::RayTracing feature is enabled.

Parameters
flagsThe flags that define how the acceleration structure is built.
Returns
The top-level acceleration structure instance.
See also
ITopLevelAccelerationStructure

◆ createTopLevelAccelerationStructure() [2/2]

UniquePtr< ITopLevelAccelerationStructure > LiteFX::Rendering::IGraphicsFactory::createTopLevelAccelerationStructure ( StringView name,
AccelerationStructureFlags flags = AccelerationStructureFlags::None ) const
inline

Creates a top-level acceleration structure.

This method is only supported if the GraphicsDeviceFeature::RayTracing feature is enabled.

Parameters
nameThe name of the acceleration structure resource.
flagsThe flags that define how the acceleration structure is built.
Returns
The top-level acceleration structure instance.
See also
ITopLevelAccelerationStructure

◆ createVertexBuffer() [1/2]

SharedPtr< IVertexBuffer > LiteFX::Rendering::IGraphicsFactory::createVertexBuffer ( const IVertexBufferLayout & layout,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a vertex buffer, based on the layout

A vertex buffer can be used by different RenderPipelines, as long as they share a common input assembler state.

The size of the buffer is computed from the element size vertex buffer layout, times the number of elements given by the elements parameter.

Parameters
layoutThe layout of the vertex buffer.
heapThe heap to allocate the buffer on.
elementsThe number of elements within the vertex buffer (i.e. the number of vertices).
usageThe intended usage for the buffer.
Returns
The instance of the vertex buffer.

◆ createVertexBuffer() [2/2]

SharedPtr< IVertexBuffer > LiteFX::Rendering::IGraphicsFactory::createVertexBuffer ( const String & name,
const IVertexBufferLayout & layout,
ResourceHeap heap,
UInt32 elements = 1,
ResourceUsage usage = ResourceUsage::Default ) const
inline

Creates a vertex buffer, based on the layout

A vertex buffer can be used by different RenderPipelines, as long as they share a common input assembler state.

The size of the buffer is computed from the element size vertex buffer layout, times the number of elements given by the elements parameter.

Parameters
nameThe name of the buffer.
layoutThe layout of the vertex buffer.
heapThe heap to allocate the buffer on.
elementsThe number of elements within the vertex buffer (i.e. the number of vertices).
usageThe intended usage for the buffer.
Returns
The instance of the vertex buffer.

◆ operator=() [1/2]

IGraphicsFactory & LiteFX::Rendering::IGraphicsFactory::operator= ( const IGraphicsFactory & )
protecteddefault

◆ operator=() [2/2]

IGraphicsFactory & LiteFX::Rendering::IGraphicsFactory::operator= ( IGraphicsFactory && )
protecteddefaultnoexcept