LiteFX 0.3.1.2022
Computer Graphics Engine
|
The interface for a graphics factory. More...
#include <rendering_api.hpp>
Inherited by LiteFX::Rendering::GraphicsFactory< DirectX12DescriptorLayout, IDirectX12Buffer, IDirectX12VertexBuffer, IDirectX12IndexBuffer, IDirectX12Image, IDirectX12Sampler >, LiteFX::Rendering::GraphicsFactory< VulkanDescriptorLayout, IVulkanBuffer, IVulkanVertexBuffer, IVulkanIndexBuffer, IVulkanImage, IVulkanSampler >, and LiteFX::Rendering::GraphicsFactory< TDescriptorLayout, TBuffer, TVertexBuffer, TIndexBuffer, TImage, TSampler >.
Public Member Functions | |
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... | |
The interface for a graphics factory.
|
virtualdefaultnoexcept |
|
inline |
Creates an image that is used as render target attachment.
format | The format of the image. |
size | The extent of the image. |
samples | The number of samples, the image should be sampled with. |
|
inline |
Creates an image that is used as render target attachment.
name | The name of the image. |
format | The format of the image. |
size | The extent of the image. |
samples | The number of samples, the image should be sampled with. |
|
inline |
Creates a buffer of type type .
type | The type of the buffer. |
usage | The buffer usage. |
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). |
allowWrite | Allows the resource to be bound to a read/write descriptor. |
|
inline |
Creates a buffer of type type .
name | The name of the buffer. |
type | The type of the buffer. |
usage | The buffer usage. |
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). |
allowWrite | Allows the resource to be bound to a read/write descriptor. |
|
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. |
usage | The buffer usage. |
elements | The number of elements within the vertex buffer (i.e. the number of indices). |
|
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. |
usage | The buffer usage. |
elements | The number of elements within the vertex buffer (i.e. the number of indices). |
|
inline |
Creates a texture sampler, based on the layout .
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, based on the layout .
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 an array of texture samplers, based on the layout .
elements | The number of samplers to create. |
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, based on the layout .
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. |
allowWrite | Allows the resource to be bound to a read/write descriptor. |
|
inline |
Creates a texture, based on the layout .
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. |
allowWrite | Allows the resource to be bound to a read/write descriptor. |
|
inline |
Creates an array of textures, based on the layout .
layout | The layout of the textures. |
elements | The number of textures to create. |
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. |
allowWrite | Allows the resource to be bound to a read/write descriptor. |
|
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. |
usage | The buffer usage. |
elements | The number of elements within the vertex buffer (i.e. the number of vertices). |
|
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. |
usage | The buffer usage. |
elements | The number of elements within the vertex buffer (i.e. the number of vertices). |