Update the examples for PersistentDescriptorSet

This commit is contained in:
Pierre Krieger 2017-07-06 14:53:23 +02:00
parent d145149278
commit 3d718c57a0
3 changed files with 9 additions and 7 deletions

View File

@ -140,9 +140,10 @@ fn main() {
.build(device.clone())
.unwrap());
let set = Arc::new(simple_descriptor_set!(pipeline.clone(), 0, {
tex: (texture.clone(), sampler.clone())
}));
let set = Arc::new(vulkano::descriptor::descriptor_set::PersistentDescriptorSet::start(pipeline.clone(), 0)
.add_sampled_image(texture.clone(), sampler.clone())
.build()
);
let framebuffers = images.iter().map(|image| {
Arc::new(vulkano::framebuffer::Framebuffer::start(renderpass.clone())

View File

@ -138,9 +138,10 @@ fn main() {
.build(device.clone())
.unwrap());
let set = Arc::new(simple_descriptor_set!(pipeline.clone(), 0, {
uniforms: uniform_buffer.clone()
}));
let set = Arc::new(vulkano::descriptor::descriptor_set::PersistentDescriptorSet::start(pipeline.clone(), 0)
.add_buffer(uniform_buffer.clone())
.build()
);
let framebuffers = images.iter().map(|image| {
Arc::new(vulkano::framebuffer::Framebuffer::start(renderpass.clone())

View File

@ -54,7 +54,7 @@ pub struct PersistentDescriptorSet<R, P = StdDescriptorPoolAlloc> {
layout: Arc<UnsafeDescriptorSetLayout>
}
impl<R, P> PersistentDescriptorSet<R, P> {
impl PersistentDescriptorSet<()> {
///
/// # Panic
///