aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-20 06:01:05 +0200
committermakamys <makamys@outlook.com>2022-06-20 06:01:31 +0200
commit671585b834d9e7ebffda1fe6e8525cfc4f56d04f (patch)
tree0e260282ddc6290fae26b26dfa8c3cdd414152b4 /src
parent7dff285521818b4c39666f1b6619dfc895ae885a (diff)
downloadNeodymium-671585b834d9e7ebffda1fe6e8525cfc4f56d04f.tar.gz
Neodymium-671585b834d9e7ebffda1fe6e8525cfc4f56d04f.tar.bz2
Neodymium-671585b834d9e7ebffda1fe6e8525cfc4f56d04f.zip
Make it possible to limit the number of quads a mesh has for debug
Diffstat (limited to 'src')
-rw-r--r--src/main/java/makamys/neodymium/renderer/ChunkMesh.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
index c89129c..dc434b3 100644
--- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
+++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
@@ -257,9 +257,13 @@ public class ChunkMesh extends Mesh {
BufferWriter out = new BufferWriter(buffer);
try {
+ int i = 0;
for(MeshQuad quad : quads) {
- if(MeshQuad.isValid(quad)) {
- quad.writeToBuffer(out);
+ if(i < quadCount) {
+ if(MeshQuad.isValid(quad)) {
+ quad.writeToBuffer(out);
+ i++;
+ }
}
}
} catch(IOException e) {