Skip to content

Commit

Permalink
Add links to the following chapter to every page
Browse files Browse the repository at this point in the history
Fixes #43
  • Loading branch information
SaschaWillems committed Jul 6, 2024
1 parent ae7f3bc commit 00d72dc
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,6 @@ vkGetDeviceQueue(device, indices.graphicsFamily.value(), 0, &graphicsQueue);
----

With the logical device and queue handles we can now actually start using the graphics card to do things!
In the next few chapters we'll set up the resources to present results to the window system.
In the xref:03_Drawing_a_triangle/01_Presentation/00_Window_surface.adoc[next few chapters] we'll set up the resources to present results to the window system.

link:/attachments/04_logical_device.cpp[C{pp} code]
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,6 @@ vkGetDeviceQueue(device, indices.presentFamily.value(), 0, &presentQueue);
----

In case the queue families are the same, the two handles will most likely have the same value now.
In the next chapter we're going to look at swap chains and how they give us the ability to present images to the surface.
In the xref:./01_Swap_chain.adoc[next chapter] we're going to look at swap chains and how they give us the ability to present images to the surface.

link:/attachments/05_window_surface.cpp[C{pp} code]
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,6 @@ swapChainExtent = extent;
----

We now have a set of images that can be drawn onto and can be presented to the window.
The next chapter will begin to cover how we can set up the images as render targets and then we start looking into the actual graphics pipeline and drawing commands!
The xref:./02_Image_views.adoc[next chapter] will begin to cover how we can set up the images as render targets and then we start looking into the actual graphics pipeline and drawing commands!

