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

View file

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