How to do it...

  1. Take the handle of a logical device. Use it to initialize a variable of type VkDevice named logical_device.
  2. 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).
  3. Take the SPIR-V assembly of a fragment shader and using it, along with the logical_device variable, create a second shader module. Store its handle in a variable of type VkShaderModule named fragment_shader_module (refer to the Creating a shader module recipe).
  4. Create a variable of type std::vector named shader_stage_params with elements of a custom ShaderStageParameters type ...

Get Vulkan Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.