pub enum MaterialBindingKind {
Texture {
sample_type: TextureSampleType,
view_dimension: TextureViewDimension,
multisampled: bool,
},
Sampler,
ComparisonSampler,
UniformBuffer {
visibility: ShaderStages,
has_dynamic_offset: bool,
min_binding_size: Option<BufferSize>,
},
StorageBufferReadOnly {
visibility: ShaderStages,
has_dynamic_offset: bool,
min_binding_size: Option<BufferSize>,
},
StorageBufferReadWrite {
visibility: ShaderStages,
has_dynamic_offset: bool,
min_binding_size: Option<BufferSize>,
},
}Variants§
Implementations§
Source§impl MaterialBindingKind
impl MaterialBindingKind
pub fn texture_2d() -> Self
pub fn texture_2d_array() -> Self
pub fn texture_cubemap() -> Self
pub fn uniform_buffer() -> Self
Sourcepub fn dynamic_uniform_buffer(element_size: u64) -> Self
pub fn dynamic_uniform_buffer(element_size: u64) -> Self
A uniform buffer bound with a per-draw dynamic offset, e.g. one large buffer
holding many objects’ data, rebound at a different offset via
RenderPass::set_bind_group’s dynamic offsets slice instead of a bind group per object.
element_size is the size in bytes of a single element (before alignment padding);
use crate::wgpu::buffers::dynamic_uniform_offset_stride or
crate::wgpu::buffers::build_dynamic_uniform_buffer to compute the actual stride.
Sourcepub fn dynamic_storage_buffer(element_size: u64, read_only: bool) -> Self
pub fn dynamic_storage_buffer(element_size: u64, read_only: bool) -> Self
A storage buffer bound with a per-draw dynamic offset. See Self::dynamic_uniform_buffer.
pub fn layout_entry(&self, binding: u32) -> BindGroupLayoutEntry
Trait Implementations§
Source§impl Clone for MaterialBindingKind
impl Clone for MaterialBindingKind
Source§fn clone(&self) -> MaterialBindingKind
fn clone(&self) -> MaterialBindingKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MaterialBindingKind
impl Eq for MaterialBindingKind
Source§impl Hash for MaterialBindingKind
impl Hash for MaterialBindingKind
Source§impl PartialEq for MaterialBindingKind
impl PartialEq for MaterialBindingKind
impl StructuralPartialEq for MaterialBindingKind
Auto Trait Implementations§
impl Freeze for MaterialBindingKind
impl RefUnwindSafe for MaterialBindingKind
impl Send for MaterialBindingKind
impl Sync for MaterialBindingKind
impl Unpin for MaterialBindingKind
impl UnsafeUnpin for MaterialBindingKind
impl UnwindSafe for MaterialBindingKind
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
Mutably borrows from an owned value. Read more
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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 more