- optimize BatchNode.batch a bit
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9224 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
5671358657
commit
50f266f843
@ -46,6 +46,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@ -190,10 +191,10 @@ public class BatchNode extends Node implements Savable {
|
|||||||
}
|
}
|
||||||
batches.clear();
|
batches.clear();
|
||||||
}
|
}
|
||||||
|
for (Map.Entry<Material, List<Geometry>> entry : matMap.entrySet()) {
|
||||||
for (Material material : matMap.keySet()) {
|
|
||||||
Mesh m = new Mesh();
|
Mesh m = new Mesh();
|
||||||
List<Geometry> list = matMap.get(material);
|
Material material = entry.getKey();
|
||||||
|
List<Geometry> list = entry.getValue();
|
||||||
nbGeoms += list.size();
|
nbGeoms += list.size();
|
||||||
if (!needsFullRebatch) {
|
if (!needsFullRebatch) {
|
||||||
list.add(batches.get(material).geometry);
|
list.add(batches.get(material).geometry);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user