OpenGL version through LWJGL

Started by gutomarzagao, February 15, 2012, 17:37:13

Previous topic - Next topic

gutomarzagao

Hi everybody,
It may be a newbie question, but I've searched it and I couldn't the answer..
How do I get current openGL version?

kappa

You can use GLContext.getCapabilities() method to detect this.

So if you want to test if OpenGL 2.0 is supported, you'd do something like

if(GLContext.getCapabilities().OpenGL20) {
// opengl 2.0 supported.
}


Full list of capabilities that you can test are found on the javadoc here.


Mickelukas

When using getCapabilities, make sure you don't rely on it for something extremely important. I've had enough bug reports on crappy intel cards that even with the newest driver say that they support something when they actually don't...

Mike