This commit is contained in:
Mars 2024-09-28 19:38:13 -04:00
parent ea7f6d3e1e
commit 80d31eafef
Signed by: pupbrained
GPG key ID: 874E22DF2F9DFCB5

View file

@ -9,7 +9,8 @@
#include <span> #include <span>
#include <stdexcept> #include <stdexcept>
#include "src/util/types.h" #include "util/magic_enum.hpp"
#include "util/types.h"
const uint32_t WIDTH = 800; const uint32_t WIDTH = 800;
const uint32_t HEIGHT = 600; const uint32_t HEIGHT = 600;
@ -183,8 +184,11 @@ class Application {
} }
fn createSurface() -> void { fn createSurface() -> void {
if (glfwCreateWindowSurface(mInstance, mWindow, nullptr, &mSurface) != VK_SUCCESS) if (VkResult result = glfwCreateWindowSurface(mInstance, mWindow, nullptr, &mSurface);
throw std::runtime_error("failed to create window surface!"); result != VK_SUCCESS)
throw std::runtime_error(
"Failed to create window surface! Error: " + string(magic_enum::enum_name(result))
);
} }
fn pickPhysicalDevice() -> void { fn pickPhysicalDevice() -> void {