Overte C++ Documentation
openxr_extension_helpers.h
1 /*
2 ** Copyright (c) 2017-2022, The Khronos Group Inc.
3 **
4 ** SPDX-License-Identifier: Apache-2.0
5 */
6 
7 #pragma once
8 
9 #include <openxr/openxr.h>
10 
11 // These are just convenience macros for defining enums that would
12 // normally be declared in the body of the enum, but can't be declared
13 // that way easily for experimental extensions.
14 
15 #define XR_ENUM(type, enm, constant) static const type enm = (type)constant
16 #define XR_STRUCT_ENUM(enm, constant) XR_ENUM(XrStructureType, enm, constant)
17 #define XR_RESULT_ENUM(enm, constant) XR_ENUM(XrResult, enm, constant)
18 #define XR_REFSPACE_ENUM(enm, constant) XR_ENUM(XrReferenceSpaceType, enm, constant)