Monado OpenXR Runtime
xrt_openxr_includes.h
Go to the documentation of this file.
1// Copyright 2018-2024, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Include all of the openxr headers in one place.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @author Korcan Hussein <korcan.hussein@collabora.com>
8 * @ingroup xrt_iface
9 */
10
11#pragma once
12
13#include "xrt/xrt_openxr_config.h"
14
15//! @todo Move these to the build system instead.
16#define XR_USE_TIMESPEC 1
17
18#ifdef XR_USE_PLATFORM_ANDROID
19#include <jni.h>
20#endif
21
22#ifdef XR_USE_PLATFORM_XLIB
23typedef struct _XDisplay Display;
24typedef void *GLXFBConfig;
25typedef void *GLXDrawable;
26typedef void *GLXContext;
27#endif
28
29#ifdef XR_USE_PLATFORM_WIN32
30#include <Unknwn.h>
31#endif
32
33#if defined(XR_USE_PLATFORM_EGL) || defined(XR_USE_GRAPHICS_API_OPENGL_ES)
34typedef void *EGLDisplay;
35typedef void *EGLContext;
36typedef void *EGLConfig;
37typedef unsigned int EGLenum;
38typedef void (*__eglMustCastToProperFunctionPointerType)(void); // NOLINT
39typedef __eglMustCastToProperFunctionPointerType (*PFNEGLGETPROCADDRESSPROC)(const char *procname);
40#endif
41
42#if defined(XR_USE_PLATFORM_WIN32)
43#include "xrt_windows.h"
44#endif
45
46#if defined(XR_USE_GRAPHICS_API_D3D11)
47#include <d3d11.h>
48#endif
49
50#if defined(XR_USE_GRAPHICS_API_D3D12)
51#include <d3d12.h>
52#endif
53
54#if defined(XR_USE_GRAPHICS_API_VULKAN)
55#include "xrt_vulkan_includes.h"
56#endif
57
58#ifdef XR_USE_TIMESPEC
59#include <time.h>
60#endif
61
62#include "openxr/openxr.h" // IWYU pragma: export
63#include "openxr/openxr_platform.h" // IWYU pragma: export
64#include "openxr/openxr_loader_negotiation.h" // IWYU pragma: export
65
66#include "openxr/XR_MNDX_hydra.h"
67#include "openxr/XR_MNDX_xdev_space.h"
68#include "openxr/XR_MNDX_system_buttons.h"
69#include "openxr/XR_MNDX_ball_on_a_stick_controller.h"
Include all of the Vulkan headers in one place, and cope with any "messy" includes implied by it.
A minimal way to include Windows.h.