| 159 | } |
| 160 | |
| 161 | void vkRenderer::recreateSwapChain() { |
| 162 | int width, height; |
| 163 | glfwGetWindowSize(window, &width, &height); |
| 164 | if (width == 0 || height == 0) return; |
| 165 | |
| 166 | vkDeviceWaitIdle(device); |
| 167 | |
| 168 | cleanupSwapChain(); |
| 169 | |
| 170 | createSwapChain(); |
| 171 | createImageViews(); |
| 172 | createRenderPass(); |
| 173 | createGraphicsPipeline(); |
| 174 | createFramebuffers(); |
| 175 | createCommandBuffers(); |
| 176 | } |
| 177 | |
| 178 | void vkRenderer::createInstance() { |
| 179 | if (enableValidationLayers && !checkValidationLayerSupport()) { |
nothing calls this directly
no outgoing calls
no test coverage detected