Trait vulkano::descriptor::descriptor_set::DescriptorSet
source · pub unsafe trait DescriptorSet: DescriptorSetDesc {
fn inner(&self) -> &UnsafeDescriptorSet;
fn num_buffers(&self) -> usize;
fn buffer(&self, index: usize) -> Option<(&dyn BufferAccess, u32)>;
fn num_images(&self) -> usize;
fn image(&self, index: usize) -> Option<(&dyn ImageViewAccess, u32)>;
}
Expand description
Trait for objects that contain a collection of resources that will be accessible by shaders.
Objects of this type can be passed when submitting a draw command.
Required Methods
sourcefn inner(&self) -> &UnsafeDescriptorSet
fn inner(&self) -> &UnsafeDescriptorSet
Returns the inner UnsafeDescriptorSet
.
sourcefn num_buffers(&self) -> usize
fn num_buffers(&self) -> usize
Returns the number of buffers within this descriptor set.
sourcefn buffer(&self, index: usize) -> Option<(&dyn BufferAccess, u32)>
fn buffer(&self, index: usize) -> Option<(&dyn BufferAccess, u32)>
Returns the index
th buffer of this descriptor set, or None
if out of range. Also
returns the index of the descriptor that uses this buffer.
The valid range is between 0 and num_buffers()
.
sourcefn num_images(&self) -> usize
fn num_images(&self) -> usize
Returns the number of images within this descriptor set.