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

Method cleanup

code/11_render_passes.cpp:122–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120 }
121
122 void cleanup() {
123 vkDestroyPipelineLayout(device, pipelineLayout, nullptr);
124 vkDestroyRenderPass(device, renderPass, nullptr);
125
126 for (auto imageView : swapChainImageViews) {
127 vkDestroyImageView(device, imageView, nullptr);
128 }
129
130 vkDestroySwapchainKHR(device, swapChain, nullptr);
131 vkDestroyDevice(device, nullptr);
132
133 if (enableValidationLayers) {
134 DestroyDebugUtilsMessengerEXT(instance, debugMessenger, nullptr);
135 }
136
137 vkDestroySurfaceKHR(instance, surface, nullptr);
138 vkDestroyInstance(instance, nullptr);
139
140 glfwDestroyWindow(window);
141
142 glfwTerminate();
143 }
144
145 void createInstance() {
146 if (enableValidationLayers && !checkValidationLayerSupport()) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected