fn initialize(
        &mut self,
        render_resources: &T,
        render_resource_context: &dyn RenderResourceContext,
    ) {
        if self.buffer_arrays.len() != render_resources.render_resources_len() {
            let mut buffer_arrays = Vec::with_capacity(render_resources.render_resources_len());
            for render_resource in render_resources.iter() {
                if let Some(RenderResourceType::Buffer) = render_resource.resource_type() {
                    let size = render_resource.buffer_byte_len().unwrap();
                    let aligned_size = render_resource_context.get_aligned_uniform_size(size, true);
                    buffer_arrays.push(Some(BufferArray::new(aligned_size, 10)));
                } else {
                    buffer_arrays.push(None);
                }
            }

            self.buffer_arrays = buffer_arrays;
        }
    }
/// Initialize this UniformBufferArrays using information from a RenderResources value.
Initialize this UniformBufferArrays using information from a RenderResources value.
Initialize this UniformBufferArrays using information from a RenderResources value .
fn initialize(
        &mut self,
        render_resources: &T,
        render_resource_context: &dyn RenderResourceContext,
    ) {
        if self.buffer_arrays.len() != render_resources.render_resources_len() {
            let mut buffer_arrays = Vec::with_capacity(render_resources.render_resources_len());
            for render_resource in render_resources.iter() {
                if let Some(RenderResourceType::Buffer) = render_resource.resource_type() {
                    let size = render_resource.buffer_byte_len().unwrap();
                    let aligned_size = render_resource_context.get_aligned_uniform_size(size, true);
                    buffer_arrays.push(Some(BufferArray::new(aligned_size, 10)));
                } else {
                    buffer_arrays.push(None);
                }
            }
            self.buffer_arrays = buffer_arrays;
        }
    }
fn initialize ( & mut self , render_resources : & T , render_resource_context : & dyn RenderResourceContext , ) { if self . buffer_arrays . len ( ) != render_resources . render_resources_len ( ) { let mut buffer_arrays = Vec :: with_capacity ( render_resources . render_resources_len ( ) ) ; for render_resource in render_resources . iter ( ) { if let Some ( RenderResourceType :: Buffer ) = render_resource . resource_type ( ) { let size = render_resource . buffer_byte_len ( ) . unwrap ( ) ; let aligned_size = render_resource_context . get_aligned_uniform_size ( size , true ) ; buffer_arrays . push ( Some ( BufferArray :: new ( aligned_size , 10 ) ) ) ; } else { buffer_arrays . push ( None ) ; } } self . buffer_arrays = buffer_arrays ; } }
Initialize this UniformBufferArrays using information from a RenderResources value.
Initialize this UniformBufferArrays using information from a RenderResources value .
&mut self
render_resources
&T
render_resource_context
&dyn RenderResourceContext
&mut self
render_resources
&T
render_resource_context
&dyn RenderResourceContext