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?
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 (http://lwjgl.org/javadoc/org/lwjgl/opengl/ContextCapabilities.html).
Solved!
Thanks.
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