From ec42f47d9e3510631a4914cb6c3ff54e75a8a047 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Sat, 26 Apr 2025 10:39:50 +1000 Subject: [PATCH] TODO: note --- .../me/cortex/voxy/client/core/rendering/util/BufferArena.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/util/BufferArena.java b/src/main/java/me/cortex/voxy/client/core/rendering/util/BufferArena.java index 3485afdd..a8c77e29 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/util/BufferArena.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/util/BufferArena.java @@ -18,6 +18,9 @@ public class BufferArena { private final AllocationArena allocationMap = new AllocationArena(); private long used; + //TODO: cache the GlBuffer accross open and closing of the renderer + // until the instance is closed, this helps the driver as allocating a huge block of memory is expensive + // so reusing it is ideal public BufferArena(long capacity, int elementSize) { if (capacity%elementSize != 0) { throw new IllegalArgumentException("Capacity not a multiple of element size");