From d489322ab221b2c4bd5c9e2d4b09f5424675e934 Mon Sep 17 00:00:00 2001 From: Mars Date: Sun, 29 Sep 2024 23:11:12 -0400 Subject: [PATCH] blegh --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 5967653..e08dde1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,7 +22,7 @@ constexpr bool enableValidationLayers = false; constexpr bool enableValidationLayers = true; #endif -class HelloTriangleApplication { +class VulkanApp { public: void run() { initWindow(); @@ -144,13 +144,14 @@ class HelloTriangleApplication { glfwExtensions = glfwGetRequiredInstanceExtensions(&glfwExtensionCount); std::vector extensions; + if (glfwExtensions) { std::span extSpan(glfwExtensions, glfwExtensionCount); extensions.assign(extSpan.begin(), extSpan.end()); } if (enableValidationLayers) - extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME); + extensions.push_back("VK_EXT_debug_utils"); return extensions; } @@ -168,7 +169,7 @@ class HelloTriangleApplication { }; fn main() -> i32 { - HelloTriangleApplication app; + VulkanApp app; try { app.run();