GLRenderer: fix modern extension retrieval method

GL_NUM_EXTENSIONS and glGetStringi is only available in OpenGL3.0+. The gl3 != null check will always be true for LWJGL backend.
This commit is contained in:
Kirill Vainer 2015-04-27 11:00:33 -04:00
parent fec5764c34
commit ba3e6917c6

View File

@ -140,7 +140,7 @@ public class GLRenderer implements Renderer {
private HashSet<String> loadExtensions() {
HashSet<String> extensionSet = new HashSet<String>(64);
if (gl3 != null) {
if (caps.contains(Caps.OpenGL30) {
// If OpenGL3+ is available, use the non-deprecated way
// of getting supported extensions.
gl3.glGetInteger(GL3.GL_NUM_EXTENSIONS, intBuf16);