world benchmark
parent
3cb0a0529c
commit
6ea3fbc8aa
|
@ -124,4 +124,15 @@ public class WorldManager {
|
||||||
return vx >= Math.min(0, chunkX - Config.RENDER_DISTANCE ) && vx < Math.min(0, chunkX + Config.RENDER_DISTANCE) && vy >= chunkY - Config.RENDER_DISTANCE && vy < Math.min(0, chunkY + Config.RENDER_DISTANCE) && vz >= chunkZ - Config.RENDER_DISTANCE && vz < Math.min(0, chunkZ + Config.RENDER_DISTANCE);
|
return vx >= Math.min(0, chunkX - Config.RENDER_DISTANCE ) && vx < Math.min(0, chunkX + Config.RENDER_DISTANCE) && vy >= chunkY - Config.RENDER_DISTANCE && vy < Math.min(0, chunkY + Config.RENDER_DISTANCE) && vz >= chunkZ - Config.RENDER_DISTANCE && vz < Math.min(0, chunkZ + Config.RENDER_DISTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void benchmark(){
|
||||||
|
for(int i = 0; i < Config.RENDER_DISTANCE*2; i++)
|
||||||
|
for(int j = 0; j < Config.RENDER_DISTANCE*2; j++)
|
||||||
|
for(int k = 0; k < Config.RENDER_DISTANCE*2; k++){
|
||||||
|
Chunk c = new Chunk(new Vector3f(i,j,k));
|
||||||
|
c.arrayGenerateCorner();
|
||||||
|
chunkRenderer.greedyMeshing(this, c);
|
||||||
|
game.getRootNode().attachChild(c.chunkNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue