Fixing a bug where texture size getter is called before the opengl is initialized.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9337 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 13 years ago
parent b09e37c9d9
commit 2fe4d620d9
  1. 6
      engine/src/blender/com/jme3/asset/BlenderKey.java

@ -189,7 +189,12 @@ public class BlenderKey extends ModelKey {
*/
public int getMaxTextureSize() {
if(maxTextureSize <= 0) {
try {
maxTextureSize = GL11.glGetInteger(GL11.GL_MAX_TEXTURE_SIZE);
} catch(Exception e) {
//this is in case this method was called before openGL initialization
return 8192;
}
}
return maxTextureSize;
}
@ -658,7 +663,6 @@ public class BlenderKey extends ModelKey {
return lights;
}
@Override
public int collideWith(Collidable other, CollisionResults results) throws UnsupportedCollisionException {
return 0;
}

Loading…
Cancel
Save