link:/attachments/06_swap_chain_creation.cpp[C{pp} code]
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ void cleanup() {

An image view is sufficient to start using an image as a texture, but it's not quite ready to be used as a render target just yet.
That requires one more step of indirection, known as a framebuffer.
But first we'll have to set up the graphics pipeline.
In the xref:03_Drawing_a_triangle/02_Graphics_pipeline_basics/00_Introduction.adoc[next chapters] we'll have to set up the graphics pipeline.

link:/attachments/07_image_views.cpp[C{pp} code]
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ void createGraphicsPipeline() {
}
----

The xref:./01_Shader_modules.adoc[next chapter] will talk about shader modules required to actually put something on the screen.

link:/attachments/08_graphics_pipeline.cpp[C{pp} code]
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,6 @@ VkPipelineShaderStageCreateInfo shaderStages[] = {vertShaderStageInfo, fragShade
----

That's all there is to describing the programmable stages of the pipeline.
In the next chapter we'll look at the fixed-function stages.
In the xref:./02_Fixed_functions.adoc[next chapter] we'll look at the fixed-function stages.

link:/attachments/09_shader_modules.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,6 @@ void cleanup() {
}
----

That was a lot of work, but in the next chapter it all comes together to finally create the graphics pipeline object!
That was a lot of work, but in the xref:./04_Conclusion.adoc[next chapter] it all comes together to finally create the graphics pipeline object!

link:/attachments/11_render_passes.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ void cleanup() {

Now run your program to confirm that all this hard work has resulted in a successful pipeline creation!
We are already getting quite close to seeing something pop up on the screen.
In the next couple of chapters we'll set up the actual framebuffers from the swap chain images and prepare the drawing commands.
In the xref:03_Drawing_a_triangle/03_Drawing/00_Framebuffers.adoc[next couple of chapters] we'll set up the actual framebuffers from the swap chain images and prepare the drawing commands.

link:/attachments/12_graphics_pipeline_complete.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
2 changes: 1 addition & 1 deletion en/03_Drawing_a_triangle/03_Drawing/00_Framebuffers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ void cleanup() {
----

We've now reached the milestone where we have all of the objects that are required for rendering.
In the next chapter we're going to write the first actual drawing commands.
In the xref:./01_Command_buffers.adoc[next chapter] we're going to write the first actual drawing commands.

link:/attachments/13_framebuffers.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,6 @@ if (vkEndCommandBuffer(commandBuffer) != VK_SUCCESS) {
}
----

In the next chapter we'll write the code for the main loop, which will acquire an image from the swap chain, record and execute a command buffer, then return the finished image to the swap chain.
In the xref:./02_Rendering_and_presentation.adoc[next chapter] we'll write the code for the main loop, which will acquire an image from the swap chain, record and execute a command buffer, then return the finished image to the swap chain.

link:/attachments/14_command_buffers.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,6 @@ Bootstrapping a Vulkan program is definitely a lot of work, but the take-away me
I recommend you to take some time now to reread the code and build a mental model of the purpose of all of the Vulkan objects in the program and how they relate to each other.
We'll be building on top of that knowledge to extend the functionality of the program from this point on.

The next chapter will expand the render loop to handle multiple frames in flight.
The xref:./03_Frames_in_flight.adoc[next chapter] will expand the render loop to handle multiple frames in flight.

link:/attachments/15_hello_triangle.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,6 @@ You should decide on which approach to use based on performance requirements.

To learn more about synchronization through examples, have a look at https://github.com/KhronosGroup/Vulkan-Docs/wiki/Synchronization-Examples#swapchain-image-acquire-and-present[this extensive overview] by Khronos.

In the next chapter we'll deal with one more small thing that is required for a well-behaved Vulkan program.
In the xref:03_Drawing_a_triangle/04_Swap_chain_recreation.adoc[next chapter] we'll deal with one more small thing that is required for a well-behaved Vulkan program.

link:/attachments/16_frames_in_flight.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
2 changes: 1 addition & 1 deletion en/03_Drawing_a_triangle/04_Swap_chain_recreation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,6 @@ void recreateSwapChain() {
The initial call to `glfwGetFramebufferSize` handles the case where the size is already correct and `glfwWaitEvents` would have nothing to wait on.

Congratulations, you've now finished your very first well-behaved Vulkan program!
In the next chapter we're going to get rid of the hardcoded vertices in the vertex shader and actually use a vertex buffer.
In the xref:04_Vertex_buffers/00_Vertex_input_description.adoc[next chapter] we're going to get rid of the hardcoded vertices in the vertex shader and actually use a vertex buffer.

link:/attachments/17_swap_chain_recreation.cpp[C{pp} code] / link:/attachments/09_shader_base.vert[Vertex shader] / link:/attachments/09_shader_base.frag[Fragment shader]
2 changes: 1 addition & 1 deletion en/04_Vertex_buffers/00_Vertex_input_description.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,6 @@ vertexInputInfo.pVertexAttributeDescriptions = attributeDescriptions.data();

The pipeline is now ready to accept vertex data in the format of the `vertices` container and pass it on to our vertex shader.
If you run the program now with validation layers enabled, you'll see that it complains that there is no vertex buffer bound to the binding.
The next step is to create a vertex buffer and move the vertex data to it so the GPU is able to access it.
The xref:./01_Vertex_buffer_creation.adoc[next step] is to create a vertex buffer and move the vertex data to it so the GPU is able to access it.

link:/attachments/18_vertex_input.cpp[C{pp} code] / link:/attachments/18_shader_vertexbuffer.vert[Vertex shader] / link:/attachments/18_shader_vertexbuffer.frag[Fragment shader]
2 changes: 1 addition & 1 deletion en/04_Vertex_buffers/01_Vertex_buffer_creation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,6 @@ Run the program again and you should see the following:

image::/images/triangle_white.png[]

In the next chapter we'll look at a different way to copy vertex data to a vertex buffer that results in better performance, but takes some more work.
In the xref:./02_Staging_buffer.adoc[next chapter] we'll look at a different way to copy vertex data to a vertex buffer that results in better performance, but takes some more work.

link:/attachments/19_vertex_buffer.cpp[C{pp} code] / link:/attachments/18_shader_vertexbuffer.vert[Vertex shader] / link:/attachments/18_shader_vertexbuffer.frag[Fragment shader]
4 changes: 3 additions & 1 deletion en/04_Vertex_buffers/02_Staging_buffer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,6 @@ The right way to allocate memory for a large number of objects at the same time
You can either implement such an allocator yourself, or use the https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator[VulkanMemoryAllocator] library provided by the GPUOpen initiative.
However, for this tutorial it's okay to use a separate allocation for every resource, because we won't come close to hitting any of these limits for now.

link:/attachments/20_staging_buffer.cpp[C{pp} code] / link:/attachments/18_shader_vertexbuffer.vert[Vertex shader] / link:/attachments/18_shader_vertexbuffer.frag[Fragment shader]
In the xref:./03_Index_buffer.adoc[next chapter] we'll learn about index buffers for vertex reuse.

link:/attachments/20_staging_buffer.cpp[C{pp} code] / link:/attachments/18_shader_vertexbuffer.vert[Vertex shader] / link:/attachments/18_shader_vertexbuffer.frag[Fragment shader]
2 changes: 2 additions & 0 deletions en/04_Vertex_buffers/03_Index_buffer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,6 @@ The advantage is that your data is more cache friendly in that case, because it'
It is even possible to reuse the same chunk of memory for multiple resources if they are not used during the same render operations, provided that their data is refreshed, of course.
This is known as _aliasing_ and some Vulkan functions have explicit flags to specify that you want to do this.

The xref:05_Uniform_buffers/00_Descriptor_set_layout_and_buffer.adoc[next chapter] we'll learn how to pass frequently changing parameters to the GPU.

link:/attachments/21_index_buffer.cpp[C{pp} code] / link:/attachments/18_shader_vertexbuffer.vert[Vertex shader] / link:/attachments/18_shader_vertexbuffer.frag[Fragment shader]
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,6 @@ Using a UBO this way is not the most efficient way to pass frequently changing v
A more efficient way to pass a small buffer of data to shaders are _push constants_.
We may look at these in a future chapter.

In the next chapter we'll look at descriptor sets, which will actually bind the ``VkBuffer``s to the uniform buffer descriptors so that the shader can access this transformation data.
In the xref:./01_Descriptor_pool_and_sets.adoc[next chapter] we'll look at descriptor sets, which will actually bind the ``VkBuffer``s to the uniform buffer descriptors so that the shader can access this transformation data.

link:/attachments/22_descriptor_set_layout.cpp[C{pp} code] / link:/attachments/22_shader_ubo.vert[Vertex shader] / link:/attachments/22_shader_ubo.frag[Fragment shader]
2 changes: 2 additions & 0 deletions en/05_Uniform_buffers/01_Descriptor_pool_and_sets.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -400,4 +400,6 @@ layout(set = 0, binding = 0) uniform UniformBufferObject { ... }
You can use this feature to put descriptors that vary per-object and descriptors that are shared into separate descriptor sets.
In that case you avoid rebinding most of the descriptors across draw calls which is potentially more efficient.

In the xref:06_Texture_mapping/00_Images.adoc[next chapters] we'll build upon what we just learned and add textures to our scene.

link:/attachments/23_descriptor_sets.cpp[C{pp} code] / link:/attachments/22_shader_ubo.vert[Vertex shader] / link:/attachments/22_shader_ubo.frag[Fragment shader]
2 changes: 1 addition & 1 deletion en/06_Texture_mapping/00_Images.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,6 @@ void cleanup() {
----

The image now contains the texture, but we still need a way to access it from the graphics pipeline.
We'll work on that in the next chapter.
We'll work on that in the xref:./01_Image_view_and_sampler.adoc[next chapter].

link:/attachments/24_texture_image.cpp[C{pp} code] / link:/attachments/22_shader_ubo.vert[Vertex shader] / link:/attachments/22_shader_ubo.frag[Fragment shader]
2 changes: 1 addition & 1 deletion en/06_Texture_mapping/01_Image_view_and_sampler.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,6 @@ samplerInfo.anisotropyEnable = VK_FALSE;
samplerInfo.maxAnisotropy = 1.0f;
----

In the next chapter we will expose the image and sampler objects to the shaders to draw the texture onto the square.
In the xref:./02_Combined_image_sampler.adoc[next chapter] we will expose the image and sampler objects to the shaders to draw the texture onto the square.

link:/attachments/25_sampler.cpp[C{pp} code] / link:/attachments/22_shader_ubo.vert[Vertex shader] / link:/attachments/22_shader_ubo.frag[Fragment shader]

0 comments on commit 00d72dc

Please sign in to comment.