Skip to content

Vulkan Tutorial code snippet doesn't match explanation #179

@XavierCS-dev

Description

@XavierCS-dev

I was reading the following section of the vulkan tutorial: https://docs.vulkan.org/tutorial/latest/03_Drawing_a_triangle/03_Drawing/02_Rendering_and_presentation.html#_waiting_for_the_previous_frame

The following text can be observed:

At the start of the frame, we want to wait until the previous frame has finished, so that the command buffer and semaphores are available to use. To do that, we call vkWaitForFences:

However, the code snippet that follows does not appear to match what the preceding text implies:

void drawFrame() {
   auto [result, imageIndex] = swapChain.acquireNextImage( UINT64_MAX, *presentCompleteSemaphore, nullptr );
}

The text beyond this code snippet also does not appear to match it:

First, let’s grab an image from the framebuffer after the previous frame has finished. The first two parameters of vkAcquireNextImageKHR are the logical device and the swap chain from which we wish to acquire an image. The third parameter specifies a timeout in nanoseconds for an image to become available. Using the maximum value of a 64-bit unsigned integer means we effectively disable the timeout.....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions