O'Reilly logo

Learning Vulkan by Parminder Singh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Vulkan instance

A Vulkan instance is a primary object that is required to build an application; it stores all the application states. It is of the type VkInstance and is managed inside the VulkanInstance class, which is user-defined (VulkanInstance.h/cpp). This class is responsible for the creation and destruction of the Vulkan instance object. The following is the implementation of the header file:

class VulkanInstance { // Many lines skipped 
 
     
    // Vulkan instance object variable 
    VkInstance instance; 
 
    // Vulkan instance specific layer and extensions 
    VulkanLayerAndExtension       layerExtension; 
 
    // Functions for Creation and Deletion of Vulkan instance VkResult createInstance( vector<const char *>& layers, vector<const char *>& extensions, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required