SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::render::IDescriptorSet Class Referenceabstract

Interface for a descriptor set. More...

#include <DescriptorSet.h>

Inheritance diagram for spark::render::IDescriptorSet:
spark::render::DescriptorSet< IVulkanBuffer, IVulkanImage, IVulkanSampler > spark::render::DescriptorSet< BufferType, ImageType, SamplerType > spark::render::vk::VulkanDescriptorSet

Public Member Functions

void update (unsigned int binding, const IBuffer &buffer, unsigned int buffer_element=0, unsigned int elements=0, unsigned int first_descriptor=0) const
 Updates a constant buffer within the IDescriptorSet.
 
void update (unsigned int binding, const IImage &texture, unsigned int descriptor=0, unsigned int first_level=0, unsigned int levels=0, unsigned int first_layer=0, unsigned int layers=0) const
 Updates a texture within the current descriptor set.
 
void update (unsigned int binding, const ISampler &sampler, unsigned int descriptor=0) const
 Updates a sampler within the current descriptor set.
 
void attach (unsigned int binding, const IImage &image) const
 Attaches an image as an input attachment to a descriptor bound at binding.
 

Detailed Description

Interface for a descriptor set.

Member Function Documentation

◆ attach()

void spark::render::IDescriptorSet::attach ( unsigned int binding,
const IImage & image ) const
inline

Attaches an image as an input attachment to a descriptor bound at binding.

Parameters
bindingThe input attachment binding point.
imageThe image to bind to the input attachment descriptor.

◆ update() [1/3]

void spark::render::IDescriptorSet::update ( unsigned int binding,
const IBuffer & buffer,
unsigned int buffer_element = 0,
unsigned int elements = 0,
unsigned int first_descriptor = 0 ) const
inline

Updates a constant buffer within the IDescriptorSet.

Parameters
bindingThe buffer binding point.
bufferThe constant buffer to write to the IDescriptorSet.
buffer_elementThe index of the first element to write to the IDescriptorSet.
elementsThe number of elements to write to the IDescriptorSet, or 0 to write all elements starting from buffer_element.
first_descriptorThe index of the first descriptor in the descriptor array to update.

◆ update() [2/3]

void spark::render::IDescriptorSet::update ( unsigned int binding,
const IImage & texture,
unsigned int descriptor = 0,
unsigned int first_level = 0,
unsigned int levels = 0,
unsigned int first_layer = 0,
unsigned int layers = 0 ) const
inline

Updates a texture within the current descriptor set.

Parameters
bindingThe binding point of the texture.
textureThe texture to write to the descriptor set.
descriptorThe index of the descriptor in the descriptor array to bind the texture to.
first_levelThe index of the first mip-map level to bind.
levelsThe number of mip-map levels to bind. A value of 0 binds all available levels, starting at firstLevel.
first_layerThe index of the first layer to bind.
layersThe number of layers to bind. A value of 0 binds all available layers, starting at firstLayer.

◆ update() [3/3]

void spark::render::IDescriptorSet::update ( unsigned int binding,
const ISampler & sampler,
unsigned int descriptor = 0 ) const
inline

Updates a sampler within the current descriptor set.

Parameters
bindingThe binding point of the sampler.
samplerThe sampler to write to the descriptor set.
descriptorThe index of the descriptor in the descriptor array to bind the sampler to.