diff options
author | Juan Pablo Arce <juanjprot@gmail.com> | 2024-10-27 14:03:03 -0300 |
---|---|---|
committer | Juan Pablo Arce <juanjprot@gmail.com> | 2024-10-27 14:03:03 -0300 |
commit | 1803fe0cd5101a2dd536385decc7b67be589d743 (patch) | |
tree | e294226d745417d8094a22666a97d2c38a0803be /modules/openxr | |
parent | 61accf060515416da07d913580419fd8c8490f7b (diff) | |
download | redot-engine-1803fe0cd5101a2dd536385decc7b67be589d743.tar.gz |
Fix OpenXR module failing to build on Linux when Wayland is disabled
Diffstat (limited to 'modules/openxr')
-rw-r--r-- | modules/openxr/extensions/platform/openxr_opengl_extension.cpp | 4 | ||||
-rw-r--r-- | modules/openxr/extensions/platform/openxr_opengl_extension.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/openxr/extensions/platform/openxr_opengl_extension.cpp b/modules/openxr/extensions/platform/openxr_opengl_extension.cpp index 07e26298bf..f75da49d87 100644 --- a/modules/openxr/extensions/platform/openxr_opengl_extension.cpp +++ b/modules/openxr/extensions/platform/openxr_opengl_extension.cpp @@ -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 diff --git a/modules/openxr/extensions/platform/openxr_opengl_extension.h b/modules/openxr/extensions/platform/openxr_opengl_extension.h index beb68e47e3..f4a73c667b 100644 --- a/modules/openxr/extensions/platform/openxr_opengl_extension.h +++ b/modules/openxr/extensions/platform/openxr_opengl_extension.h @@ -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; |