Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion attachments/17_swap_chain_recreation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/19_vertex_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/20_staging_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/21_index_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/22_descriptor_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/23_descriptor_sets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/24_texture_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/25_sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/26_texture_mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/27_depth_buffering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,15 @@ class HelloTriangleApplication
void recreateSwapChain()
{
int width = 0, height = 0;
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/28_model_loading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,15 @@ class HelloTriangleApplication
void recreateSwapChain()
{
int width = 0, height = 0;
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/29_mipmapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,15 @@ class HelloTriangleApplication
void recreateSwapChain()
{
int width = 0, height = 0;
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/30_multisampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,15 @@ class HelloTriangleApplication
void recreateSwapChain()
{
int width = 0, height = 0;
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/31_compute_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,15 @@ class ComputeShaderApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/32_ecosystem_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/33_vulkan_profiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,15 @@ class HelloTriangleApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
6 changes: 5 additions & 1 deletion attachments/34_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1389,11 +1389,15 @@ class HelloTriangleApplication
if (window)
{
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}
}
#endif
// Wait for device to finish operations
Expand Down
6 changes: 5 additions & 1 deletion attachments/35_gltf_ktx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,15 @@ class VulkanApplication
#if PLATFORM_DESKTOP
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}
#endif

device.waitIdle();
Expand Down
6 changes: 5 additions & 1 deletion attachments/36_multiple_objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,15 @@ class VulkanApplication
#if PLATFORM_DESKTOP
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}
#endif

device.waitIdle();
Expand Down
6 changes: 5 additions & 1 deletion attachments/37_multithreading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,15 @@ class MultithreadedApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}
device.waitIdle();

cleanupSwapChain();
Expand Down
6 changes: 5 additions & 1 deletion attachments/38_ray_tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,15 @@ class VulkanRaytracingApplication
{
int width = 0, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0)
while ((width == 0 || height == 0) && !glfwWindowShouldClose(window))
{
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
if (glfwWindowShouldClose(window))
{
return;
}

device.waitIdle();

Expand Down
Loading
Loading