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

Method cleanup

code/08_graphics_pipeline.cpp:117–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected