-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenXR: Add support for Wayland on Linux #97771
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,13 @@ | |
#else | ||
#define XR_USE_GRAPHICS_API_OPENGL | ||
#endif // ANDROID_ENABLED | ||
#if defined(LINUXBSD_ENABLED) && defined(EGL_ENABLED) | ||
#ifdef GLAD_ENABLED | ||
#include "thirdparty/glad/glad/egl.h" | ||
#else | ||
#include <EGL/egl.h> | ||
#endif // GLAD_ENABLED | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we should one day put this block into some shared include, like we did with other GL-related stuff. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that'd be nice: this same "glad/egl.h" vs "EGL/egl.h" is done in a couple other places. It's always tricky with platform includes, though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose we can do this in a separate PR sometime |
||
#endif // defined(LINUXBSD_ENABLED) && defined(EGL_ENABLED) | ||
#ifdef X11_ENABLED | ||
#define GL_GLEXT_PROTOTYPES 1 | ||
#define GL3_PROTOTYPES 1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly this include means that the
XR_MNDX_egl_enable
extension will be handled also on X11, although it will only be used with the Wayland backend, right?Are there plans of using this extension also with X11 or other EGL-enabled gl managers, like the ANGLE ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, on Linux we'll include the code for initializing OpenXR on both GLX and EGL, but only actually use the EGL version if we're on Wayland.
I haven't tested this (I should!) but I don't think OpenXR will be able to correctly initialize with ANGLE, because the OpenXR runtime will be using "real EGL", but we'll be passing it handles (
EGLDisplay
,EGLConfig
, etc) from ANGLE, which I think it'll just see as invalid.But I'll give it a test when I have a chance!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right. This is absolutely not blocking. Just a curiosity :D