pub struct BindGroupParams { /* private fields */ }Expand description
Implementations§
Source§impl BindGroupParams
impl BindGroupParams
pub fn new() -> Self
pub fn with_texture(self, name: &'static str, handle: Handle<Texture>) -> Self
pub fn with_texture_array( self, name: &'static str, handle: Handle<TextureArray>, ) -> Self
pub fn with_cubemap(self, name: &'static str, handle: Handle<Cubemap>) -> Self
Sourcepub fn with_texture_view(self, name: &'static str, view: TextureView) -> Self
pub fn with_texture_view(self, name: &'static str, view: TextureView) -> Self
Binds an already-built TextureView directly — e.g. one mip level
from GPUTexture::get_view,
or a standalone render target from
Texture::empty.
Unlike .with_texture/.with_texture_array/.with_cubemap, no
Handle lookup happens at upload time — view must already exist.
pub fn with_sampler(self, name: &'static str, kind: SamplerKind) -> Self
pub fn with_uniform(self, name: &'static str, data: Vec<u8>) -> Self
pub fn with_storage(self, name: &'static str, data: Vec<u8>) -> Self
Sourcepub fn with_uniform_value<T>(self, name: &'static str, value: &T) -> Selfwhere
T: ShaderType + WriteInto,
pub fn with_uniform_value<T>(self, name: &'static str, value: &T) -> Selfwhere
T: ShaderType + WriteInto,
Same as with_uniform, but takes a typed
value instead of pre-packed bytes — uses encase to lay it out with
correct WGSL uniform (std140) alignment. T is usually a struct
deriving encase::ShaderType.
Sourcepub fn with_storage_value<T>(self, name: &'static str, value: &T) -> Selfwhere
T: ShaderType + WriteInto,
pub fn with_storage_value<T>(self, name: &'static str, value: &T) -> Selfwhere
T: ShaderType + WriteInto,
Same as with_storage, but takes a typed
value instead of pre-packed bytes — uses encase to lay it out with
correct WGSL storage (std430) alignment.
Sourcepub fn with_buffer(self, name: &'static str, buffer: Buffer) -> Self
pub fn with_buffer(self, name: &'static str, buffer: Buffer) -> Self
Binds an existing Buffer instead of uploading raw bytes — for a
buffer you already built yourself (e.g. one a compute pass writes
to, then another pass reads from). Unlike .with_uniform/.with_storage,
no buffer is created here; buffer must already carry the usage
flags this binding needs (BufferUsages::UNIFORM or ::STORAGE,
matching how the target’s own entry for name was declared).
Sourcepub fn with_dynamic_buffer(
self,
name: &'static str,
buffer: DynamicBuffer,
) -> Self
pub fn with_dynamic_buffer( self, name: &'static str, buffer: DynamicBuffer, ) -> Self
Binds an existing DynamicBuffer — the dynamic-offset counterpart
to .with_buffer. The target’s own entry for name must have been
declared with BindingKind::dynamic_uniform_buffer/dynamic_storage_buffer
(has_dynamic_offset: true) to match, or bind group creation fails
validation.
pub fn with_param(self, name: &'static str, entry: BindingValue) -> Self
Trait Implementations§
Source§impl Clone for BindGroupParams
impl Clone for BindGroupParams
Source§fn clone(&self) -> BindGroupParams
fn clone(&self) -> BindGroupParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for BindGroupParams
impl Default for BindGroupParams
Source§fn default() -> BindGroupParams
fn default() -> BindGroupParams
Auto Trait Implementations§
impl !RefUnwindSafe for BindGroupParams
impl !UnwindSafe for BindGroupParams
impl Freeze for BindGroupParams
impl Send for BindGroupParams
impl Sync for BindGroupParams
impl Unpin for BindGroupParams
impl UnsafeUnpin for BindGroupParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Component for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().