[][src]Struct nannou::wgpu::BindGroupBuilder

pub struct BindGroupBuilder<'a> { /* fields omitted */ }

Simplified creation of a bind group.

Methods

impl<'a> Builder<'a>[src]

pub fn new() -> Self[src]

Begin building the bind group.

pub fn binding(self, resource: BindingResource<'a>) -> Self[src]

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 BindGroupBuilder and instead constructing the BindGroupLayout and BindGroup manually.

pub fn buffer_bytes(
    self,
    buffer: &'a Buffer,
    range: Range<BufferAddress>
) -> Self
[src]

Specify a slice of a buffer to be bound.

The given range represents the start and end point of the buffer to be bound in bytes.

pub fn buffer<T>(self, buffer: &'a Buffer, range: Range<usize>) -> Self where
    T: Copy
[src]

Specify a slice of a buffer of elements of type T to be bound.

This method is similar to buffer_bytes, but expects a range of elements rather than a range of bytes.

Type T must be either #[repr(C)] or #[repr(transparent)].

pub fn sampler(self, sampler: &'a Sampler) -> Self[src]

Specify a sampler to be bound.

pub fn texture_view(self, view: &'a TextureViewHandle) -> Self[src]

Specify a texture view to be bound.

pub fn build(self, device: &Device, layout: &BindGroupLayout) -> BindGroup[src]

Build the bind group with the specified resources.

Trait Implementations

impl<'a> Debug for Builder<'a>[src]

impl<'a> Default for Builder<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Builder<'a>

impl<'a> Send for Builder<'a>

impl<'a> Sync for Builder<'a>

impl<'a> Unpin for Builder<'a>

impl<'a> !UnwindSafe for Builder<'a>

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,