1 | // Copyright (c) 2018-2023, The Khronos Group Inc. |
2 | // |
3 | // SPDX-License-Identifier: Apache-2.0 OR MIT |
4 | // |
5 | // This file includes headers with types which openxr.h depends on in order |
6 | // to compile when platforms, graphics apis, and the like are enabled. |
7 | |
8 | #pragma once |
9 | |
10 | #ifdef XR_USE_PLATFORM_ANDROID |
11 | #include <android/native_window.h> |
12 | #include <android/window.h> |
13 | #include <android/native_window_jni.h> |
14 | #endif // XR_USE_PLATFORM_ANDROID |
15 | |
16 | #ifdef XR_USE_PLATFORM_WIN32 |
17 | |
18 | #include <winapifamily.h> |
19 | #if !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)) |
20 | // Enable desktop partition APIs, such as RegOpenKeyEx, LoadLibraryEx, PathFileExists etc. |
21 | #undef WINAPI_PARTITION_DESKTOP |
22 | #define WINAPI_PARTITION_DESKTOP 1 |
23 | #endif |
24 | |
25 | #ifndef NOMINMAX |
26 | #define NOMINMAX |
27 | #endif // !NOMINMAX |
28 | |
29 | #ifndef WIN32_LEAN_AND_MEAN |
30 | #define WIN32_LEAN_AND_MEAN |
31 | #endif // !WIN32_LEAN_AND_MEAN |
32 | |
33 | #include <windows.h> |
34 | #include <unknwn.h> |
35 | |
36 | #endif // XR_USE_PLATFORM_WIN32 |
37 | |
38 | #ifdef XR_USE_GRAPHICS_API_D3D11 |
39 | #include <d3d11.h> |
40 | #endif // XR_USE_GRAPHICS_API_D3D11 |
41 | |
42 | #ifdef XR_USE_GRAPHICS_API_D3D12 |
43 | #include <d3d12.h> |
44 | #endif // XR_USE_GRAPHICS_API_D3D12 |
45 | |
46 | #ifdef XR_USE_PLATFORM_XLIB |
47 | #include <X11/Xlib.h> |
48 | #include <X11/Xutil.h> |
49 | #endif // XR_USE_PLATFORM_XLIB |
50 | |
51 | #ifdef XR_USE_PLATFORM_XCB |
52 | #include <xcb/xcb.h> |
53 | #endif // XR_USE_PLATFORM_XCB |
54 | |
55 | #ifdef XR_USE_GRAPHICS_API_OPENGL |
56 | #if defined(XR_USE_PLATFORM_XLIB) || defined(XR_USE_PLATFORM_XCB) |
57 | #include <GL/glx.h> |
58 | #endif // (XR_USE_PLATFORM_XLIB || XR_USE_PLATFORM_XCB) |
59 | #ifdef XR_USE_PLATFORM_XCB |
60 | #include <xcb/glx.h> |
61 | #endif // XR_USE_PLATFORM_XCB |
62 | #ifdef XR_USE_PLATFORM_MACOS |
63 | #include <OpenCL/cl_gl_ext.h> |
64 | #endif // XR_USE_PLATFORM_MACOS |
65 | #endif // XR_USE_GRAPHICS_API_OPENGL |
66 | |
67 | #ifdef XR_USE_GRAPHICS_API_OPENGL_ES |
68 | #include <EGL/egl.h> |
69 | #endif // XR_USE_GRAPHICS_API_OPENGL_ES |
70 | |
71 | #ifdef XR_USE_GRAPHICS_API_VULKAN |
72 | #include <vulkan/vulkan.h> |
73 | #endif // XR_USE_GRAPHICS_API_VULKAN |
74 | |
75 | #ifdef XR_USE_PLATFORM_WAYLAND |
76 | #include "wayland-client.h" |
77 | #endif // XR_USE_PLATFORM_WAYLAND |
78 | |
79 | #ifdef XR_USE_GRAPHICS_API_OPENGL |
80 | #if defined(XR_USE_PLATFORM_XLIB) || defined(XR_USE_PLATFORM_XCB) |
81 | #ifdef Success |
82 | #undef Success |
83 | #endif // Success |
84 | |
85 | #ifdef Always |
86 | #undef Always |
87 | #endif // Always |
88 | |
89 | #ifdef None |
90 | #undef None |
91 | #endif // None |
92 | #endif // defined(XR_USE_PLATFORM_XLIB) || defined(XR_USE_PLATFORM_XCB) |
93 | #endif // XR_USE_GRAPHICS_API_OPENGL |
94 | |