pub fn create_diffuse_texture_desc_set(
    image: Arc<ImmutableImage<R8G8B8A8Srgb>>,
    sampler: Arc<Sampler>,
    pipeline: Arc<dyn GraphicsPipelineAbstract + Send + Sync>,
) -> Fallible<Arc<dyn DescriptorSet + Send + Sync>> {
    let desc_set = PersistentDescriptorSet::start(pipeline, 1)
        .add_sampled_image(image.clone(), sampler.clone())
        .with_context(|e| format_err!("Failed to add sampled image to descriptor set: {}", e))?
        .build()
        .with_context(|e| format_err!("Failed to build descriptor set: {}", e))?;

    Ok(Arc::new(desc_set) as Arc<_>)
}
/// Creates a descriptor set for the given diffuse texture.
Creates a descriptor set for the given diffuse texture.
Creates a descriptor set for the given diffuse texture .
pub fn create_diffuse_texture_desc_set(
    image: Arc<ImmutableImage<R8G8B8A8Srgb>>,
    sampler: Arc<Sampler>,
    pipeline: Arc<dyn GraphicsPipelineAbstract + Send + Sync>,
) -> Fallible<Arc<dyn DescriptorSet + Send + Sync>> {
    let desc_set = PersistentDescriptorSet::start(pipeline, 1)
        .add_sampled_image(image.clone(), sampler.clone())
        .with_context(|e| format_err!("Failed to add sampled image to descriptor set: {}", e))?
        .build()
        .with_context(|e| format_err!("Failed to build descriptor set: {}", e))?;
    Ok(Arc::new(desc_set) as Arc<_>)
}
pub fn create_diffuse_texture_desc_set ( image : Arc < ImmutableImage < R8G8B8A8Srgb > > , sampler : Arc < Sampler > , pipeline : Arc < dyn GraphicsPipelineAbstract + Send + Sync > , ) -> Fallible < Arc < dyn DescriptorSet + Send + Sync > > { let desc_set = PersistentDescriptorSet :: start ( pipeline , 1 ) . add_sampled_image ( image . clone ( ) , sampler . 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 diffuse texture.
Creates a descriptor set for the given diffuse texture .
image
Arc<ImmutableImage<R8G8B8A8Srgb>>
sampler
Arc<Sampler>
pipeline
Arc<dyn GraphicsPipelineAbstract + Send + Sync>
image
Arc<ImmutableImage<R8G8B8A8Srgb>>
sampler
Arc<Sampler>
pipeline
Arc<dyn GraphicsPipelineAbstract + Send + Sync>