Skip to content

Commit cbf32cc

Browse files
committed
Fix inconsistency between tutorial and code
1 parent 29ab167 commit cbf32cc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

en/05_Uniform_buffers/00_Descriptor_layout_and_buffer.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,19 +293,16 @@ void cleanup() {
293293

294294
## Updating uniform data
295295

296-
Create a new function `updateUniformBuffer` and add a call to it from the `drawFrame` function right after we know which swap chain image we're going to acquire:
296+
Create a new function `updateUniformBuffer` and add a call to it from the `drawFrame` function before submitting the next frame:
297297

298298
```c++
299299
void drawFrame() {
300300
...
301301

302-
uint32_t imageIndex;
303-
VkResult result = vkAcquireNextImageKHR(device, swapChain, UINT64_MAX, imageAvailableSemaphores[currentFrame], VK_NULL_HANDLE, &imageIndex);
302+
updateUniformBuffer(currentFrame);
304303

305304
...
306305

307-
updateUniformBuffer(imageIndex);
308-
309306
VkSubmitInfo submitInfo{};
310307
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
311308

0 commit comments

Comments
 (0)