Skip to content

Commit 3ea73fc

Browse files
authored
Merge pull request #230 from aeikum/helloxr_surface_extensions
hello_xr: On Vulkan, explicitly add surface extensions for mirror window.
2 parents eedc7df + 3027751 commit 3ea73fc

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hello_xr: On Vulkan, explicitly add surface extensions for mirror window.

src/tests/hello_xr/graphicsplugin_vulkan.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,15 @@ struct VulkanGraphicsPlugin : public IGraphicsPlugin {
13251325
std::vector<const char*> extensions;
13261326
extensions.push_back("VK_EXT_debug_report");
13271327

1328+
#if defined(USE_MIRROR_WINDOW)
1329+
#if defined(VK_USE_PLATFORM_WIN32_KHR)
1330+
extensions.push_back("VK_KHR_surface");
1331+
extensions.push_back("VK_KHR_win32_surface");
1332+
#else
1333+
#error CreateSurface not supported on this OS
1334+
#endif // defined(VK_USE_PLATFORM_WIN32_KHR)
1335+
#endif // defined(USE_MIRROR_WINDOW)
1336+
13281337
VkApplicationInfo appInfo{VK_STRUCTURE_TYPE_APPLICATION_INFO};
13291338
appInfo.pApplicationName = "hello_xr";
13301339
appInfo.applicationVersion = 1;

0 commit comments

Comments
 (0)