Skip to content

Commit

Permalink
Fix VBORenderType.
Browse files Browse the repository at this point in the history
  • Loading branch information
covers1624 committed Apr 26, 2024
1 parent f95f2a8 commit baf638f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit baf638f

Please sign in to comment.