How to do it...

  1. Prepare Vulkan resources as described in the Rendering a geometry with a vertex diffuse lighting recipe.
  2. Load a 3D model data from file with vertex positions and normal vectors. This model will be displayed as the one reflecting and transmitting the environment (refer to the Loading a 3D model from an OBJ file recipe from Chapter 10Helper Recipes).
  3. Create a (vertex) buffer with a memory object and use it store the vertex data for our model (refer to the Creating a buffer, Allocating and binding memory object to a buffer and Using staging buffer to update buffer with a device-local memory bound recipes from Chapter 4, Resources and Memory).
  4. Load a 3D model containing vertex positions of a cube. This model will be used to ...

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.