diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/Engine.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/Engine.java index a72a24a01..1e33c16db 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/Engine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/Engine.java @@ -3,5 +3,4 @@ package com.jozufozu.flywheel.backend.instancing; import com.jozufozu.flywheel.api.MaterialManager; public interface Engine extends RenderDispatcher, MaterialManager { - String getName(); } diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchingEngine.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchingEngine.java index b08044d7b..39ea2343b 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchingEngine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchingEngine.java @@ -70,8 +70,4 @@ public class BatchingEngine implements Engine { } - @Override - public String getName() { - return "Batching"; - } } diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancingEngine.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancingEngine.java index b8406851e..c75fff017 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancingEngine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancingEngine.java @@ -160,11 +160,6 @@ public class InstancingEngine

implements Engine { } } - @Override - public String getName() { - return "GL33 Instanced Arrays"; - } - @FunctionalInterface public interface OriginShiftListener { void onOriginShift(); 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 7eadc68dc..7e50a5ddc 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java +++ b/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java @@ -31,6 +31,12 @@ public class ModelPool implements ModelAllocator { private boolean dirty; private boolean anyToRemove; + /** + * 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) { this.vertexType = vertexType; int stride = vertexType.getStride(); @@ -40,7 +46,6 @@ public class ModelPool implements ModelAllocator { vbo.bind(); vbo.ensureCapacity((long) stride * initialSize); vbo.setGrowthMargin(stride * 64); - vbo.unbind(); } /** diff --git a/src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java b/src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java index 6980e4608..7b8a88c8a 100644 --- a/src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java +++ b/src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java @@ -16,6 +16,7 @@ import com.jozufozu.flywheel.core.crumbling.CrumblingRenderer; import com.jozufozu.flywheel.event.BeginFrameEvent; import com.jozufozu.flywheel.event.ReloadRenderersEvent; import com.jozufozu.flywheel.event.RenderLayerEvent; +import com.mojang.blaze3d.vertex.BufferUploader; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Matrix4f; @@ -73,6 +74,7 @@ public class LevelRendererMixin { flywheel$renderLayer(type, stack, camX, camY, camZ); } flywheel$LayerRendered = false; + BufferUploader.reset(); } @Unique