SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::render::DescriptorBinding Struct Reference

Describes a resource binding in a descriptor set. More...

#include <DescriptorBinding.h>

Public Attributes

std::optional< unsigned int > binding = std::nullopt
 Binding point in the descriptor set.
 
std::variant< std::monostate, std::reference_wrapper< IBuffer >, std::reference_wrapper< IImage >, std::reference_wrapper< ISampler > > resource
 Resource to bind or std::monostate if the binding is empty.
 
unsigned int firstDescriptor = 0
 Index of the descriptor array at which the resource array starts.
 
unsigned int firstElement = 0
 Index of the first element (layer for images) of the resource array to bind, starting at DescriptorBinding::firstDescriptor.
 
unsigned int elements = 0
 Number of elements or image layers to bind, starting at DescriptorBinding::firstDescriptor.
 
unsigned int firstLevel = 0
 If the resource is an IImage, this property specifies the first level to bind.
 
unsigned int levels = 0
 If the resource is an IImage, this property specifies the number of levels to bind.
 

Detailed Description

Describes a resource binding in a descriptor set.

Member Data Documentation

◆ elements

unsigned int spark::render::DescriptorBinding::elements = 0

Number of elements or image layers to bind, starting at DescriptorBinding::firstDescriptor.

Note
If DescriptorBinding::resource is a ISampler, this property is ignored.

◆ firstDescriptor

unsigned int spark::render::DescriptorBinding::firstDescriptor = 0

Index of the descriptor array at which the resource array starts.

Note
If the resource contains an array, the elements (layers for images) will be bound starting at this descriptor. The first bound element is DescriptorBinding::firstElement. The number of elements bounded is DescriptorBinding::elements.

◆ firstElement

unsigned int spark::render::DescriptorBinding::firstElement = 0

Index of the first element (layer for images) of the resource array to bind, starting at DescriptorBinding::firstDescriptor.

Note
If DescriptorBinding::resource is a ISampler, this property is ignored.

◆ firstLevel

unsigned int spark::render::DescriptorBinding::firstLevel = 0

If the resource is an IImage, this property specifies the first level to bind.

Note
If DescriptorBinding::resource is not an IImage, this property is ignored.

◆ levels

unsigned int spark::render::DescriptorBinding::levels = 0

If the resource is an IImage, this property specifies the number of levels to bind.

Note
If DescriptorBinding::resource is not an IImage, this property is ignored.