inc/xrt: switch blend mode to array

In order of how preferred they are.
This commit is contained in:
Moses Turner 2021-04-11 04:08:01 -05:00
parent c591fe770e
commit 6f93b4c718
2 changed files with 11 additions and 8 deletions
src/xrt/include/xrt

View file

@ -33,19 +33,20 @@ struct xrt_reference
};
/*!
* Which blend mode does the device support, used as both a bitfield and value.
* Blend mode that the device supports, exact mirror of XrEnvironmentBlendMode
*
* @ingroup xrt_iface
*/
enum xrt_blend_mode
{
// clang-format off
XRT_BLEND_MODE_OPAQUE = 1 << 0,
XRT_BLEND_MODE_ADDITIVE = 1 << 1,
XRT_BLEND_MODE_ALPHA_BLEND = 1 << 2,
// clang-format on
XRT_BLEND_MODE_OPAQUE = 1,
XRT_BLEND_MODE_ADDITIVE = 2,
XRT_BLEND_MODE_ALPHA_BLEND = 3,
XRT_BLEND_MODE_MAX_ENUM,
};
#define XRT_MAX_DEVICE_BLEND_MODES 3
/*!
* Which distortion model does the device expose,
* used both as a bitfield and value.

View file

@ -4,6 +4,7 @@
* @file
* @brief Header defining an xrt HMD device.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @author Moses Turner <mosesturner@protonmail.com>
* @ingroup xrt_iface
*/
@ -106,9 +107,10 @@ struct xrt_hmd_parts
struct xrt_view views[2];
/*!
* Supported blend modes, a bitfield.
* Array of supported blend modes.
*/
enum xrt_blend_mode blend_mode;
enum xrt_blend_mode blend_modes[XRT_MAX_DEVICE_BLEND_MODES];
size_t num_blend_modes;
/*!
* Distortion information.