diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java b/src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java index a04adb2..eba0a8f 100644 --- a/src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java +++ b/src/main/java/makamys/lodmod/renderer/GPUMemoryManager.java @@ -82,6 +82,11 @@ public class GPUMemoryManager { if(mesh == null) { return; } + + if(nextMeshOffset + mesh.buffer.limit() >= BUFFER_SIZE) { + return; + } + if(mesh.gpuStatus == GPUStatus.UNSENT) { mesh.prepareBuffer(); |