SPARK
0.1.0
A general purpose game engine written in C++.
|
Public Member Functions | |
std::unique_ptr< IBuffer > | createBuffer (BufferType type, BufferUsage usage, std::size_t element_size, unsigned elements=1, bool allow_write=false) const |
Creates a IBuffer of type type . | |
std::unique_ptr< IBuffer > | createBuffer (const std::string &name, BufferType type, BufferUsage usage, std::size_t element_size, unsigned elements, bool allow_write=false) const |
Creates a IBuffer of type type . | |
std::unique_ptr< IBuffer > | createBuffer (const IDescriptorSetLayout &descriptor_set, unsigned binding, BufferUsage usage, unsigned elements=1, bool allow_write=false) const |
Creates a IBuffer that can be bound to the specified descriptor_set and binding . | |
std::unique_ptr< IBuffer > | createBuffer (const std::string &name, const IDescriptorSetLayout &descriptor_set, unsigned binding, BufferUsage usage, unsigned elements=1, bool allow_write=false) const |
Creates a IBuffer that can be bound to the specified descriptor_set and binding . | |
std::unique_ptr< IBuffer > | createBuffer (const IDescriptorSetLayout &descriptor_set, unsigned binding, BufferUsage usage, std::size_t element_size, unsigned elements, bool allow_write=false) const |
Creates a IBuffer that can be bound to the specified descriptor_set and binding . | |
std::unique_ptr< IBuffer > | createBuffer (const std::string &name, const IDescriptorSetLayout &descriptor_set, unsigned binding, BufferUsage usage, std::size_t element_size, unsigned elements, bool allow_write=false) const |
Creates a IBuffer that can be bound to a descriptor set of the specified pipeline , space and binding . | |
std::unique_ptr< IBuffer > | createBuffer (const IPipeline &pipeline, unsigned space, unsigned binding, BufferUsage usage, unsigned elements=1, bool allow_write=false) const |
Creates a IBuffer that can be bound to a descriptor set of the specified pipeline , space and binding . | |
std::unique_ptr< IBuffer > | createBuffer (const std::string &name, const IPipeline &pipeline, unsigned space, unsigned binding, BufferUsage usage, unsigned elements=1, bool allow_write=false) const |
Creates a IBuffer that can be bound to the specified descriptor_set and binding . | |
std::unique_ptr< IBuffer > | createBuffer (const IPipeline &pipeline, unsigned space, unsigned binding, BufferUsage usage, std::size_t element_size, unsigned elements, bool allow_write=false) const |
Creates a IBuffer that can be bound to a descriptor set of the specified pipeline , space and binding . | |
std::unique_ptr< IBuffer > | createBuffer (const std::string &name, const IPipeline &pipeline, unsigned space, unsigned binding, BufferUsage usage, std::size_t element_size, unsigned elements=1, bool allow_write=false) const |
Creates a IBuffer that can be bound to a descriptor set of the specified pipeline , space and binding . | |
std::unique_ptr< IVertexBuffer > | createVertexBuffer (const IVertexBufferLayout &layout, BufferUsage usage, unsigned elements=1) const |
Creates a IVertexBuffer based on layout . | |
std::unique_ptr< IVertexBuffer > | createVertexBuffer (const std::string &name, const IVertexBufferLayout &layout, BufferUsage usage, unsigned elements=1) const |
Creates a IVertexBuffer based on layout . | |
std::unique_ptr< IIndexBuffer > | createIndexBuffer (const IIndexBufferLayout &layout, BufferUsage usage, unsigned elements) const |
Creates a IVertexBuffer based on layout . | |
std::unique_ptr< IIndexBuffer > | createIndexBuffer (const std::string &name, const IIndexBufferLayout &layout, BufferUsage usage, unsigned elements) const |
Creates a IVertexBuffer based on layout . | |
std::unique_ptr< IImage > | createAttachment (Format format, const math::Vector2< unsigned > &size, MultiSamplingLevel samples=MultiSamplingLevel::X1) const |
Creates an Image used as a render target attachment. | |
std::unique_ptr< IImage > | createAttachment (const std::string &name, Format format, const math::Vector2< unsigned > &size, MultiSamplingLevel samples=MultiSamplingLevel::X1) const |
Creates an Image used as a render target attachment. | |
std::unique_ptr< IImage > | createTexture (Format format, const math::Vector3< unsigned > &size, ImageDimensions dimension=ImageDimensions::DIM_2, unsigned levels=1, unsigned layers=1, MultiSamplingLevel samples=MultiSamplingLevel::X1, bool allow_write=false) const |
Creates a texture . | |
std::unique_ptr< IImage > | createTexture (const std::string &name, Format format, const math::Vector3< unsigned > &size, ImageDimensions dimension=ImageDimensions::DIM_2, unsigned levels=1, unsigned layers=1, MultiSamplingLevel samples=MultiSamplingLevel::X1, bool allow_write=false) const |
Creates a texture . | |
std::vector< std::unique_ptr< IImage > > | createTextures (std::size_t elements, Format format, const math::Vector3< unsigned > &size, ImageDimensions dimension=ImageDimensions::DIM_2, unsigned layers=1, unsigned levels=1, MultiSamplingLevel samples=MultiSamplingLevel::X1, bool allow_write=false) const |
Creates an array of textures . | |
std::unique_ptr< ISampler > | createSampler (FilterMode mag_filter=FilterMode::Nearest, FilterMode min_filter=FilterMode::Nearest, BorderMode border_u=BorderMode::Repeat, BorderMode border_v=BorderMode::Repeat, BorderMode border_w=BorderMode::Repeat, MipMapMode mip_map_mode=MipMapMode::Nearest, float mip_map_bias=0.f, float max_lod=std::numeric_limits< float >::max(), float min_lod=0.f, float anisotropy=0.f) const |
Creates a texture sampler . | |
std::unique_ptr< ISampler > | createSampler (const std::string &name, FilterMode mag_filter=FilterMode::Nearest, FilterMode min_filter=FilterMode::Nearest, BorderMode border_u=BorderMode::Repeat, BorderMode border_v=BorderMode::Repeat, BorderMode border_w=BorderMode::Repeat, MipMapMode mip_map_mode=MipMapMode::Nearest, float mip_map_bias=0.f, float max_lod=std::numeric_limits< float >::max(), float min_lod=0.f, float anisotropy=0.f) const |
Creates a texture sampler . | |
std::vector< std::unique_ptr< ISampler > > | createSamplers (std::size_t elements, FilterMode mag_filter=FilterMode::Nearest, FilterMode min_filter=FilterMode::Nearest, BorderMode border_u=BorderMode::Repeat, BorderMode border_v=BorderMode::Repeat, BorderMode border_w=BorderMode::Repeat, MipMapMode mip_map_mode=MipMapMode::Nearest, float mip_map_bias=0.f, float max_lod=std::numeric_limits< float >::max(), float min_lod=0.f, float anisotropy=0.f) const |
Creates an array of texture samplers . | |
|
inlinenodiscard |
Creates an Image used as a render target attachment.
name | The image name. |
format | The image format. |
size | The extent of the image. |
samples | The number of samples the image should be sampled with. |
|
inlinenodiscard |
Creates an Image used as a render target attachment.
format | The image format. |
size | The extent of the image. |
samples | The number of samples the image should be sampled with. |
|
inlinenodiscard |
Creates a IBuffer of type type
.
type | The type of buffer to create. |
usage | The buffer usage. |
element_size | The size of each element in the buffer. (in bytes) |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IBuffer that can be bound to the specified descriptor_set
and binding
.
descriptor_set | The layout of the descriptor set to bind the buffer to. |
binding | The binding of the descriptor set to bind the buffer to. |
usage | The buffer usage. |
element_size | The size of each element in the buffer. (in bytes) |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IBuffer that can be bound to the specified descriptor_set
and binding
.
descriptor_set | The layout of the descriptor set to bind the buffer to. |
binding | The binding of the descriptor set to bind the buffer to. |
usage | The buffer usage. |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IBuffer that can be bound to a descriptor set of the specified pipeline
, space
and binding
.
pipeline | The pipeline that provides the descriptor set layout. |
space | The space the descriptor set is bound to. |
binding | The binding of the descriptor set to bind the buffer to. |
usage | The buffer usage. |
element_size | The size of each element in the buffer. (in bytes) |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IBuffer that can be bound to a descriptor set of the specified pipeline
, space
and binding
.
pipeline | The pipeline that provides the descriptor set layout. |
space | The space the descriptor set is bound to. |
binding | The binding of the descriptor set to bind the buffer to. |
usage | The buffer usage. |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IBuffer of type type
.
name | The buffer name. |
type | The buffer type. |
usage | The buffer usage. |
element_size | The size of each element in the buffer. (in bytes) |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IBuffer that can be bound to a descriptor set of the specified pipeline
, space
and binding
.
name | The buffer name. |
descriptor_set | The layout of the descriptor set to bind the buffer to. |
binding | The binding of the descriptor set to bind the buffer to. |
usage | The buffer usage. |
element_size | The size of each element in the buffer. (in bytes) |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | The buffer usage. |
|
inlinenodiscard |
Creates a IBuffer that can be bound to the specified descriptor_set
and binding
.
name | The buffer name. |
descriptor_set | The layout of the descriptor set to bind the buffer to. |
binding | The binding of the descriptor set to bind the buffer to. |
usage | The buffer usage. |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IBuffer that can be bound to a descriptor set of the specified pipeline
, space
and binding
.
name | The buffer name. |
pipeline | The pipeline that provides the descriptor set layout. |
space | The space the descriptor set is bound to. |
binding | The binding of the descriptor set to bind the buffer to. |
usage | The buffer usage. |
element_size | The size of each element in the buffer. (in bytes) |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IBuffer that can be bound to the specified descriptor_set
and binding
.
name | The buffer name. |
pipeline | The pipeline that provides the descriptor set layout. |
space | The space the descriptor set is bound to. |
binding | The binding of the descriptor set to bind the buffer to. |
usage | The buffer usage. |
elements | The number of elements in the buffer. (if the buffer is an array). |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IVertexBuffer based on layout
.
layout | The vertex buffer layout. |
usage | The buffer usage. |
elements | The number of elements in the buffer. (if the buffer is an array). |
An index buffer can be used by different render pipelines 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.
|
inlinenodiscard |
Creates a IVertexBuffer based on layout
.
name | The buffer name. |
layout | The vertex buffer layout. |
usage | The buffer usage. |
elements | The number of elements in the buffer. (if the buffer is an array). |
An index buffer can be used by different render pipelines 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.
|
inlinenodiscard |
Creates a texture sampler .
name | The sampler name. |
mag_filter | The filter mode to use for magnification. |
min_filter | The filter mode to use for minification. |
border_u | The border mode to use along the u-axis. |
border_v | The border mode to use along the v-axis. |
border_w | The border mode to use along the w-axis. |
mip_map_mode | The mip map mode to use. |
mip_map_bias | The mip map bias to use. |
max_lod | The maximum level of detail to use. |
min_lod | The minimum level of detail to use. |
anisotropy | The anisotropy level to use. |
|
inlinenodiscard |
Creates a texture sampler .
mag_filter | The filter mode to use for magnification. |
min_filter | The filter mode to use for minification. |
border_u | The border mode to use along the u-axis. |
border_v | The border mode to use along the v-axis. |
border_w | The border mode to use along the w-axis. |
mip_map_mode | The mip map mode to use. |
mip_map_bias | The mip map bias to use. |
max_lod | The maximum level of detail to use. |
min_lod | The minimum level of detail to use. |
anisotropy | The anisotropy level to use. |
|
inlinenodiscard |
Creates an array of texture samplers .
elements | The number of samplers to create. |
mag_filter | The filter mode to use for magnification of each sampler. |
min_filter | The filter mode to use for minification of each sampler. |
border_u | The border mode to use along the u-axis of each sampler. |
border_v | The border mode to use along the v-axis of each sampler. |
border_w | The border mode to use along the w-axis of each sampler. |
mip_map_mode | The mip map mode to use of each sampler. |
mip_map_bias | The mip map bias to use of each sampler. |
max_lod | The maximum level of detail to use of each sampler. |
min_lod | The minimum level of detail to use of each sampler. |
anisotropy | The anisotropy level to use of each sampler. |
|
inlinenodiscard |
Creates a texture .
name | The image name. |
format | The image format. |
size | The extent of the image. |
dimension | The image dimension. |
levels | The number of mipmap levels. |
layers | The number of layers. |
samples | The number of samples the image should be sampled with. |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
A texture 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 IGraphicsFactory::createBuffer() first that holds the actual image bytes. You than can transfer/copy the contents into the texture.
|
inlinenodiscard |
Creates a texture .
format | The image format. |
size | The extent of the image. |
dimension | The image dimension. |
levels | The number of mipmap levels. |
layers | The number of layers. |
samples | The number of samples the image should be sampled with. |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
A texture 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 IGraphicsFactory::createBuffer() first that holds the actual image bytes. You than can transfer/copy the contents into the texture.
|
inlinenodiscard |
Creates an array of textures .
elements | The number of textures to create. |
format | The images format. |
size | The extent of each image. |
dimension | The dimension of each image. |
layers | The number of layers of each image. |
levels | The number of mipmap levels of each image. |
samples | The number of samples of each image. |
allow_write | true to allow the resource to be bound to a read/write descriptor. |
|
inlinenodiscard |
Creates a IVertexBuffer based on layout
.
layout | The vertex buffer layout. |
usage | The buffer usage. |
elements | The number of elements in the buffer. (if the buffer is an array). |
A vertex buffer can be used by different render pipelines 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.
|
inlinenodiscard |
Creates a IVertexBuffer based on layout
.
name | The buffer name. |
layout | The vertex buffer layout. |
usage | The buffer usage. |
elements | The number of elements in the buffer. (if the buffer is an array). |
A vertex buffer can be used by different render pipelines 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.