SPARK
0.1.0
A general purpose game engine written in C++.
|
Describes a the layout of a single descriptor within a DescriptorSet. More...
#include <DescriptorSet.h>
Public Member Functions | |
virtual DescriptorType | descriptorType () const noexcept=0 |
Gets the type of the descriptor. | |
virtual unsigned int | descriptors () const noexcept=0 |
Gets the number of descriptors in the descriptor array, or 0xFFFFFFFF if the descriptor is unbounded. | |
virtual const ISampler * | staticSampler () const noexcept=0 |
Gets the state of the sampler if it is a static sampler. | |
![]() | |
virtual std::size_t | elementSize () const noexcept=0 |
Gets the size of a single element in the buffer. | |
virtual unsigned int | binding () const noexcept=0 |
Gets the binding point the buffer will be bound to. | |
virtual BufferType | type () const noexcept=0 |
Gets the type of the buffer. | |
Describes a the layout of a single descriptor within a DescriptorSet.
A common metaphor for a descriptor to think of it as a "pointer for the GPU". Basically, a descriptor points to a buffer in a shader. A descriptor can have different types and sizes. The types a descriptor can have are described by the DescriptorType.
If the descriptor is a sampler, it can either be a dynamic or static sampler. A dynamic sampler needs to be bound during runtime just like any other descriptor by calling IDescriptorSet::update(). A static sampler is defined alongside the descriptor layout and is automatically set when the pipeline that uses the descriptor layout gets bound. In this case, the descriptor must not be updated with another sampler. If a descriptor layout describes a static sampler, the IDescriptorLayout::staticSampler() returns a pointer to the static sampler state.
|
nodiscardpure virtualnoexcept |
Gets the number of descriptors in the descriptor array, or 0xFFFFFFFF
if the descriptor is unbounded.
0xFFFFFFFF
if the descriptor is unbounded.descriptors
parameter. Implemented in spark::render::vk::VulkanDescriptorLayout.
|
nodiscardpure virtualnoexcept |
Gets the type of the descriptor.
Implemented in spark::render::vk::VulkanDescriptorLayout.
|
nodiscardpure virtualnoexcept |
Gets the state of the sampler if it is a static sampler.
nullptr
if the descriptor is not a static sampler. Implemented in spark::render::vk::VulkanDescriptorLayout.