pub trait BindGroupCollection {
// Required methods
fn new(gpu: &Gpu) -> Self;
fn build_layout_desc() -> BindGroupLayoutDesc;
fn update_bind_group(
&mut self,
_entity: Entity,
gpu: &Gpu,
mesh_name: &str,
ubo: &Buffer,
offset_in_ubo: u32,
_scene: &Scene,
);
fn get_layout(&self) -> &BindGroupLayout;
fn get_mut_entity2binds(
&mut self,
) -> &mut HashMap<String, (BindGroupWrapper, u32)>;
// Provided method
fn update_if_stale(
&mut self,
ent_name: &str,
entries: SmallVec<[BindGroupEntry<'_>; 16]>,
offset_in_ubo: u32,
gpu: &Gpu,
) { ... }
}
Expand description
trait that defines a collection of uniforms each with the same layout. Each entity can be associated with a certain
Required Methods§
fn new(gpu: &Gpu) -> Self
fn build_layout_desc() -> BindGroupLayoutDesc
fn update_bind_group( &mut self, _entity: Entity, gpu: &Gpu, mesh_name: &str, ubo: &Buffer, offset_in_ubo: u32, _scene: &Scene, )
fn get_layout(&self) -> &BindGroupLayout
fn get_mut_entity2binds( &mut self, ) -> &mut HashMap<String, (BindGroupWrapper, u32)>
Provided Methods§
fn update_if_stale( &mut self, ent_name: &str, entries: SmallVec<[BindGroupEntry<'_>; 16]>, offset_in_ubo: u32, gpu: &Gpu, )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.