Creating an OpenGL Context using EGL

Started by
4 comments, last by Techieman 8 years, 6 months ago

Hi,

I've recently come across EGL, which happens to be a unified official cross-platform standard to replace (or at least abstract around) the platform-specific windowing/context-creation APIs. By my understanding it was made for OpenGL ES, but however, since Version 1.4 "eglBindAPI" takes another optional Parameter : "EGL_OPENGL_API".

Does this mean, I can create an OpenGL 4 Context on Windows, Linux and Mac OS using EGL?
If yes, where do I find the development libraries?

LG Julien

It's not a shame to make mistakes. As a programmer I am doing mistakes on a daily basis. - JonathanKlein

Advertisement

I can only speak for Windows, but there is no EGL implementation for Windows afaik ( emulators do not count ), in fact you may be hard-pressed to find any implementation for the platform listed. The EGL libraries would have to be provided by the platform you are using, much like how WGL, X Windows and whatever Mac OS uses ( thinks its Quartz ). The headers are readily available from the Khronos website, but that is all you will get. EGL has to be implemented at the system level on the platform you are targeting, its not just an add-on.

Found this with Google, seems to answer (some of) your questions: http://www.g-truc.net/post-0457.html

Not sure about the GL4 thing.. doubtful at the moment, think it's aimed at GLES.. but newer GLES are sort of converging with GL I think. I doubt EGL is the best option for desktop GL.

Damn, what a pitty. So I have to implement the GLX and CGL part too.
Thanks for your help.

It's not a shame to make mistakes. As a programmer I am doing mistakes on a daily basis. - JonathanKlein

You do not have to. Just use some premade library for window and context creation, for example, GLFW.

We're (or better I am, since Platform abstraction and rendering is my part in the engine) using our own classes for window creation.
Those classes are already ported and tested.

It's just about the context creation.

It's not a shame to make mistakes. As a programmer I am doing mistakes on a daily basis. - JonathanKlein

This topic is closed to new replies.

Advertisement