aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-07 23:41:51 +0200
committermakamys <makamys@outlook.com>2022-06-07 23:41:51 +0200
commit2373734860f4e52b83f0e9ac901ac515dd95b13b (patch)
tree522dffd1f5075a8455b0ca8753d2cc9c2e38d188 /src/main/java
parent6f99449bd858a15d5ee1bc5e89a5a88c0356ec1c (diff)
downloadNeodymium-2373734860f4e52b83f0e9ac901ac515dd95b13b.tar.gz
Neodymium-2373734860f4e52b83f0e9ac901ac515dd95b13b.tar.bz2
Neodymium-2373734860f4e52b83f0e9ac901ac515dd95b13b.zip
Fix crash when opening GPU mem debugger
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java b/src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java
index 6789406..ebfb334 100644
--- a/src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java
+++ b/src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java
@@ -177,7 +177,7 @@ public class GPUMemoryManager {
for(Mesh mesh : sentMeshes) {
int o = mesh.offset / 10000;
- int o2 = (mesh.offset + mesh.buffer.limit()) / 10000;
+ int o2 = (mesh.offset + mesh.bufferSize()) / 10000;
if(o / rowLength == o2 / rowLength) {
if(mesh.gpuStatus != Mesh.GPUStatus.PENDING_DELETE) {
GuiHelper.drawRectangle(o % rowLength, o / rowLength + yOff, mesh.buffer.limit() / scale + 1, 1, meshI == nextMesh ? 0x00FF00 : 0xFFFFFF);