From aa46f6ceb11fc2833331c381c5c52c71df1f8942 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Tue, 20 Feb 2024 10:46:00 -0600 Subject: [PATCH] A mesh unbound - Clear a mesh's set of bound vaos when it's uploaded - Fixes visual glitches on instancing when removing instances --- .../java/com/jozufozu/flywheel/backend/engine/MeshPool.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/MeshPool.java b/src/main/java/com/jozufozu/flywheel/backend/engine/MeshPool.java index 1775b89d3..9cf6b84f9 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/MeshPool.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/MeshPool.java @@ -145,6 +145,8 @@ public class MeshPool { baseVertex += mesh.vertexCount(); mesh.firstIndex = firstIndices.getInt(mesh.mesh.indexSequence()); + + mesh.boundTo.clear(); } vbo.upload(vertexBlock);