MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / setupDebugCallback

Method setupDebugCallback

src/Renderer/vkRenderer.cpp:211–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void 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
224void vkRenderer::createSurface() {
225 if (glfwCreateWindowSurface(instance, window, nullptr, &surface) != VK_SUCCESS) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected