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.
experimental
Kirill Vainer 10 years ago
parent fec5764c34
commit ba3e6917c6
  1. 2
      jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

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

Loading…
Cancel
Save