In this recipe, we will see how to create a commonly used graphics pipeline, in which vertex and fragment shaders are active and a depth test is enabled. We will also specify that viewport and scissor tests are set up dynamically.
Creating a graphics pipeline with vertex and fragment shaders, depth test enabled, and with dynamic viewport and scissor tests
How to do it...
- Take the handle of a logical device. Use it to initialize a variable of type VkDevice named logical_device.
- Take the SPIR-V assembly of a vertex shader and use it, along with the logical_device variable, to create a shader module. Store it in a variable of type VkShaderModule named vertex_shader_module (refer to the Creating a shader module recipe).
- Take the SPIR-V assembly of a fragment shader...