| 93 | } |
| 94 | |
| 95 | void cleanup() { |
| 96 | vkDestroyDevice(device, nullptr); |
| 97 | |
| 98 | if (enableValidationLayers) { |
| 99 | DestroyDebugUtilsMessengerEXT(instance, debugMessenger, nullptr); |
| 100 | } |
| 101 | |
| 102 | vkDestroySurfaceKHR(instance, surface, nullptr); |
| 103 | vkDestroyInstance(instance, nullptr); |
| 104 | |
| 105 | glfwDestroyWindow(window); |
| 106 | |
| 107 | glfwTerminate(); |
| 108 | } |
| 109 | |
| 110 | void createInstance() { |
| 111 | if (enableValidationLayers && !checkValidationLayerSupport()) { |
nothing calls this directly
no test coverage detected