From 468b12c5f893f80a38964beae68e4b0c4621b79d Mon Sep 17 00:00:00 2001 From: Jonathan Barnoud Date: Thu, 15 Jun 2023 08:00:24 +0200 Subject: [PATCH] Fix references to XR_ENV_BLEND_MODE_ALPHA_BLEND in openxr_passthrough.rst The code example at the end of the openXR passthrough tutorial refers to the `XR_ENV_BLEND_MODE_ALPHA_BLEND` constant. That constant, however, is not accessible in the scope. Instead, it is a member of the `xr_interface` object. --- tutorials/xr/openxr_passthrough.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/xr/openxr_passthrough.rst b/tutorials/xr/openxr_passthrough.rst index 48ca11196bb..d8a1510ba5a 100644 --- a/tutorials/xr/openxr_passthrough.rst +++ b/tutorials/xr/openxr_passthrough.rst @@ -57,7 +57,7 @@ This will return a list of supported blend modes for submitting the main render We need to check if ``XR_ENV_BLEND_MODE_ALPHA_BLEND`` is present in this list. If so we can tell OpenXR to expect an image that can be alpha blended with a background. -To do this, we simply call ``set_environment_blend_mode(XR_ENV_BLEND_MODE_ALPHA_BLEND)``. +To do this, we simply call ``set_environment_blend_mode(xr_interface.XR_ENV_BLEND_MODE_ALPHA_BLEND)``. We must also set ``transparent_bg`` to true to ensure we submit the right image. @@ -74,8 +74,8 @@ Putting the above together we can use the following code as a base: return xr_interface.start_passthrough() else: var modes = xr_interface.get_supported_environment_blend_modes() - if XR_ENV_BLEND_MODE_ALPHA_BLEND in modes: - xr_interface.set_environment_blend_mode(XR_ENV_BLEND_MODE_ALPHA_BLEND) + if xr_interface.XR_ENV_BLEND_MODE_ALPHA_BLEND in modes: + xr_interface.set_environment_blend_mode(xr_interface.XR_ENV_BLEND_MODE_ALPHA_BLEND) return true else: return false