fn create_material_desc_set(
    material_buf: Arc<ImmutableBuffer<ShaderMaterial>>,
    pipeline: Arc<dyn GraphicsPipelineAbstract + Send + Sync>,
) -> Fallible<Arc<dyn DescriptorSet + Send + Sync>> {
    let desc_set = PersistentDescriptorSet::start(pipeline.clone(), 2)
        .add_buffer(material_buf.clone())
        .with_context(|e| format_err!("Failed to add material data to descriptor set: {}", e))?
        .build()
        .with_context(|e| format_err!("Failed to build material descriptor set: {}", e))?;

    Ok(Arc::new(desc_set) as Arc<_>)
}
/// Creates a descriptor set for the given material uniform buffer.
Creates a descriptor set for the given material uniform buffer.
Creates a descriptor set for the given material uniform buffer .
fn create_material_desc_set(
    material_buf: Arc<ImmutableBuffer<ShaderMaterial>>,
    pipeline: Arc<dyn GraphicsPipelineAbstract + Send + Sync>,
) -> Fallible<Arc<dyn DescriptorSet + Send + Sync>> {
    let desc_set = PersistentDescriptorSet::start(pipeline.clone(), 2)
        .add_buffer(material_buf.clone())
        .with_context(|e| format_err!("Failed to add material data to descriptor set: {}", e))?
        .build()
        .with_context(|e| format_err!("Failed to build material descriptor set: {}", e))?;
    Ok(Arc::new(desc_set) as Arc<_>)
}
fn create_material_desc_set ( material_buf : Arc < ImmutableBuffer < ShaderMaterial > > , pipeline : Arc < dyn GraphicsPipelineAbstract + Send + Sync > , ) -> Fallible < Arc < dyn DescriptorSet + Send + Sync > > { let desc_set = PersistentDescriptorSet :: start ( pipeline . clone ( ) , 2 ) . add_buffer ( material_buf . clone ( ) ) . with_context ( | e | format_err ! ( " " e ) ) ? . build ( ) . with_context ( | e | format_err ! ( " " e ) ) ? ; Ok ( Arc :: new ( desc_set ) as Arc < _ > ) }
Creates a descriptor set for the given material uniform buffer.
Creates a descriptor set for the given material uniform buffer .
material_buf
Arc<ImmutableBuffer<ShaderMaterial>>
pipeline
Arc<dyn GraphicsPipelineAbstract + Send + Sync>
material_buf
Arc<ImmutableBuffer<ShaderMaterial>>
pipeline
Arc<dyn GraphicsPipelineAbstract + Send + Sync>