Browse Source

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.
Kirill Vainer 10 năm trước cách đây
mục cha
commit
ba3e6917c6

+ 1 - 1
jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

@@ -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);