Compare commits
No commits in common. "aadf46f0666120a942842dbee8a3d4d87d992b12" and "6395c6b95cf0cd435c4d84c9b4a5471aefc12c97" have entirely different histories.
aadf46f066
...
6395c6b95c
1 changed files with 8 additions and 3 deletions
11
src/main.cpp
11
src/main.cpp
|
@ -1,6 +1,11 @@
|
||||||
|
#define GLFW_INCLUDE_NONE
|
||||||
|
#define GLFW_INCLUDE_VULKAN
|
||||||
|
#include <GLFW/glfw3.h>
|
||||||
|
#include <cstdlib>
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#define VK_ENABLE_BETA_EXTENSIONS
|
#define VK_ENABLE_BETA_EXTENSIONS
|
||||||
|
@ -64,7 +69,7 @@ class VulkanApp {
|
||||||
vkfw::WindowHints hints;
|
vkfw::WindowHints hints;
|
||||||
|
|
||||||
hints.clientAPI = vkfw::ClientAPI::eNone;
|
hints.clientAPI = vkfw::ClientAPI::eNone;
|
||||||
hints.resizable = vkfw::eFalse;
|
hints.resizable = false;
|
||||||
|
|
||||||
mWindow = vkfw::createWindowUnique(WIDTH, HEIGHT, "Vulkan", hints);
|
mWindow = vkfw::createWindowUnique(WIDTH, HEIGHT, "Vulkan", hints);
|
||||||
}
|
}
|
||||||
|
@ -239,7 +244,7 @@ class VulkanApp {
|
||||||
std::vector extensions(extensionsSpan.begin(), extensionsSpan.end());
|
std::vector extensions(extensionsSpan.begin(), extensionsSpan.end());
|
||||||
|
|
||||||
if (enableValidationLayers)
|
if (enableValidationLayers)
|
||||||
extensions.push_back(vk::EXTDebugUtilsExtensionName);
|
extensions.push_back("VK_EXT_debug_utils");
|
||||||
|
|
||||||
return extensions;
|
return extensions;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +276,7 @@ class VulkanApp {
|
||||||
) -> vk::Bool32 {
|
) -> vk::Bool32 {
|
||||||
fmt::println("Validation layer: {}", pCallbackData->pMessage);
|
fmt::println("Validation layer: {}", pCallbackData->pMessage);
|
||||||
|
|
||||||
return vk::False;
|
return VK_FALSE;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue