diff options
author | FalsePattern <me@falsepattern.com> | 2023-12-01 13:29:09 +0100 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2023-12-01 18:34:00 +0100 |
commit | 68357a8cc9c8cf9eab9e177cb6aea18cfbc3f584 (patch) | |
tree | 932dd32510e56db5320cc616f0db052defaf7d3a /src/main/java/makamys/neodymium/renderer/GPUMemoryManager.java | |
parent | fbe408c777dcf6ea5d2d784b739287d6db2bf52c (diff) | |
download | Neodymium-68357a8cc9c8cf9eab9e177cb6aea18cfbc3f584.tar.gz Neodymium-68357a8cc9c8cf9eab9e177cb6aea18cfbc3f584.tar.bz2 Neodymium-68357a8cc9c8cf9eab9e177cb6aea18cfbc3f584.zip |
unify stride calculation into NeoRenderer
Diffstat (limited to 'src/main/java/makamys/neodymium/renderer/GPUMemoryManager.java')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/GPUMemoryManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
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; |