From 48741a536450c83ccbc646b2242c1db13f526b1f Mon Sep 17 00:00:00 2001 From: James Seibel Date: Tue, 9 Nov 2021 20:57:07 -0600 Subject: [PATCH] Fix rendering the wrong number of verticies --- .../seibel/lod/builders/bufferBuilding/LodBufferBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/seibel/lod/builders/bufferBuilding/LodBufferBuilder.java b/src/main/java/com/seibel/lod/builders/bufferBuilding/LodBufferBuilder.java index abb442602..000ae84db 100644 --- a/src/main/java/com/seibel/lod/builders/bufferBuilding/LodBufferBuilder.java +++ b/src/main/java/com/seibel/lod/builders/bufferBuilding/LodBufferBuilder.java @@ -68,7 +68,7 @@ import net.minecraft.world.level.LightLayer; /** * This object is used to create NearFarBuffer objects. * @author James Seibel - * @version 11-8-2021 + * @version 11-9-2021 */ public class LodBufferBuilder { @@ -834,7 +834,7 @@ public class LodBufferBuilder if (vbo.vertextBufferId != -1 && GlProxy.getInstance().getGlContext() == GlProxyContext.LOD_BUILDER) { // this is how many points will be rendered - vbo.indexCount = (uploadBuffer.capacity() / (6 * 6)); // TODO make this change with the LodTemplate + vbo.indexCount = (uploadBuffer.capacity() / (Float.BYTES * 3) + (Byte.BYTES * 4)); // TODO make this change with the LodTemplate GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vbo.vertextBufferId);