mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +00:00
Add 's' to dimension in Swapchain::recreate_with_dimension (#1315)
This commit is contained in:
parent
dd7b202e80
commit
c620aefd29
@ -1,5 +1,6 @@
|
||||
# Version 0.17.0 (TBA)
|
||||
|
||||
- **Breaking** Swapchain::recreate_with_dimension() is now Swapchain::recreate_with_dimensions()
|
||||
- **Breaking** Sync::SharingMode::Exclusive(queue_family: u32) is now Sync::SharingMode::Exclusive.
|
||||
- **Breaking** Added Swapchain::with_old_swapchain() - same as previous Swapchain::new(), if an oldswapchain needs to be used
|
||||
- **Breaking** Swapchain::new() now doesnt need to have the old_swapchain parameter anymore but requires the ColorSpace
|
||||
|
@ -101,7 +101,7 @@ fn main() {
|
||||
|
||||
if recreate_swapchain {
|
||||
let dimensions: [u32; 2] = surface.window().inner_size().into();
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimensions(dimensions) {
|
||||
Ok(r) => r,
|
||||
Err(SwapchainCreationError::UnsupportedDimensions) => return,
|
||||
Err(e) => panic!("Failed to recreate swapchain: {:?}", e)
|
||||
|
@ -162,7 +162,7 @@ fn main() {
|
||||
|
||||
if recreate_swapchain {
|
||||
let dimensions: [u32; 2] = surface.window().inner_size().into();
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimensions(dimensions) {
|
||||
Ok(r) => r,
|
||||
Err(SwapchainCreationError::UnsupportedDimensions) => return,
|
||||
Err(e) => panic!("Failed to recreate swapchain: {:?}", e)
|
||||
|
@ -219,7 +219,7 @@ fn main() {
|
||||
|
||||
if recreate_swapchain {
|
||||
let dimensions: [u32; 2] = surface.window().inner_size().into();
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimensions(dimensions) {
|
||||
Ok(r) => r,
|
||||
Err(SwapchainCreationError::UnsupportedDimensions) => return,
|
||||
Err(e) => panic!("Failed to recreate swapchain: {:?}", e)
|
||||
|
@ -208,7 +208,7 @@ fn main() {
|
||||
|
||||
if recreate_swapchain {
|
||||
let dimensions: [u32; 2] = surface.window().inner_size().into();
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimensions(dimensions) {
|
||||
Ok(r) => r,
|
||||
Err(SwapchainCreationError::UnsupportedDimensions) => return,
|
||||
Err(e) => panic!("Failed to recreate swapchain: {:?}", e)
|
||||
|
@ -216,7 +216,7 @@ fn main() {
|
||||
|
||||
if *recreate_swapchain {
|
||||
let dimensions: [u32; 2] = surface.window().inner_size().into();
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimensions(dimensions) {
|
||||
Ok(r) => r,
|
||||
Err(SwapchainCreationError::UnsupportedDimensions) => return,
|
||||
Err(e) => panic!("Failed to recreate swapchain: {:?}", e)
|
||||
|
@ -396,7 +396,7 @@ fn main() {
|
||||
|
||||
if recreate_swapchain {
|
||||
let dimensions: [u32; 2] = surface.window().inner_size().into();
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimensions(dimensions) {
|
||||
Ok(r) => r,
|
||||
Err(SwapchainCreationError::UnsupportedDimensions) => return,
|
||||
Err(e) => panic!("Failed to recreate swapchain: {:?}", e)
|
||||
|
@ -130,7 +130,7 @@ fn main() {
|
||||
|
||||
if recreate_swapchain {
|
||||
let dimensions: [u32; 2] = surface.window().inner_size().into();
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimensions(dimensions) {
|
||||
Ok(r) => r,
|
||||
Err(SwapchainCreationError::UnsupportedDimensions) => return,
|
||||
Err(e) => panic!("Failed to recreate swapchain: {:?}", e)
|
||||
|
@ -238,7 +238,7 @@ fn main() {
|
||||
|
||||
if recreate_swapchain {
|
||||
let dimensions: [u32; 2] = surface.window().inner_size().into();
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimensions(dimensions) {
|
||||
Ok(r) => r,
|
||||
Err(SwapchainCreationError::UnsupportedDimensions) => return,
|
||||
Err(e) => panic!("Failed to recreate swapchain: {:?}", e)
|
||||
|
@ -324,7 +324,7 @@ fn main() {
|
||||
if recreate_swapchain {
|
||||
// Get the new dimensions of the window.
|
||||
let dimensions: [u32; 2] = surface.window().inner_size().into();
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
|
||||
let (new_swapchain, new_images) = match swapchain.recreate_with_dimensions(dimensions) {
|
||||
Ok(r) => r,
|
||||
// This error tends to happen when the user is manually resizing the window.
|
||||
// Simply restarting the loop is the easiest way to fix this issue.
|
||||
|
@ -276,7 +276,7 @@
|
||||
//!
|
||||
//! loop {
|
||||
//! if recreate_swapchain {
|
||||
//! swapchain = swapchain.0.recreate_with_dimension([1024, 768]).unwrap();
|
||||
//! swapchain = swapchain.0.recreate_with_dimensions([1024, 768]).unwrap();
|
||||
//! recreate_swapchain = false;
|
||||
//! }
|
||||
//!
|
||||
|
@ -295,7 +295,7 @@ impl <W> Swapchain<W> {
|
||||
}
|
||||
|
||||
/// Recreates the swapchain with new dimensions.
|
||||
pub fn recreate_with_dimension(
|
||||
pub fn recreate_with_dimensions(
|
||||
&self, dimensions: [u32; 2])
|
||||
-> Result<(Arc<Swapchain<W>>, Vec<Arc<SwapchainImage<W>>>), SwapchainCreationError> {
|
||||
Swapchain::new_inner(self.device.clone(),
|
||||
|
Loading…
Reference in New Issue
Block a user