MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / cleanup

Method cleanup

code/06_swap_chain_creation.cpp:114–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 }
113
114 void cleanup() {
115 vkDestroySwapchainKHR(device, swapChain, nullptr);
116 vkDestroyDevice(device, nullptr);
117
118 if (enableValidationLayers) {
119 DestroyDebugUtilsMessengerEXT(instance, debugMessenger, nullptr);
120 }
121
122 vkDestroySurfaceKHR(instance, surface, nullptr);
123 vkDestroyInstance(instance, nullptr);
124
125 glfwDestroyWindow(window);
126
127 glfwTerminate();
128 }
129
130 void createInstance() {
131 if (enableValidationLayers && !checkValidationLayerSupport()) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected