tp::FutureDescriptor class

Binds a resource or sampler inside a tp::DescriptorSet, according to the tp::DescriptorBinding defined inside a tp::DescriptorSetLayout. This variant can be used with job-local resources of a job that hasn't been enqueued yet.

Constructors, destructors, conversion operators

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

Public functions

auto isNull() const -> bool
Returns true if the descriptor is null and does not refer to any resource.
auto resolve() const -> Descriptor
Resolves the descriptor. The resource referenced by this descriptor must be ready. For job-local resources it means this can only be called after the tp::Job has been enqueued.

Function documentation

tp::FutureDescriptor::FutureDescriptor(BufferView bufferView)

Creates a buffer descriptor.

Parameters
bufferView The tp::BufferView to bind.

tp::FutureDescriptor::FutureDescriptor(ImageView imageView)

Creates an image descriptor.

Parameters
imageView The tp::ImageView to bind.

tp::FutureDescriptor::FutureDescriptor(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.