tp::Descriptor class

Binds an existing resource or sampler inside a tp::DescriptorSet, according to the tp::DescriptorBinding defined inside a tp::DescriptorSetLayout.

Constructors, destructors, conversion operators

Descriptor()
Creates a null descriptor.
Descriptor(const BufferView& bufferView)
Creates a buffer descriptor.
Descriptor(const ImageView& imageView)
Creates an image descriptor.
Descriptor(const ImageView& imageView, const Sampler& sampler)
Creates a combined image sampler binding to tp::DescriptorType::CombinedImageSampler.
Descriptor(const Sampler& sampler)
Creates a sampler descriptor binding to tp::DescriptorType::Sampler.

Public functions

auto isNull() const -> bool
Returns true if the descriptor is null and does not refer to any resource.

Function documentation

tp::Descriptor::Descriptor(const BufferView& bufferView)

Creates a buffer descriptor.

Parameters
bufferView The tp::BufferView to bind.

tp::Descriptor::Descriptor(const ImageView& imageView)

Creates an image descriptor.

Parameters
imageView The tp::ImageView to bind.

tp::Descriptor::Descriptor(const ImageView& imageView, const Sampler& sampler)

Creates a combined image sampler binding to tp::DescriptorType::CombinedImageSampler.

Parameters
imageView The tp::ImageView to bind.
sampler The tp::Sampler to bind.