Skip to content

Commit 2d95101

Browse files
committed
(gpu) don't expose wsi internals
1 parent 4ef38e0 commit 2d95101

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

include/stormkit/gpu/vulkan.hpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44

55
#include <stormkit/core/platform_macro.hpp>
66

7-
#ifdef STORMKIT_OS_LINUX
8-
#define VK_USE_PLATFORM_XCB_KHR
9-
#define VK_USE_PLATFORM_WAYLAND_KHR
10-
#elifdef STORMKIT_OS_WINDOWS
11-
#define VK_USE_PLATFORM_WIN32_KHR
12-
#include <stormkit/core/platform/windows.hpp>
13-
#undef OPAQUE
14-
#elifdef STORMKIT_OS_MACOS
15-
#define VK_USE_PLATFORM_MACOS_MVK
16-
#elifdef STORMKIT_OS_IOS
17-
#define VK_USE_PLATFORM_IOS_MVK
7+
#ifdef STORMKIT_DEFINE_VK_PLATFORM
8+
#ifdef STORMKIT_OS_LINUX
9+
#define VK_USE_PLATFORM_XCB_KHR
10+
#define VK_USE_PLATFORM_WAYLAND_KHR
11+
#elifdef STORMKIT_OS_WINDOWS
12+
#define VK_USE_PLATFORM_WIN32_KHR
13+
#include <stormkit/core/platform/windows.hpp>
14+
#undef OPAQUE
15+
#elifdef STORMKIT_OS_MACOS
16+
#define VK_USE_PLATFORM_MACOS_MVK
17+
#elifdef STORMKIT_OS_IOS
18+
#define VK_USE_PLATFORM_IOS_MVK
19+
#endif
1820
#endif
1921

2022
#define VK_NO_PROTOTYPES

src/gpu/core/instance.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module;
88
#include <stormkit/core/platform_macro.hpp>
99
#include <stormkit/log/log_macro.hpp>
1010

11+
#define STORMKIT_DEFINE_VK_PLATFORM
1112
#include <stormkit/gpu/vulkan.hpp>
1213

1314
module stormkit.gpu.core;

src/gpu/core/surface.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module;
1414
#include <stormkit/core/platform/windows.hpp>
1515
#endif
1616

17+
#define STORMKIT_DEFINE_VK_PLATFORM
1718
#include <stormkit/gpu/vulkan.hpp>
1819

1920
module stormkit.gpu.core;

src/gpu/core/vulkan.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <stormkit/core/platform_macro.hpp>
22

3+
#define STORMKIT_DEFINE_VK_PLATFORM
34
#define VOLK_IMPLEMENTATION
45
#include <stormkit/gpu/vulkan.hpp>
56

0 commit comments

Comments
 (0)