-
Notifications
You must be signed in to change notification settings - Fork 631
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
Building glew without GLX #328
Comments
@nigels-com Can you shed some light to this strange issue, please? It should work. It's even detected by the buildsystem:
I can also disable
I have been searching and I have also tried with GNU Make and I get this:
...and Maybe the build files are just outdated? |
The cmake build is mostly user contributed. I can go poke around in there, but I'm probably any more familiar with that than anyone else. For the (first-class supported) GNU make build, see: |
@nigels-com Understood and fixed. Please merge this small PR I did, it works: |
Great! Thanks! |
@nigels-com Forgot to add Also, I have noticed that even adding |
Probably makes sense to skip the GLU include in EGL mode. Shouldn't need to specify both. |
The code is the same for WGL, GLX, EGL so |
But how to do this? I do it manually when building the programs using glew. I understand glu.h inclusion in glew.h should be skipped, but how? glew.h doesn't know about EGL or not EGL, as you said... |
I did take a look at |
Yes, agreed, you seem stuck with the |
@nigels-com Ah, dont worry, it's OK, I can also "mutilate" glew.h on my systems so I don't have to deal with glu inclusion on every build. Thanks, really! I am closing this issue, if that's OK! |
So while we're chatting about EGL. I'm on both Ubuntu 18.04 and Ubuntu 20.04 with Nvidia GPU and driver.
I really don't know if I'm the outlier, it's basically the same machine I've had for 10+ years. It looks like the system-installed GLEW is X11/GLX.
|
Ah, an old thread at Issue #172 |
Hmm.. GLX on X11 should suffice I guess. |
Apparently not Nvidia-specific. Ubuntu 20.04 is still X11/GLX by default, but I can opt-in to Wayland, so will try that and see. |
GLFW is implementing runtime platform selection for the upcoming version and by default it's using the first platform that works, so existing software keeps working. It's a slightly different focus but it would be great to see a similar behavior in GLEW wrt. GLX/EGL if compiled with both. |
Yes, I agree it makes sense for things to move in that direction. |
I maintain the glew package on Gentoo Linux. I had a user suggest we support
|
It's a bit of a historical problem, on the face of it. GLEW was compiled WGL-mode on Windows, and GLX-mode on not-Windows. |
Okay, but that doesn't quite address my point. If I build it for EGL only, why doesn't it work under X11? It's definitely a thing, Firefox can do it, for example. I'm guessing it needs some additional code in GLEW, but it sounds like it would effectively solve this problem? Or is it down to the application using GLEW, so if that uses GLX then GLEW needs to use it too? |
Maybe it would be a lot of work, but I wonder whether Waffle could help here. I heard about it at FOSDEM a few years ago. |
The reluctance is about breaking compatibility with existing applications that are expecting GLX. The solution would likely be a libGLEW3.so for supporting either/or GLX and EGL on Linux, WGL and EGL on Windows. |
EGL is not Wayland-specific. It can be used with KMS, for example. Even X11 supports EGL, although GLEW doesn't seem to support that case. See nigels-com/glew#328 for more details. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Hi there,
Since more and more systems are jumping to Wayland (and embedded GNU/Linux systems use KMS/DRM or Wayland), GLX is becoming something of the past.
There's GLVND, which is vendor-gnostic, for full OpenGL without X11/GLX, too.
So, is it possible to build GLEW without X11/GLX? How?
Looking at the docs, I see
SYSTEM=linux-egl
but it seems to require GLX too...I have also located this patch:
https://patchwork.openembedded.org/patch/135251/
Didn't it get merged for some reason?
Thanks!
EDIT: It seems I am not the first person finding the old GLX on my way to building GLEW on Wayland...
#172
EDIT2: I am now confused. As I said, GLEW seems to be looking for GLX instead of GLVND:
...But I see this commit:
2b50f4a
So in theory it DOES build with GLVND instead of GLX.
I am trying to disable X11 support, but it's still looking for GLX:
The text was updated successfully, but these errors were encountered: