Compare commits
2 commits
6395c6b95c
...
aadf46f066
Author | SHA1 | Date | |
---|---|---|---|
aadf46f066 | |||
10af83237f |
1 changed files with 3 additions and 8 deletions
11
src/main.cpp
11
src/main.cpp
|
@ -1,11 +1,6 @@
|
||||||
#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
|
||||||
|
@ -69,7 +64,7 @@ class VulkanApp {
|
||||||
vkfw::WindowHints hints;
|
vkfw::WindowHints hints;
|
||||||
|
|
||||||
hints.clientAPI = vkfw::ClientAPI::eNone;
|
hints.clientAPI = vkfw::ClientAPI::eNone;
|
||||||
hints.resizable = false;
|
hints.resizable = vkfw::eFalse;
|
||||||
|
|
||||||
mWindow = vkfw::createWindowUnique(WIDTH, HEIGHT, "Vulkan", hints);
|
mWindow = vkfw::createWindowUnique(WIDTH, HEIGHT, "Vulkan", hints);
|
||||||
}
|
}
|
||||||
|
@ -244,7 +239,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_EXT_debug_utils");
|
extensions.push_back(vk::EXTDebugUtilsExtensionName);
|
||||||
|
|
||||||
return extensions;
|
return extensions;
|
||||||
}
|
}
|
||||||
|
@ -276,7 +271,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