- make GeometryBatchFactory check for diffuse texture before applying normal textures
- make GeometryBatchFactory throw exception when atlas is full git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9042 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
48ce86e607
commit
d5c766cc8b
@ -339,8 +339,8 @@ public class GeometryBatchFactory {
|
||||
if (diffuse != null && diffuse.getKey() != null) {
|
||||
String keyName = diffuse.getKey().getName();
|
||||
if (!atlas.addTexture(diffuse, "DiffuseMap")) {
|
||||
logger.log(Level.WARNING, "Adding diffuse texture {0} to atlas failed, atlas full?", keyName);
|
||||
}
|
||||
throw new IllegalStateException("Adding diffuse texture" + keyName + "to atlas failed, atlas full.");
|
||||
} else {
|
||||
if (normal != null && normal.getKey() != null) {
|
||||
atlas.addTexture(diffuse, "NormalMap", keyName);
|
||||
}
|
||||
@ -349,6 +349,7 @@ public class GeometryBatchFactory {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Geometry geom = new Geometry();
|
||||
Mesh mesh = new Mesh();
|
||||
mergeGeometries(geometries, mesh, atlas);
|
||||
|
Loading…
x
Reference in New Issue
Block a user