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
This commit is contained in:
parent
b09e37c9d9
commit
2fe4d620d9
@ -189,7 +189,12 @@ public class BlenderKey extends ModelKey {
|
|||||||
*/
|
*/
|
||||||
public int getMaxTextureSize() {
|
public int getMaxTextureSize() {
|
||||||
if(maxTextureSize <= 0) {
|
if(maxTextureSize <= 0) {
|
||||||
maxTextureSize = GL11.glGetInteger(GL11.GL_MAX_TEXTURE_SIZE);
|
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;
|
return maxTextureSize;
|
||||||
}
|
}
|
||||||
@ -658,7 +663,6 @@ public class BlenderKey extends ModelKey {
|
|||||||
return lights;
|
return lights;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int collideWith(Collidable other, CollisionResults results) throws UnsupportedCollisionException {
|
public int collideWith(Collidable other, CollisionResults results) throws UnsupportedCollisionException {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user