From baf638fea19a96c9595308034c3c83806494f62b Mon Sep 17 00:00:00 2001 From: covers1624 Date: Mon, 22 Apr 2024 14:23:06 +0930 Subject: [PATCH] Fix VBORenderType. --- .../java/codechicken/lib/render/buffer/VBORenderType.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/codechicken/lib/render/buffer/VBORenderType.java b/src/main/java/codechicken/lib/render/buffer/VBORenderType.java index 5427d82d..2a021c6b 100644 --- a/src/main/java/codechicken/lib/render/buffer/VBORenderType.java +++ b/src/main/java/codechicken/lib/render/buffer/VBORenderType.java @@ -68,13 +68,15 @@ public WithCallbacks withState(RenderStateShard shard) { private void render() { rebuild(); - this.vertexBuffer.drawWithShader(RenderSystem.getModelViewMatrix(), RenderSystem.getProjectionMatrix(), RenderSystem.getShader()); + vertexBuffer.bind(); + vertexBuffer.drawWithShader(RenderSystem.getModelViewMatrix(), RenderSystem.getProjectionMatrix(), RenderSystem.getShader()); } private void rebuild() { if (!dirty) return; builder.begin(mode(), format()); factory.accept(format(), builder); + vertexBuffer.bind(); vertexBuffer.upload(builder.end()); builder.clear(); dirty = false;