fn prepare_uniform_buffers(&mut self, id: I, render_resources: &T) {
        for (i, render_resource) in render_resources.iter().enumerate() {
            if let Some(RenderResourceType::Buffer) = render_resource.resource_type() {
                let size = render_resource.buffer_byte_len().unwrap();
                if let Some(buffer_array) = &mut self.buffer_arrays[i] {
                    buffer_array.get_or_assign_index(id);
                    self.required_staging_buffer_size += size;
                }
            }
        }
    }
/// Find a spot for the given RenderResources in each uniform's BufferArray and prepare space in
/// the staging buffer
Find a spot for the given RenderResources in each uniform's BufferArray and prepare space in
the staging buffer
Find a spot for the given RenderResources in each uniform ' s BufferArray and prepare space in the staging buffer
fn prepare_uniform_buffers(&mut self, id: I, render_resources: &T) {
        for (i, render_resource) in render_resources.iter().enumerate() {
            if let Some(RenderResourceType::Buffer) = render_resource.resource_type() {
                let size = render_resource.buffer_byte_len().unwrap();
                if let Some(buffer_array) = &mut self.buffer_arrays[i] {
                    buffer_array.get_or_assign_index(id);
                    self.required_staging_buffer_size += size;
                }
            }
        }
    }
fn prepare_uniform_buffers ( & mut self , id : I , render_resources : & T ) { for ( i , render_resource ) in render_resources . iter ( ) . enumerate ( ) { if let Some ( RenderResourceType :: Buffer ) = render_resource . resource_type ( ) { let size = render_resource . buffer_byte_len ( ) . unwrap ( ) ; if let Some ( buffer_array ) = & mut self . buffer_arrays [ i ] { buffer_array . get_or_assign_index ( id ) ; self . required_staging_buffer_size += size ; } } } }
Find a spot for the given RenderResources in each uniform's BufferArray and prepare space in
the staging buffer
Find a spot for the given RenderResources in each uniform ' s BufferArray and prepare space in the staging buffer
&mut self
id
I
render_resources
&T
&mut self
id
I
render_resources
&T