forked from pupbrained/vulkan-test
weh
This commit is contained in:
parent
ea7f6d3e1e
commit
80d31eafef
10
src/main.cpp
10
src/main.cpp
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue