diff --git a/attachments/17_swap_chain_recreation.cpp b/attachments/17_swap_chain_recreation.cpp index dc383952..da327eb5 100644 --- a/attachments/17_swap_chain_recreation.cpp +++ b/attachments/17_swap_chain_recreation.cpp @@ -124,6 +124,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/18_vertex_input.cpp b/attachments/18_vertex_input.cpp index f19569f8..d7986ce6 100644 --- a/attachments/18_vertex_input.cpp +++ b/attachments/18_vertex_input.cpp @@ -148,6 +148,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/19_vertex_buffer.cpp b/attachments/19_vertex_buffer.cpp index 277810a4..5d26796b 100644 --- a/attachments/19_vertex_buffer.cpp +++ b/attachments/19_vertex_buffer.cpp @@ -152,6 +152,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/20_staging_buffer.cpp b/attachments/20_staging_buffer.cpp index 7a394a0a..f5c74fba 100644 --- a/attachments/20_staging_buffer.cpp +++ b/attachments/20_staging_buffer.cpp @@ -152,6 +152,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/21_index_buffer.cpp b/attachments/21_index_buffer.cpp index 2d8b07da..8f2d5ba5 100644 --- a/attachments/21_index_buffer.cpp +++ b/attachments/21_index_buffer.cpp @@ -160,7 +160,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); - swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/22_descriptor_layout.cpp b/attachments/22_descriptor_layout.cpp index fdcb0c8a..b5967ac1 100644 --- a/attachments/22_descriptor_layout.cpp +++ b/attachments/22_descriptor_layout.cpp @@ -177,6 +177,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/23_descriptor_sets.cpp b/attachments/23_descriptor_sets.cpp index 3d23c10e..46a9efb1 100644 --- a/attachments/23_descriptor_sets.cpp +++ b/attachments/23_descriptor_sets.cpp @@ -182,6 +182,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/24_texture_image.cpp b/attachments/24_texture_image.cpp index 1599a0c8..1d41d7da 100644 --- a/attachments/24_texture_image.cpp +++ b/attachments/24_texture_image.cpp @@ -189,6 +189,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/25_sampler.cpp b/attachments/25_sampler.cpp index 921e19e2..6faeb033 100644 --- a/attachments/25_sampler.cpp +++ b/attachments/25_sampler.cpp @@ -193,6 +193,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/26_texture_mapping.cpp b/attachments/26_texture_mapping.cpp index 333d60c3..41c2c5e8 100644 --- a/attachments/26_texture_mapping.cpp +++ b/attachments/26_texture_mapping.cpp @@ -195,6 +195,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() { diff --git a/attachments/27_depth_buffering.cpp b/attachments/27_depth_buffering.cpp index d475a262..e59ba34d 100644 --- a/attachments/27_depth_buffering.cpp +++ b/attachments/27_depth_buffering.cpp @@ -207,6 +207,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() const { diff --git a/attachments/28_model_loading.cpp b/attachments/28_model_loading.cpp index 3261d941..72ee0932 100644 --- a/attachments/28_model_loading.cpp +++ b/attachments/28_model_loading.cpp @@ -211,6 +211,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() const { diff --git a/attachments/29_mipmapping.cpp b/attachments/29_mipmapping.cpp index b8821288..9608d69b 100644 --- a/attachments/29_mipmapping.cpp +++ b/attachments/29_mipmapping.cpp @@ -212,6 +212,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() const { diff --git a/attachments/30_multisampling.cpp b/attachments/30_multisampling.cpp index fde957cc..ba70e368 100644 --- a/attachments/30_multisampling.cpp +++ b/attachments/30_multisampling.cpp @@ -219,7 +219,8 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainImageViews.clear(); - } + swapChain = nullptr; + } void cleanup() const { glfwDestroyWindow(window); diff --git a/attachments/31_compute_shader.cpp b/attachments/31_compute_shader.cpp index 72c54651..9ccaa53b 100644 --- a/attachments/31_compute_shader.cpp +++ b/attachments/31_compute_shader.cpp @@ -191,6 +191,7 @@ class ComputeShaderApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() const { diff --git a/attachments/32_ecosystem_utilities.cpp b/attachments/32_ecosystem_utilities.cpp index ced855ae..1bc2594e 100644 --- a/attachments/32_ecosystem_utilities.cpp +++ b/attachments/32_ecosystem_utilities.cpp @@ -237,6 +237,7 @@ class HelloTriangleApplication { void cleanupSwapChain() { swapChainFramebuffers.clear(); swapChainImageViews.clear(); + swapChain = nullptr; } void cleanup() const { diff --git a/attachments/35_gltf_ktx.cpp b/attachments/35_gltf_ktx.cpp index 29b11304..77034050 100644 --- a/attachments/35_gltf_ktx.cpp +++ b/attachments/35_gltf_ktx.cpp @@ -358,6 +358,7 @@ class VulkanApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } #if PLATFORM_DESKTOP diff --git a/attachments/36_multiple_objects.cpp b/attachments/36_multiple_objects.cpp index 2260c1ce..e9e444ae 100644 --- a/attachments/36_multiple_objects.cpp +++ b/attachments/36_multiple_objects.cpp @@ -405,6 +405,7 @@ class VulkanApplication { void cleanupSwapChain() { swapChainImageViews.clear(); + swapChain = nullptr; } #if PLATFORM_DESKTOP diff --git a/attachments/37_multithreading.cpp b/attachments/37_multithreading.cpp index db4dc7ff..11c893d8 100644 --- a/attachments/37_multithreading.cpp +++ b/attachments/37_multithreading.cpp @@ -435,6 +435,8 @@ class MultithreadedApplication { // Clean up shader storage buffers shaderStorageBuffers.clear(); shaderStorageBuffersMemory.clear(); + + swapChain = nullptr; } void stopThreads() {