Creating an Instance

An instance provides a link between the application and the API

In order to initialise Vulkan, the application must load function pointers to Vulkan commands and create an instance.

What is an instance?

An instance provides a link between the application and API. It stores all of the application specific state and provides it with access to the Vulkan library functions. All other Vulkan objects in the lifetime of the application are created from the instance.

Creating an instance initialises selected layers and extensions alongside the Vulkan library. The application also supplies the driver with some information about itself, such as the application name and the API version used.

Example: initApplicationAndInstance()

In the example code, initApplicationAndInstance() creates an instance and then retrieves the correct function pointers. As with all other Vulkan objects, a creation struct is populated with information about the instance, including the layers and extensions which have previously been selected. The instance is then created by calling vkCreateInstance().