diff options
author | makamys <makamys@outlook.com> | 2022-06-20 06:01:05 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-20 06:01:31 +0200 |
commit | 671585b834d9e7ebffda1fe6e8525cfc4f56d04f (patch) | |
tree | 0e260282ddc6290fae26b26dfa8c3cdd414152b4 /src | |
parent | 7dff285521818b4c39666f1b6619dfc895ae885a (diff) | |
download | Neodymium-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.java | 8 |
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) { |