| 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()) { |
nothing calls this directly
no test coverage detected