notes/VulkanNotes.org

39 lines
1.3 KiB
Org Mode
Raw Permalink Normal View History

2024-10-02 17:45:51 -04:00
#+TITLE: Vulkan Notes
#+AUTHOR: Mars (@pupbrained)
#+EMAIL: mars@pupbrained.xyz
* 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.
#+begin_src c++
vk::ApplicationInfo appInfo {
.pApplicationName = "Vulkan App", // App name
.applicationVersion = 1, // App version
2024-10-05 01:28:28 -04:00
.pEngineName = "No Engine", // Engine name
.engineVersion = 1, // Engine version
.apiVersion = vk::ApiVersion10 // API compatibility version
2024-10-02 17:45:51 -04:00
};
vk::InstanceCreateInfo createInfo {
2024-10-05 01:28:28 -04:00
.pApplicationInfo = &appInfo, // ApplicationInfo object
.enabledLayerCount = 0, // # of enabled layers
2024-10-02 17:45:51 -04:00
.ppEnabledLayerNames = nullptr, // Names of enabled layers
.enabledExtensionCount = 0, // # of enabled extensions
.ppEnabledExtensionNames = nullptr // Names of enabled extensions
};
vk::Instance instance = vk::createInstance(createInfo);
#+end_src
** DebugUtilsMessenger
*** Used by validation layers
** CreateInfo
*** Information for creation of various objects