Struct vulkano::descriptor_set::persistent::PersistentDescriptorSetBuilder [−][src]
pub struct PersistentDescriptorSetBuilder { /* fields omitted */ }
Expand description
Prototype of a PersistentDescriptorSet
.
Implementations
Call this function if the next element of the set is an array in order to set the value of each element.
Returns an error if the descriptor is empty, there are no remaining descriptors, or if the builder is already in an error.
This function can be called even if the descriptor isn’t an array, and it is valid to enter the “array”, add one element, then leave.
Leaves the array. Call this once you added all the elements of the array.
Returns an error if the array is missing elements, or if the builder is not in an array.
Skips the current descriptor if it is empty.
pub fn add_buffer(
&mut self,
buffer: Arc<dyn BufferAccess>
) -> Result<&mut Self, DescriptorSetError>
pub fn add_buffer(
&mut self,
buffer: Arc<dyn BufferAccess>
) -> Result<&mut Self, DescriptorSetError>
Binds a buffer as the next descriptor.
An error is returned if the buffer isn’t compatible with the descriptor.
pub fn add_buffer_view<B>(
&mut self,
view: Arc<BufferView<B>>
) -> Result<&mut Self, DescriptorSetError> where
B: BufferAccess + 'static,
pub fn add_buffer_view<B>(
&mut self,
view: Arc<BufferView<B>>
) -> Result<&mut Self, DescriptorSetError> where
B: BufferAccess + 'static,
Binds a buffer view as the next descriptor.
An error is returned if the buffer isn’t compatible with the descriptor.
pub fn add_image(
&mut self,
image_view: Arc<dyn ImageViewAbstract>
) -> Result<&mut Self, DescriptorSetError>
pub fn add_image(
&mut self,
image_view: Arc<dyn ImageViewAbstract>
) -> Result<&mut Self, DescriptorSetError>
Binds an image view as the next descriptor.
An error is returned if the image view isn’t compatible with the descriptor.
pub fn add_sampled_image(
&mut self,
image_view: Arc<dyn ImageViewAbstract>,
sampler: Arc<Sampler>
) -> Result<&mut Self, DescriptorSetError>
pub fn add_sampled_image(
&mut self,
image_view: Arc<dyn ImageViewAbstract>,
sampler: Arc<Sampler>
) -> Result<&mut Self, DescriptorSetError>
Binds an image view with a sampler as the next descriptor.
If the descriptor set layout contains immutable samplers for this descriptor, use
add_image
instead.
An error is returned if the image view isn’t compatible with the descriptor.
Binds a sampler as the next descriptor.
An error is returned if the sampler isn’t compatible with the descriptor.
pub fn build(
self
) -> Result<Arc<PersistentDescriptorSet<StdDescriptorPoolAlloc>>, DescriptorSetError>
pub fn build(
self
) -> Result<Arc<PersistentDescriptorSet<StdDescriptorPoolAlloc>>, DescriptorSetError>
Builds a PersistentDescriptorSet
from the builder.
pub fn build_with_pool<P>(
self,
pool: &mut P
) -> Result<Arc<PersistentDescriptorSet<P::Alloc>>, DescriptorSetError> where
P: ?Sized + DescriptorPool,
pub fn build_with_pool<P>(
self,
pool: &mut P
) -> Result<Arc<PersistentDescriptorSet<P::Alloc>>, DescriptorSetError> where
P: ?Sized + DescriptorPool,
Builds a PersistentDescriptorSet
from the builder.
Auto Trait Implementations
impl !RefUnwindSafe for PersistentDescriptorSetBuilder
impl Send for PersistentDescriptorSetBuilder
impl Sync for PersistentDescriptorSetBuilder
impl Unpin for PersistentDescriptorSetBuilder
impl !UnwindSafe for PersistentDescriptorSetBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.