mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 14:56:42 +00:00
Merge pull request #343 from Binero/master
Examples now use min_image_count-buffering
This commit is contained in:
commit
c466d9764a
@ -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,
|
||||||
|
@ -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")
|
||||||
|
@ -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")
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user