diff options
author | Ron Bessems <rbessems@magicleap.com> | 2023-02-02 09:14:16 -0500 |
---|---|---|
committer | Ron Bessems <rbessems@magicleap.com> | 2023-02-02 12:18:42 -0500 |
commit | d7d171c45c31a53b06ea319928cf1434460f97cf (patch) | |
tree | 42204040228c8ed8ba17102d64ee555a39d8cc99 /modules/openxr/openxr_api.h | |
parent | 5bcf016f1134c9c28d21bf33d8fdf394f3b354db (diff) |
Add XR Environment Blend Mode Support
Diffstat (limited to 'modules/openxr/openxr_api.h')
-rw-r--r-- | modules/openxr/openxr_api.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/openxr/openxr_api.h b/modules/openxr/openxr_api.h index e1787c6da0..8c642c4ff4 100644 --- a/modules/openxr/openxr_api.h +++ b/modules/openxr/openxr_api.h @@ -99,9 +99,13 @@ private: XrFormFactor form_factor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY; XrViewConfigurationType view_configuration = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO; XrReferenceSpaceType reference_space = XR_REFERENCE_SPACE_TYPE_STAGE; - // XrEnvironmentBlendMode environment_blend_mode = XR_ENVIRONMENT_BLEND_MODE_OPAQUE; bool submit_depth_buffer = false; // if set to true we submit depth buffers to OpenXR if a suitable extension is enabled. + // blend mode + XrEnvironmentBlendMode environment_blend_mode = XR_ENVIRONMENT_BLEND_MODE_OPAQUE; + uint32_t num_supported_environment_blend_modes = 0; + XrEnvironmentBlendMode *supported_environment_blend_modes = nullptr; + // state XrInstance instance = XR_NULL_HANDLE; XrSystemId system_id = 0; @@ -182,6 +186,7 @@ private: EXT_PROTO_XRRESULT_FUNC2(xrEndFrame, (XrSession), session, (const XrFrameEndInfo *), frameEndInfo) EXT_PROTO_XRRESULT_FUNC1(xrEndSession, (XrSession), session) EXT_PROTO_XRRESULT_FUNC3(xrEnumerateApiLayerProperties, (uint32_t), propertyCapacityInput, (uint32_t *), propertyCountOutput, (XrApiLayerProperties *), properties) + EXT_PROTO_XRRESULT_FUNC6(xrEnumerateEnvironmentBlendModes, (XrInstance), instance, (XrSystemId), systemId, (XrViewConfigurationType), viewConfigurationType, (uint32_t), environmentBlendModeCapacityInput, (uint32_t *), environmentBlendModeCountOutput, (XrEnvironmentBlendMode *), environmentBlendModes) EXT_PROTO_XRRESULT_FUNC4(xrEnumerateInstanceExtensionProperties, (const char *), layerName, (uint32_t), propertyCapacityInput, (uint32_t *), propertyCountOutput, (XrExtensionProperties *), properties) EXT_PROTO_XRRESULT_FUNC4(xrEnumerateReferenceSpaces, (XrSession), session, (uint32_t), spaceCapacityInput, (uint32_t *), spaceCountOutput, (XrReferenceSpaceType *), spaces) EXT_PROTO_XRRESULT_FUNC4(xrEnumerateSwapchainFormats, (XrSession), session, (uint32_t), formatCapacityInput, (uint32_t *), formatCountOutput, (int64_t *), formats) @@ -210,6 +215,7 @@ private: bool create_instance(); bool get_system_info(); bool load_supported_view_configuration_types(); + bool load_supported_environmental_blend_modes(); bool is_view_configuration_supported(XrViewConfigurationType p_configuration_type) const; bool load_supported_view_configuration_views(XrViewConfigurationType p_configuration_type); void destroy_instance(); @@ -390,6 +396,9 @@ public: void register_composition_layer_provider(OpenXRCompositionLayerProvider *provider); void unregister_composition_layer_provider(OpenXRCompositionLayerProvider *provider); + const XrEnvironmentBlendMode *get_supported_environment_blend_modes(uint32_t &count); + bool set_environment_blend_mode(XrEnvironmentBlendMode mode); + OpenXRAPI(); ~OpenXRAPI(); }; |