瀏覽代碼

Merge pull request #7522 from jbarnoud/patch-1

Fix references to XR_ENV_BLEND_MODE_ALPHA_BLEND in openxr_passthrough
Matthew 2 年之前
父節點
當前提交
4fdd095d0a
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      tutorials/xr/openxr_passthrough.rst

+ 3 - 3
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.
 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.
 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.
 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()
       return xr_interface.start_passthrough()
     else:
     else:
       var modes = xr_interface.get_supported_environment_blend_modes()
       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
         return true
       else:
       else:
         return false
         return false