Merge pull request #98589 from juanjp600/openxr-no-wayland-build-fix

Fix OpenXR module failing to build on Linux when Wayland is disabled
This commit is contained in:
Thaddeus Crews
2024-10-29 19:25:41 -05:00
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ HashMap<String, bool *> OpenXROpenGLExtension::get_requested_extensions() {
#else
request_extensions[XR_KHR_OPENGL_ENABLE_EXTENSION_NAME] = nullptr;
#endif
#if defined(LINUXBSD_ENABLED) && defined(EGL_ENABLED)
#if defined(LINUXBSD_ENABLED) && defined(EGL_ENABLED) && defined(WAYLAND_ENABLED)
request_extensions[XR_MNDX_EGL_ENABLE_EXTENSION_NAME] = &egl_extension_enabled;
#endif
@ -135,7 +135,7 @@ XrGraphicsBindingOpenGLESAndroidKHR OpenXROpenGLExtension::graphics_binding_gl;
#ifdef X11_ENABLED
XrGraphicsBindingOpenGLXlibKHR OpenXROpenGLExtension::graphics_binding_gl;
#endif
#ifdef EGL_ENABLED
#if defined(EGL_ENABLED) && defined(WAYLAND_ENABLED)
XrGraphicsBindingEGLMNDX OpenXROpenGLExtension::graphics_binding_egl;
#endif
#endif

View File

@ -68,7 +68,7 @@ private:
#ifdef X11_ENABLED
static XrGraphicsBindingOpenGLXlibKHR graphics_binding_gl;
#endif
#ifdef EGL_ENABLED
#if defined(EGL_ENABLED) && defined(WAYLAND_ENABLED)
static XrGraphicsBindingEGLMNDX graphics_binding_egl;
bool egl_extension_enabled = false;