You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure I see what the right path is to using GLEW with EGL. Can't call glewInit() at the start, because it wants to call glewContextInit but there's no GL context yet. eglewInit(dpy) can't be used, because you don't yet have a EGLDisplay. And eglGetDisplay can't be used to get one, because the __eglewGetDisplay pointer has not been initialized yet.
Seems like there's something like an eglewEarlyInit (or even eglewInit(EGL_NO_DISPLAY)) missing that initializes the function pointers for the functions that can be called even before EGL initialization, such as eglGetDisplay -- as well as extensions that can be used before init, such as EGL_EXT_device_enumeration and EGL_EXT_platform_base (in order to call eglQueryDevicesEXT + eglGetPlatformDisplayEXT).
A workaround that seems to be ok is to just manually init the specific functions you need:
(or the same for __eglewGetDisplay), and then calling eglewInit(dpy) with the dpy that you're able to obtain. But it's a bit messy/magic to have to know that.
(Even more annoyingly, but not GLEW's fault... for some reason EGL_EXT_device_enumeration, device_query, etc. are missing from the EGL extensions string with nvidia's drivers on Linux, but eglGetProcAddress finds their entry points fine.)
The text was updated successfully, but these errors were encountered:
I'm not hands-on with EGL personally. What you're saying here sounds right, looking at the implementations of glewInit and eglewInit. Room for improvement indeed.
I'm not sure I see what the right path is to using GLEW with EGL. Can't call
glewInit()
at the start, because it wants to callglewContextInit
but there's no GL context yet.eglewInit(dpy)
can't be used, because you don't yet have aEGLDisplay
. AndeglGetDisplay
can't be used to get one, because the__eglewGetDisplay
pointer has not been initialized yet.Seems like there's something like an
eglewEarlyInit
(or eveneglewInit(EGL_NO_DISPLAY)
) missing that initializes the function pointers for the functions that can be called even before EGL initialization, such aseglGetDisplay
-- as well as extensions that can be used before init, such asEGL_EXT_device_enumeration
andEGL_EXT_platform_base
(in order to calleglQueryDevicesEXT
+eglGetPlatformDisplayEXT
).A workaround that seems to be ok is to just manually init the specific functions you need:
(or the same for
__eglewGetDisplay
), and then callingeglewInit(dpy)
with the dpy that you're able to obtain. But it's a bit messy/magic to have to know that.(Even more annoyingly, but not GLEW's fault... for some reason
EGL_EXT_device_enumeration
, device_query, etc. are missing from the EGL extensions string with nvidia's drivers on Linux, but eglGetProcAddress finds their entry points fine.)The text was updated successfully, but these errors were encountered: