Closed wbehrens-on-gh closed 2 years ago
Out of interest, what Linux distro and GPU and driver combo is running?
Void linux and radeon 5500tx, I have the glew, glew-devel, glfw-wayland, and glfw-devel packages installed currently
GLEW can be built in EGL mode, but I don't know if they're being packaged by distros that way.
What exactly is egl mode and how can I check if it's being packaged that way here's the void package for glew
EGL is a newer alternative to GLX. Seems like with Wayland we get X11 emulation, but not GLX. Worth trying on your setup: https://github.com/nigels-com/glew#linux-egl
LDFLAGS.GL = -lEGL -lGL
CFLAGS.EXTRA += -DGLEW_EGL
trying with both g++ gl_window.cpp -lglfw -lGLEW -lGL -lGLU -lEGL -DGLEW_EGL -o gl_window
and g++ gl_window.cpp $(pkg-config --libs --cflags glfw3 glew egl) -DGLEW_EGL -o gl_window
neither work and give the same exit code
It's the GLEW library itself that needs to be built in EGL mode.
Will building with EGL remove x11 support or just adds egl? how does that all work?
Yes, it's EGL or GLX currently, but not both at the same time. There is some interest in GLEW being able to support either or both at runtime, but it hasn't been looked at in detail.
ah, understood. I'll just create an additional package in the void repos for it
Here's the program:
It should error on
glewInit()
and print 4, which as far as I can tell isGLEW_ERROR_NO_GLX_DISPLAY
, I'm very new to opengl so there's a good change I've done something wrong but if it makes any difference I'm currently running this on a wayland based desktop enviroment.