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
Begin building the bind group layout.
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.
pub fn uniform_buffer(
self,
visibility: ShaderStages,
has_dynamic_offset: bool
) -> LayoutBuilder
pub fn uniform_buffer(
self,
visibility: ShaderStages,
has_dynamic_offset: bool
) -> LayoutBuilder
Add a uniform buffer binding to the layout.
pub fn storage_buffer(
self,
visibility: ShaderStages,
has_dynamic_offset: bool,
read_only: bool
) -> LayoutBuilder
pub fn storage_buffer(
self,
visibility: ShaderStages,
has_dynamic_offset: bool,
read_only: bool
) -> LayoutBuilder
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
) -> LayoutBuilder
pub fn texture(
self,
visibility: ShaderStages,
multisampled: bool,
view_dimension: TextureViewDimension,
sample_type: TextureSampleType
) -> LayoutBuilder
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
) -> LayoutBuilder
pub fn storage_texture(
self,
visibility: ShaderStages,
format: TextureFormat,
view_dimension: TextureViewDimension,
access: StorageTextureAccess
) -> LayoutBuilder
Add a storage texture binding to the layout.
pub fn storage_texture_from(
self,
visibility: ShaderStages,
texture: &Texture,
access: StorageTextureAccess
) -> LayoutBuilder
pub fn storage_texture_from(
self,
visibility: ShaderStages,
texture: &Texture,
access: StorageTextureAccess
) -> LayoutBuilder
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
Auto Trait Implementations
impl RefUnwindSafe for LayoutBuilder
impl Send for LayoutBuilder
impl Sync for LayoutBuilder
impl Unpin for LayoutBuilder
impl UnwindSafe for LayoutBuilder
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more