Is it possible to create a custom OpenGL context for LWJGL?

Started by luke1337, February 23, 2015, 09:37:39

Previous topic - Next topic

luke1337

Is it possible to create a custom OpenGL context for LWJGL, with least modification of lwjgl native library?

SHC

What do you mean by custom OpenGL context? Do you want to select the OpenGL version? If that is what you want, then there is no need to modify LWJGL binaries.

Kai

Or perhaps you want to have the OpenGL context created externally by some other native framework/library and then have LWJGL pick up on it?
That is possible with LWJGL 3 very easily via GLContext.createFromCurrent(), provided the externally created GL context is current in the calling thread.

spasi

LWJGL 3 also has bindings to WGL, GLX and CGL, so yes, you can create custom OpenGL contexts.


asyx

I don't understand the question. Both LWJGL2 and LWJGL 3 allow you to create the context in whatever way other libraries for any language allow you to do it. Version, profile, debugging and so on. LWJGL 2's Display can take an object context and LWJGL 3 uses straight up GLFW and even returns you a pointer in form of a long to the actual GLFW window (which is basically the context).