| 209 | } |
| 210 | |
| 211 | void vkRenderer::setupDebugCallback() { |
| 212 | if (!enableValidationLayers) return; |
| 213 | |
| 214 | VkDebugReportCallbackCreateInfoEXT createInfo = {}; |
| 215 | createInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; |
| 216 | createInfo.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT; |
| 217 | createInfo.pfnCallback = debugCallback; |
| 218 | |
| 219 | if (CreateDebugReportCallbackEXT(instance, &createInfo, nullptr, &callback) != VK_SUCCESS) { |
| 220 | throw std::runtime_error("failed to set up debug callback!"); |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | void vkRenderer::createSurface() { |
| 225 | if (glfwCreateWindowSurface(instance, window, nullptr, &surface) != VK_SUCCESS) { |
nothing calls this directly
no test coverage detected