Application Code

A detailed description of the application code used in this demo will not be given here, but for a more complete understanding, please feel free to browse the source code which is included with the SDK. A basic understanding of Vulkan or OpenGL ES will be required to follow what the code is doing, as the individual nuances of Vulkan and OpenGL ES will also not be covered here.

Structure of the application

The application is as simple as most typical OpenGL ES or Vulkan applications.

The stages are:

  1. Setting up a rendering pipeline

    The pipeline is a simple forward rendering one, as this implementation does not use multiple lights. Nothing special is required for this stage, the pipeline could be forward, deferred or another type.

  2. Loading a model by uploading mesh data into a vertex buffer object (VBO)/index buffer object (IBO)

  3. Loading textures such as the environment map, IBL maps, material textures and so on

    All of these must be loaded into Textures for OpenGL ES, or Image, Image View, and Descriptor Sets for Vulkan.

  4. Defining and setting the logic and dynamic elements of the application

    These include the positions of the camera and the objects, using transformation matrices and light and/or model properties.

  5. Updating the Uniforms/UBOs, binding textures/descriptor sets and so on

  6. Kicking draws for the skybox itself and the model

As mentioned before, there will not be any detailed descriptions of these stages in this document. This summary is just to give a high-level overview of what the application is doing, but feel free to examine the application source code to see how these stages are actually implemented.