1.3 KiB
1.3 KiB
Vulkan Notes
Main Data Structures
Instance
The most important part
- Purpose
- Serves as the connection between the application and Vulkan itself.
- Usage
-
Call src_c++{vk::CreateInstance} and pass in an src_c++{InstanceCreateInfo} object
- Note
- Anything starting with src_c++{p} / src_c++{pp} is a pointer / pointer to a pointer, respectively.
vk::ApplicationInfo appInfo {
.pApplicationName = "Vulkan App", // App name
.applicationVersion = 1, // App version
.pEngineName = "No Engine", // Engine name
.engineVersion = 1, // Engine version
.apiVersion = vk::ApiVersion10 // API compatibility version
};
vk::InstanceCreateInfo createInfo {
.pApplicationInfo = &appInfo, // ApplicationInfo object
.enabledLayerCount = 0, // # of enabled layers
.ppEnabledLayerNames = nullptr, // Names of enabled layers
.enabledExtensionCount = 0, // # of enabled extensions
.ppEnabledExtensionNames = nullptr // Names of enabled extensions
};
vk::Instance instance = vk::createInstance(createInfo);