From 68357a8cc9c8cf9eab9e177cb6aea18cfbc3f584 Mon Sep 17 00:00:00 2001 From: FalsePattern Date: Fri, 1 Dec 2023 13:29:09 +0100 Subject: unify stride calculation into NeoRenderer --- src/main/java/makamys/neodymium/renderer/GPUMemoryManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/makamys/neodymium/renderer/GPUMemoryManager.java') diff --git a/src/main/java/makamys/neodymium/renderer/GPUMemoryManager.java b/src/main/java/makamys/neodymium/renderer/GPUMemoryManager.java index 16a72d5..6f5e4fe 100644 --- a/src/main/java/makamys/neodymium/renderer/GPUMemoryManager.java +++ b/src/main/java/makamys/neodymium/renderer/GPUMemoryManager.java @@ -70,7 +70,7 @@ public class GPUMemoryManager { glBufferSubData(GL_ARRAY_BUFFER, offset, mesh.buffer); moved++; } - mesh.iFirst = (int)(offset / mesh.getStride()); + mesh.iFirst = (int)(offset / Neodymium.renderer.getStride()); mesh.offset = offset; } else if(mesh.gpuStatus == GPUStatus.PENDING_DELETE) { mesh.iFirst = -1; @@ -154,7 +154,7 @@ public class GPUMemoryManager { glBindBuffer(GL_ARRAY_BUFFER, VBO); glBufferSubData(GL_ARRAY_BUFFER, nextBase, mesh.buffer); - mesh.iFirst = (int)(nextBase / mesh.getStride()); + mesh.iFirst = (int)(nextBase / Neodymium.renderer.getStride()); mesh.iCount = mesh.quadCount * 4; mesh.offset = nextBase; -- cgit