Struct nannou_wgpu::BindGroupLayoutBuilder [−][src]
pub struct BindGroupLayoutBuilder { /* fields omitted */ }
Expand description
A type aimed at simplifying the creation of a bind group layout.
Implementations
Specify a new binding.
The binding
position of each binding will be inferred as the index within the order that
they are added to this builder type. If you require manually specifying the binding
location, you may be better off not using the BindGroupLayoutBuilder
and instead
constructing the BindGroupLayout
and BindGroup
manually.
Add a uniform buffer binding to the layout.
pub fn storage_buffer(
self,
visibility: ShaderStages,
has_dynamic_offset: bool,
read_only: bool
) -> Self
pub fn storage_buffer(
self,
visibility: ShaderStages,
has_dynamic_offset: bool,
read_only: bool
) -> Self
Add a storage buffer binding to the layout.
Add a sampler binding to the layout.
Add a sampler binding to the layout.
pub fn texture(
self,
visibility: ShaderStages,
multisampled: bool,
view_dimension: TextureViewDimension,
sample_type: TextureSampleType
) -> Self
pub fn texture(
self,
visibility: ShaderStages,
multisampled: bool,
view_dimension: TextureViewDimension,
sample_type: TextureSampleType
) -> Self
Add a texture binding to the layout.
Short-hand for adding a texture binding for a full view of the given texture to the layout.
The multisampled
and dimension
parameters are retrieved from the Texture
itself.
Note that if you wish to take a Cube
or CubeArray
view of the given texture, you will
need to manually specify the TextureViewDimension
via the sampled_texture
method
instead.
pub fn storage_texture(
self,
visibility: ShaderStages,
format: TextureFormat,
view_dimension: TextureViewDimension,
access: StorageTextureAccess
) -> Self
pub fn storage_texture(
self,
visibility: ShaderStages,
format: TextureFormat,
view_dimension: TextureViewDimension,
access: StorageTextureAccess
) -> Self
Add a storage texture binding to the layout.
pub fn storage_texture_from(
self,
visibility: ShaderStages,
texture: &Texture,
access: StorageTextureAccess
) -> Self
pub fn storage_texture_from(
self,
visibility: ShaderStages,
texture: &Texture,
access: StorageTextureAccess
) -> Self
Short-hand for adding a storage texture binding for a full view of the given texture to the layout.
The format
, dimension
and sample_type
are inferred from the given texture
.
Build the bind group layout from the specified parameters.
Trait Implementations
Returns the “default value” for a type. Read more