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

Method cleanup

code/07_image_views.cpp:116–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 }
115
116 void cleanup() {
117 for (auto imageView : swapChainImageViews) {
118 vkDestroyImageView(device, imageView, nullptr);
119 }
120
121 vkDestroySwapchainKHR(device, swapChain, nullptr);
122 vkDestroyDevice(device, nullptr);
123
124 if (enableValidationLayers) {
125 DestroyDebugUtilsMessengerEXT(instance, debugMessenger, nullptr);
126 }
127
128 vkDestroySurfaceKHR(instance, surface, nullptr);
129 vkDestroyInstance(instance, nullptr);
130
131 glfwDestroyWindow(window);
132
133 glfwTerminate();
134 }
135
136 void createInstance() {
137 if (enableValidationLayers && !checkValidationLayerSupport()) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected