The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

inc/xrt: switch blend mode to array

In order of how preferred they are.

+11 -8
+7 -6
src/xrt/include/xrt/xrt_defines.h
··· 33 33 }; 34 34 35 35 /*! 36 - * Which blend mode does the device support, used as both a bitfield and value. 36 + * Blend mode that the device supports, exact mirror of XrEnvironmentBlendMode 37 37 * 38 38 * @ingroup xrt_iface 39 39 */ 40 40 enum xrt_blend_mode 41 41 { 42 - // clang-format off 43 - XRT_BLEND_MODE_OPAQUE = 1 << 0, 44 - XRT_BLEND_MODE_ADDITIVE = 1 << 1, 45 - XRT_BLEND_MODE_ALPHA_BLEND = 1 << 2, 46 - // clang-format on 42 + XRT_BLEND_MODE_OPAQUE = 1, 43 + XRT_BLEND_MODE_ADDITIVE = 2, 44 + XRT_BLEND_MODE_ALPHA_BLEND = 3, 45 + XRT_BLEND_MODE_MAX_ENUM, 47 46 }; 47 + 48 + #define XRT_MAX_DEVICE_BLEND_MODES 3 48 49 49 50 /*! 50 51 * Which distortion model does the device expose,
+4 -2
src/xrt/include/xrt/xrt_device.h
··· 4 4 * @file 5 5 * @brief Header defining an xrt HMD device. 6 6 * @author Jakob Bornecrantz <jakob@collabora.com> 7 + * @author Moses Turner <mosesturner@protonmail.com> 7 8 * @ingroup xrt_iface 8 9 */ 9 10 ··· 106 107 struct xrt_view views[2]; 107 108 108 109 /*! 109 - * Supported blend modes, a bitfield. 110 + * Array of supported blend modes. 110 111 */ 111 - enum xrt_blend_mode blend_mode; 112 + enum xrt_blend_mode blend_modes[XRT_MAX_DEVICE_BLEND_MODES]; 113 + size_t num_blend_modes; 112 114 113 115 /*! 114 116 * Distortion information.