Open misterabdul opened 3 years ago
What's the output of glewinfo
?
It's 0x4
, when I pass that value to glewGetErrorString(), it says: unknown error
.
glewinfo
is a CLI tool that might shed some light on the available OpenGL support.
For example:
$ glewinfo -profile core -version 4.0
---------------------------
GLEW Extension Info
---------------------------
GLEW version 2.1.0
Reporting capabilities of display , visual 0x2b
Running on a GeForce GT 1030/PCIe/SSE2 from NVIDIA Corporation
OpenGL version 4.0.0 NVIDIA 460.73.01 is supported
GL_VERSION_1_1: OK
...
Here's the result of my glewinfo
: https://gist.github.com/misterabdul/129c51236b41ad25ad0494f81cfafcbe
It's about 5000+ lines.
That output looks healthy.
The next thing that comes to mind is X11 vs Wayland.
What is the output of glxinfo
?
I don't know if this will help or not, but here it is, the output of my glxinfo
: https://gist.github.com/misterabdul/1bc4dd1a8c22ce48de089e441a0efbc6
It's
0x4
, when I pass that value to glewGetErrorString(), it says:unknown error
.
Ah, interesting. So error 4 be no GLX display
from glewGetErrorString, so that's a bug in my opinion.
This could be because EGL is being used by the application. I'll have a think about how to detect if EGL is "live", and error more descriptively.
Running into this issue as well on wayland/sway. Happy to help debug and test fixes. I don't think better wording of the error is the issue here. Or, if it is, what is the way to work around this in code?
Some breadcrumbs regarding OpenGL and Wayland. In short, GLX depends on X11. https://unix.stackexchange.com/questions/511134/why-wayland-is-using-opengl-es-instead-of-opengl
This looks like the reason Wayland isn't on my radar. (Nvidia GPU) I'll scratch around to see if I have a laptop with Intel graphics. https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-GL-VLK-XWayland
@misterabdul 's glewinfo indicates Intel GPU:
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel (0x8086)
Device: Mesa Intel(R) HD Graphics 620 (KBL GT2) (0x5916)
Version: 21.1.2
I have this code: https://gist.github.com/misterabdul/a44036fbc0103cab3d38319d4ce95036
And compiled like this :
But when I'm running it, it says:
Failed to initialize GLEW
I'm using Fedora 34.