@@ -55,8 +55,8 @@ presentation can happen. Create two class members to store these semaphore
5555objects:
5656
5757``` c++
58- VDeleter< VkSemaphore> imageAvailableSemaphore{device, vkDestroySemaphore} ;
59- VDeleter< VkSemaphore > renderFinishedSemaphore{device, vkDestroySemaphore} ;
58+ VkSemaphore imageAvailableSemaphore;
59+ VkSemaphore renderFinishedSemaphore;
6060```
6161
6262To create the semaphores, we'll add the last ` create ` function for this part of
@@ -102,8 +102,8 @@ Future versions of the Vulkan API or extensions may add functionality for the
102102the semaphores follows the familiar pattern with ` vkCreateSemaphore ` :
103103
104104``` c++
105- if (vkCreateSemaphore(device, &semaphoreInfo, nullptr , imageAvailableSemaphore.replace() ) != VK_SUCCESS ||
106- vkCreateSemaphore (device, &semaphoreInfo, nullptr, renderFinishedSemaphore.replace() ) != VK_SUCCESS) {
105+ if (vkCreateSemaphore(device, &semaphoreInfo, nullptr , & imageAvailableSemaphore) != VK_SUCCESS ||
106+ vkCreateSemaphore (device, &semaphoreInfo, nullptr, & renderFinishedSemaphore) != VK_SUCCESS) {
107107
108108 throw std::runtime_error("failed to create semaphores!");
109109}
@@ -310,8 +310,8 @@ something resembling the following when you run your program:
310310
311311
312312Yay! Unfortunately, you'll see that when validation layers are enabled, the
313- program crashes as soon as you close it. The message printed to the terminal
314- from `debugCallback` tells us why:
313+ program crashes as soon as you close it. The messages printed to the terminal
314+ from `debugCallback` tell us why:
315315
316316
317317
@@ -331,8 +331,6 @@ void mainLoop() {
331331 }
332332
333333 vkDeviceWaitIdle(device);
334-
335- glfwDestroyWindow(window);
336334}
337335```
338336
0 commit comments