Merge pull request #343 from Binero/master

Examples now use min_image_count-buffering
This commit is contained in:
tomaka 2017-01-04 07:12:15 +01:00 committed by GitHub
commit c466d9764a
3 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ fn main() {
let present = caps.present_modes.iter().next().unwrap(); let present = caps.present_modes.iter().next().unwrap();
let usage = caps.supported_usage_flags; let usage = caps.supported_usage_flags;
vulkano::swapchain::Swapchain::new(&device, &window.surface(), 3, vulkano::swapchain::Swapchain::new(&device, &window.surface(), caps.min_image_count,
vulkano::format::B8G8R8A8Srgb, dimensions, 1, vulkano::format::B8G8R8A8Srgb, dimensions, 1,
&usage, &queue, vulkano::swapchain::SurfaceTransform::Identity, &usage, &queue, vulkano::swapchain::SurfaceTransform::Identity,
vulkano::swapchain::CompositeAlpha::Opaque, vulkano::swapchain::CompositeAlpha::Opaque,

View File

@ -59,7 +59,7 @@ fn main() {
let usage = caps.supported_usage_flags; let usage = caps.supported_usage_flags;
let format = caps.supported_formats[0].0; let format = caps.supported_formats[0].0;
vulkano::swapchain::Swapchain::new(&device, &window.surface(), 3, format, dimensions, 1, vulkano::swapchain::Swapchain::new(&device, &window.surface(), caps.min_image_count, format, dimensions, 1,
&usage, &queue, vulkano::swapchain::SurfaceTransform::Identity, &usage, &queue, vulkano::swapchain::SurfaceTransform::Identity,
vulkano::swapchain::CompositeAlpha::Opaque, vulkano::swapchain::CompositeAlpha::Opaque,
present, true, None).expect("failed to create swapchain") present, true, None).expect("failed to create swapchain")

View File

@ -179,7 +179,7 @@ fn main() {
let format = caps.supported_formats[0].0; let format = caps.supported_formats[0].0;
// Please take a look at the docs for the meaning of the parameters we didn't mention. // Please take a look at the docs for the meaning of the parameters we didn't mention.
Swapchain::new(&device, &window.surface(), 2, format, dimensions, 1, Swapchain::new(&device, &window.surface(), caps.min_image_count, format, dimensions, 1,
&caps.supported_usage_flags, &queue, SurfaceTransform::Identity, alpha, &caps.supported_usage_flags, &queue, SurfaceTransform::Identity, alpha,
present, true, None).expect("failed to create swapchain") present, true, None).expect("failed to create swapchain")
}; };