glx or egl

I heard that glx will be deprecated and replaced by egl. Is that true?

I have asked this question on khronos forum, but no one answer me.

Sometimes I write OpenGL on Windows, but most of the time I write OpenGL on FreeBSD. But FreeBSD is not Linux. I am sorry to post it here.

Will it be? Maybe. But not anytime soon. Khronos has announced no initiative towards this goal.

That will be a little sad. I don’t know how to start egl on X, Could you give me some clues?

You don’t. That’s what I just said; there is no EGL on X.

Thank you!

That is not exactly true. AFAIK, it may still be true talking about proprietary drivers and it may very well be true with the X version current FreeBSD versions provide, but it’s not true for any X based OS in general. Mesa implements everything you need to setup a context using EGL and there are projects that actually do it. For instance, KDE’s KWin supports EGL context creation while still using GL2 afterwards (not GLES2). The main KWin dev elaborates in his blog. In addition, there is a proposal to deprecate GLX on Linux so EGL should eventually be your goto solution. For an additional scoop you may refer to groovounet’s blog. Although I don’t think it’s anywhere near being a good resource, Phoronix has also “reported” on several occasions about EGL being actively used in Linux (and thus X based) environments.

Incidentally, after Wayland has been adopted, and I’m sure it will be at some point, EGL will be everything you need if AMD and NVIDIA catch up.

There was also a talk about this on the XDC 2012, you can find it on YouTube.

Yep, this is where Intel’s Ian Romanick suggested GLX deprecration.

Good thing OpenGL has a good track record with deprecation.

Maybe they’ve learned their lesson by now. :wink:

I’ve seen X11+EGL+ES 2.0 on L4T (Linux for Tegra).
https://developer.nvidia.com/linux-tegra

  • Nigel

That is down right false. There are platforms that use X11 and use EGL (for example N9, N900, Maemo, MeeGo, etc). Ubuntu on Tegra is X11 with EGL. These same platforms do NOT have glx.

Though in all honesty, EGL really does not buy you anything; it just means different startup kludge code to create a GL context, etc. The specification is more focused on GLES1/2/3 than desktop GL. Indeed, although EGL has a mechanism to create a GL context, it lacks all of the goodies found in wgl/glxCreateContexAttribsARB.

You should take a look at EGL_KHR_create_context, I think it covers everything glx can do.

Indeed it does.

There is also Mesa EGL/ES2 on X11 Ubuntu 12.04, that I’ve seen in action.
Which seems handy for cross-developing for Android, etc.
Just recently I noticed that freeglut now supports EGL/ES2 as an alternative to GLX or WGL.

  • Nigel

i have built out the demodriver.so of mesa egl on freebsd, but i failed to create the egl context.

GLX is very X11 specific, so transitioning towards EGL brings significant benefits. I don’t see why someone couldn’t create a GLX over EGL wrapper, to help run legacy code on platforms without GLX. The main reason why EGL has become necessary, is to disconnect X11 from OpenGL. So it opens a multitude of use cases for OpenGL, or at least vastly simplifies their implantation… To put this another way, EGL is no pulseaudio.

i think it is not hurry to use egl as it has not a mature implementation. glx is still a better choice to use accelerated gpu.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.