PKGBUILDs/extra/blender/openxr.patch
2023-09-15 13:58:31 +00:00

29 lines
1.2 KiB
Diff

From 76dcf5b15d4789fb00b73a5b817f4768cee4c3ef Mon Sep 17 00:00:00 2001
From: ChengduLittleA <xp8110@outlook.com>
Date: Tue, 5 Sep 2023 10:11:08 +0800
Subject: [PATCH 2/2] Use XR_CURRENT_API_VERSION for different type casting
---
intern/ghost/intern/GHOST_XrGraphicsBinding.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/intern/ghost/intern/GHOST_XrGraphicsBinding.cc b/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
index dad9fab9337..4bd47ee4953 100644
--- a/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
+++ b/intern/ghost/intern/GHOST_XrGraphicsBinding.cc
@@ -153,7 +153,12 @@ class GHOST_XrGraphicsBindingOpenGL : public GHOST_IXrGraphicsBinding {
# if defined(WITH_GHOST_X11)
/* #GHOST_SystemX11. */
oxr_binding.egl.type = XR_TYPE_GRAPHICS_BINDING_EGL_MNDX;
+# if XR_CURRENT_API_VERSION >= XR_MAKE_VERSION(1, 0, 29)
+ oxr_binding.egl.getProcAddress = reinterpret_cast<PFN_xrEglGetProcAddressMNDX>(
+ eglGetProcAddress);
+# else
oxr_binding.egl.getProcAddress = eglGetProcAddress;
+# endif
oxr_binding.egl.display = ctx_egl.getDisplay();
oxr_binding.egl.config = ctx_egl.getConfig();
oxr_binding.egl.context = ctx_egl.getContext();
--
2.30.2