|
|
@ -36,8 +36,6 @@ import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Queue; |
|
|
|
import java.util.Queue; |
|
|
|
|
|
|
|
|
|
|
|
import org.lwjgl.opengl.GL11; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.jme3.bounding.BoundingVolume; |
|
|
|
import com.jme3.bounding.BoundingVolume; |
|
|
|
import com.jme3.collision.Collidable; |
|
|
|
import com.jme3.collision.Collidable; |
|
|
|
import com.jme3.collision.CollisionResults; |
|
|
|
import com.jme3.collision.CollisionResults; |
|
|
@ -100,8 +98,11 @@ public class BlenderKey extends ModelKey { |
|
|
|
protected int layersToLoad = -1; |
|
|
|
protected int layersToLoad = -1; |
|
|
|
/** A variable that toggles the object custom properties loading. */ |
|
|
|
/** A variable that toggles the object custom properties loading. */ |
|
|
|
protected boolean loadObjectProperties = true; |
|
|
|
protected boolean loadObjectProperties = true; |
|
|
|
/** Maximum texture size. Might be dependant on the graphic card. */ |
|
|
|
/** |
|
|
|
protected int maxTextureSize = -1; |
|
|
|
* Maximum texture size. Might be dependant on the graphic card. |
|
|
|
|
|
|
|
* This value is taken from <b>org.lwjgl.opengl.GL11.GL_MAX_TEXTURE_SIZE</b>. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
protected int maxTextureSize = 8192; |
|
|
|
/** Allows to toggle generated textures loading. Disabled by default because it very often takes too much memory and needs to be used wisely. */ |
|
|
|
/** Allows to toggle generated textures loading. Disabled by default because it very often takes too much memory and needs to be used wisely. */ |
|
|
|
protected boolean loadGeneratedTextures; |
|
|
|
protected boolean loadGeneratedTextures; |
|
|
|
/** Tells if the mipmaps will be generated by jme or not. By default generation is dependant on the blender settings. */ |
|
|
|
/** Tells if the mipmaps will be generated by jme or not. By default generation is dependant on the blender settings. */ |
|
|
@ -205,17 +206,11 @@ public class BlenderKey extends ModelKey { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* The default value for this parameter is the same as defined by: org.lwjgl.opengl.GL11.GL_MAX_TEXTURE_SIZE. |
|
|
|
|
|
|
|
* If by any means this is too large for user's hardware configuration use the 'setMaxTextureSize' method to change that. |
|
|
|
* @return maximum texture size (width/height) |
|
|
|
* @return maximum texture size (width/height) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public int getMaxTextureSize() { |
|
|
|
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; |
|
|
|
return maxTextureSize; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -626,8 +621,6 @@ public class BlenderKey extends ModelKey { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* This enum tells the importer if the mipmaps for textures will be generated by jme. <li>NEVER_GENERATE and ALWAYS_GENERATE are quite understandable <li>GENERATE_WHEN_NEEDED is an option that checks if the texture had 'Generate mipmaps' option set in blender, mipmaps are generated only when the option is set |
|
|
|
* This enum tells the importer if the mipmaps for textures will be generated by jme. <li>NEVER_GENERATE and ALWAYS_GENERATE are quite understandable <li>GENERATE_WHEN_NEEDED is an option that checks if the texture had 'Generate mipmaps' option set in blender, mipmaps are generated only when the option is set |
|
|
|
* @author Marcin Roguski (Kaelthas) |
|
|
|
* @author Marcin Roguski (Kaelthas) |
|
|
|