diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancedMaterialGroup.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancedMaterialGroup.java index 73ea3e1c5..bd85a26b8 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancedMaterialGroup.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancedMaterialGroup.java @@ -44,7 +44,7 @@ public class InstancedMaterialGroup

implements MaterialG .onAMDWindows()) { this.allocator = FallbackAllocator.INSTANCE; } else { - this.allocator = new ModelPool(Formats.POS_TEX_NORMAL, 2048); + this.allocator = new ModelPool(Formats.POS_TEX_NORMAL); } } diff --git a/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java b/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java index 7e50a5ddc..5c1d426c7 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java +++ b/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java @@ -35,16 +35,14 @@ public class ModelPool implements ModelAllocator { * Create a new model pool. * * @param vertexType The vertex type of the models that will be stored in the pool. - * @param initialSize The initial size of the pool, in vertices. */ - public ModelPool(VertexType vertexType, int initialSize) { + public ModelPool(VertexType vertexType) { this.vertexType = vertexType; int stride = vertexType.getStride(); vbo = new MappedGlBuffer(GlBufferType.ARRAY_BUFFER); vbo.bind(); - vbo.ensureCapacity((long) stride * initialSize); vbo.setGrowthMargin(stride * 64); }