Skip to content

Commit 13e836d

Browse files
committed
made single field local / commented out meshing time tracking
1 parent 25c804c commit 13e836d

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

voxels-client/src/main/java/client/world/ChunkMesher.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ public class ChunkMesher {
3434

3535
private final ChunkManager chunkManager;
3636

37-
private BufferedShape opaqueShape;
38-
39-
private BufferedShape waterShape;
40-
4137
private BufferedShape decorShape;
4238

4339
private BufferedShape currentShape;
@@ -90,12 +86,12 @@ public MeshResult(StaticGeometry o, StaticGeometry w, StaticGeometry d) {
9086
}
9187

9288
public MeshResult createMesh() {
93-
long startTime = System.nanoTime();
89+
// long startTime = System.nanoTime();
9490

9591
fillCache();
9692

97-
opaqueShape = new BufferedShape(sharedMaterial);
98-
waterShape = new BufferedShape(sharedMaterial);
93+
BufferedShape opaqueShape = new BufferedShape(sharedMaterial);
94+
BufferedShape waterShape = new BufferedShape(sharedMaterial);
9995
decorShape = new BufferedShape(sharedMaterial);
10096

10197
opaqueShape.begin(BufferedShape.QUADS);
@@ -125,11 +121,11 @@ public MeshResult createMesh() {
125121
waterShape.end();
126122
decorShape.end();
127123

128-
long endTime = System.nanoTime();
129-
double durationMs = (endTime - startTime) / 1_000_000.0;
130-
131-
System.out.format(
132-
"Chunk [%d, %d] meshed in: %.3f ms%n", chunk.getChunkX(), chunk.getChunkZ(), durationMs);
124+
// long endTime = System.nanoTime();
125+
// double durationMs = (endTime - startTime) / 1_000_000.0;
126+
//
127+
// System.out.format(
128+
// "Chunk [%d, %d] meshed in: %.3f ms%n", chunk.getChunkX(), chunk.getChunkZ(), durationMs);
133129

134130
return new MeshResult(
135131
new StaticGeometry(opaqueShape.getVBO(), sharedMaterial),

0 commit comments

Comments
 (0)