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§

Source

fn new(gpu: &Gpu) -> Self

Source

fn build_layout_desc() -> BindGroupLayoutDesc

Source

fn update_bind_group( &mut self, _entity: Entity, gpu: &Gpu, mesh_name: &str, ubo: &Buffer, offset_in_ubo: u32, _scene: &Scene, )

Source

fn get_layout(&self) -> &BindGroupLayout

Source

fn get_mut_entity2binds( &mut self, ) -> &mut HashMap<String, (BindGroupWrapper, u32)>

Provided Methods§

Source

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.

Implementors§