LiteFX 0.4.1.2025
Computer Graphics Engine
|
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< IBuffer > | createBuffer (BufferType type, ResourceHeap heap, size_t elementSize, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const |
Creates a buffer of type type . | |
SharedPtr< IBuffer > | createBuffer (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< IBuffer > | createBuffer (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< IBuffer > | createBuffer (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< IBuffer > | createBuffer (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< IBuffer > | createBuffer (const String &name, BufferType type, ResourceHeap heap, size_t elementSize, UInt32 elements, ResourceUsage usage=ResourceUsage::Default) const |
Creates a buffer of type type . | |
SharedPtr< IBuffer > | createBuffer (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< IBuffer > | createBuffer (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< IBuffer > | createBuffer (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< IBuffer > | createBuffer (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< IVertexBuffer > | createVertexBuffer (const IVertexBufferLayout &layout, ResourceHeap heap, UInt32 elements=1, ResourceUsage usage=ResourceUsage::Default) const |
Creates a vertex buffer, based on the layout | |
SharedPtr< IVertexBuffer > | createVertexBuffer (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< IIndexBuffer > | createIndexBuffer (const IIndexBufferLayout &layout, ResourceHeap heap, UInt32 elements, ResourceUsage usage=ResourceUsage::Default) const |
Creates an index buffer, based on the layout . | |
SharedPtr< IIndexBuffer > | createIndexBuffer (const String &name, const IIndexBufferLayout &layout, ResourceHeap heap, UInt32 elements, ResourceUsage usage=ResourceUsage::Default) const |
Creates an index buffer, based on the layout . | |
SharedPtr< IImage > | 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 |
Creates a texture. | |
SharedPtr< IImage > | 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 |
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< ISampler > | 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 |
Creates a texture sampler. | |
SharedPtr< ISampler > | 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 |
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< IBottomLevelAccelerationStructure > | createBottomLevelAccelerationStructure (AccelerationStructureFlags flags=AccelerationStructureFlags::None) const |
Creates a bottom-level acceleration structure. | |
UniquePtr< IBottomLevelAccelerationStructure > | createBottomLevelAccelerationStructure (StringView name, AccelerationStructureFlags flags=AccelerationStructureFlags::None) const |
Creates a bottom-level acceleration structure. | |
UniquePtr< ITopLevelAccelerationStructure > | createTopLevelAccelerationStructure (AccelerationStructureFlags flags=AccelerationStructureFlags::None) const |
Creates a top-level acceleration structure. | |
UniquePtr< ITopLevelAccelerationStructure > | createTopLevelAccelerationStructure (StringView name, AccelerationStructureFlags flags=AccelerationStructureFlags::None) const |
Creates a top-level acceleration structure. | |
![]() | |
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 | |
IGraphicsFactory & | operator= (const IGraphicsFactory &)=default |
IGraphicsFactory & | operator= (IGraphicsFactory &&) noexcept=default |
![]() | |
SharedObject () noexcept=default | |
Initializes a new shared object. | |
SharedObject (SharedObject &&) noexcept=default | |
SharedObject (const SharedObject &)=default | |
SharedObject & | operator= (SharedObject &&) noexcept=default |
SharedObject & | operator= (const SharedObject &)=default |
Additional Inherited Members | |
![]() | |
template<typename T , typename... TArgs> | |
static auto | create (TArgs &&... args) -> SharedPtr< T > |
Generic factory method used to create instances of the shared object. | |
The interface for a graphics factory.
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
protecteddefault |
|
overridedefaultnoexcept |
|
inline |
Creates a bottom-level acceleration structure.
This method is only supported if the GraphicsDeviceFeature::RayTracing feature is enabled.
flags | The flags that define how the acceleration structure is built. |
|
inline |
Creates a bottom-level acceleration structure.
This method is only supported if the GraphicsDeviceFeature::RayTracing feature is enabled.
name | The name of the acceleration structure resource. |
flags | The flags that define how the acceleration structure is built. |
|
inline |
Creates a buffer of type type .
type | The type of the buffer. |
heap | The heap to allocate the buffer on. |
elementSize | The size of an element in the buffer (in bytes). |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
inline |
Creates a buffer that can be bound to a specific descriptor.
descriptorSet | The layout of the descriptors parent descriptor set. |
binding | The binding point of the descriptor within the parent descriptor set. |
heap | The heap to allocate the buffer on. |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
inline |
Creates a buffer that can be bound to a specific descriptor.
descriptorSet | The layout of the descriptors parent descriptor set. |
binding | The binding point of the descriptor within the parent descriptor set. |
heap | The heap to allocate the buffer on. |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
inline |
Creates a buffer that can be bound to a descriptor of a specific descriptor set.
pipeline | The pipeline that provides the descriptor set. |
space | The space, the descriptor set is bound to. |
binding | The binding point of the descriptor within the parent descriptor set. |
heap | The heap to allocate the buffer on. |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
inline |
Creates a buffer that can be bound to a descriptor of a specific descriptor set.
pipeline | The pipeline that provides the descriptor set. |
space | The space, the descriptor set is bound to. |
binding | The binding point of the descriptor within the parent descriptor set. |
heap | The heap to allocate the buffer on. |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
inline |
Creates a buffer of type type .
name | The name of the buffer. |
type | The type of the buffer. |
heap | The heap to allocate the buffer on. |
elementSize | The size of an element in the buffer (in bytes). |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
inline |
Creates a buffer that can be bound to a specific descriptor.
name | The name of the buffer. |
descriptorSet | The layout of the descriptors parent descriptor set. |
binding | The binding point of the descriptor within the parent descriptor set. |
heap | The heap to allocate the buffer on. |
elementSize | The size of an element in the buffer (in bytes). |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
inline |
Creates a buffer that can be bound to a specific descriptor.
name | The name of the buffer. |
descriptorSet | The layout of the descriptors parent descriptor set. |
binding | The binding point of the descriptor within the parent descriptor set. |
heap | The heap to allocate the buffer on. |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
inline |
Creates a buffer that can be bound to a descriptor of a specific descriptor set.
name | The name of the buffer. |
pipeline | The pipeline that provides the descriptor set. |
space | The space, the descriptor set is bound to. |
binding | The binding point of the descriptor within the parent descriptor set. |
heap | The heap to allocate the buffer on. |
elementSize | The size of an element in the buffer (in bytes). |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
inline |
Creates a buffer that can be bound to a descriptor of a specific descriptor set.
name | The name of the buffer. |
pipeline | The pipeline that provides the descriptor set. |
space | The space, the descriptor set is bound to. |
binding | The binding point of the descriptor within the parent descriptor set. |
heap | The heap to allocate the buffer on. |
elements | The number of elements in the buffer (in case the buffer is an array). |
usage | The intended usage for the buffer. |
|
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.
layout | The layout of the index buffer. |
heap | The heap to allocate the buffer on. |
elements | The number of elements within the vertex buffer (i.e. the number of indices). |
usage | The intended usage for the buffer. |
|
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.
name | The name of the buffer. |
layout | The layout of the index buffer. |
heap | The heap to allocate the buffer on. |
usage | The intended usage for the buffer. |
elements | The number of elements within the vertex buffer (i.e. the number of indices). |
|
inline |
Creates a texture sampler.
name | The name of the sampler. |
magFilter | The filter operation used for magnifying. |
minFilter | The filter operation used for minifying. |
borderU | The border mode along the U-axis. |
borderV | The border mode along the V-axis. |
borderW | The border mode along the W-axis. |
mipMapMode | The mip map mode. |
mipMapBias | The mip map bias. |
maxLod | The maximum level of detail value. |
minLod | The minimum level of detail value. |
anisotropy | The level of anisotropic filtering. |
|
inline |
Creates a texture sampler.
magFilter | The filter operation used for magnifying. |
minFilter | The filter operation used for minifying. |
borderU | The border mode along the U-axis. |
borderV | The border mode along the V-axis. |
borderW | The border mode along the W-axis. |
mipMapMode | The mip map mode. |
mipMapBias | The mip map bias. |
maxLod | The maximum level of detail value. |
minLod | The minimum level of detail value. |
anisotropy | The level of anisotropic filtering. |
|
inline |
Creates a series of texture samplers.
magFilter | The filter operation used for magnifying. |
minFilter | The filter operation used for minifying. |
borderU | The border mode along the U-axis. |
borderV | The border mode along the V-axis. |
borderW | The border mode along the W-axis. |
mipMapMode | The mip map mode. |
mipMapBias | The mip map bias. |
maxLod | The maximum level of detail value. |
minLod | The minimum level of detail value. |
anisotropy | The level of anisotropic filtering. |
|
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.
name | The name of the texture image. |
format | The format of the texture image. |
size | The dimensions of the texture. |
dimension | The dimensionality of the texture. |
layers | The number of layers (slices) in this texture. |
levels | The number of mip map levels of the texture. |
samples | The number of samples, the texture should be sampled with. |
usage | The intended usage for the buffer. |
|
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.
format | The format of the texture image. |
size | The dimensions of the texture. |
dimension | The dimensionality of the texture. |
layers | The number of layers (slices) in this texture. |
levels | The number of mip map levels of the texture. |
samples | The number of samples, the texture should be sampled with. |
usage | The intended usage for the buffer. |
|
inline |
Creates a series of textures.
format | The format of the texture images. |
size | The dimensions of the textures. |
layers | The number of layers (slices) in this texture. |
levels | The number of mip map levels of the textures. |
samples | The number of samples, the textures should be sampled with. |
usage | The intended usage for the buffer. |
|
inline |
Creates a top-level acceleration structure.
This method is only supported if the GraphicsDeviceFeature::RayTracing feature is enabled.
flags | The flags that define how the acceleration structure is built. |
|
inline |
Creates a top-level acceleration structure.
This method is only supported if the GraphicsDeviceFeature::RayTracing feature is enabled.
name | The name of the acceleration structure resource. |
flags | The flags that define how the acceleration structure is built. |
|
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.
layout | The layout of the vertex buffer. |
heap | The heap to allocate the buffer on. |
elements | The number of elements within the vertex buffer (i.e. the number of vertices). |
usage | The intended usage for the buffer. |
|
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.
name | The name of the buffer. |
layout | The layout of the vertex buffer. |
heap | The heap to allocate the buffer on. |
elements | The number of elements within the vertex buffer (i.e. the number of vertices). |
usage | The intended usage for the buffer. |
|
protecteddefault |
|
protecteddefaultnoexcept |