diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-21 00:04:32 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-21 00:04:32 +0100 |
commit | a106e1cf85cbc934dc7628cd3328a8195404ce8b (patch) | |
tree | 51f6c6bc5053c77e23ad09d9552e40c51ca1fb38 /game/main.cpp | |
parent | b438dd7bf4082e2b6a23e3995d5c249b33102abc (diff) |
Add Vulkan 1.3 headers
Diffstat (limited to 'game/main.cpp')
-rw-r--r-- | game/main.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/game/main.cpp b/game/main.cpp index 46f08f0..c78c41e 100644 --- a/game/main.cpp +++ b/game/main.cpp @@ -1,7 +1,14 @@ #include <asl/print.hpp>
+#include <asl/buffer.hpp>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
+#include <SDL3/SDL_vulkan.h>
+
+#define VK_NO_STDDEF_H
+#define VK_NO_STDINT_H
+#define VK_NO_PROTOTYPES
+#include <vulkan.h>
int SDL_main(int /* argc */, char* /* argv */[])
{
@@ -10,6 +17,26 @@ int SDL_main(int /* argc */, char* /* argv */[]) SDL_ShowWindow(window);
+ asl::buffer<const char*> instance_extensions;
+ asl::buffer<const char*> device_extensions;
+ asl::buffer<const char*> layers;
+
+ {
+ uint32_t count = 0;
+ const char* const* extensions = SDL_Vulkan_GetInstanceExtensions(&count);
+ for (uint32_t i = 0; i < count; ++i)
+ {
+ instance_extensions.push(extensions[i]); // NOLINT(*-pointer-arithmetic)
+ }
+ }
+
+ layers.push("VK_LAYER_KHRONOS_validation");
+ layers.push("VK_LAYER_LUNARG_monitor");
+
+ instance_extensions.push(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
+
+ device_extensions.push(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
+
bool running = true;
while (running)
{
|