Skip to content

Commit

Permalink
Fix MeshEmitter not restarting builder after emitting
Browse files Browse the repository at this point in the history
  • Loading branch information
PepperCode1 committed May 27, 2024
1 parent 9593126 commit c880cdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ void prepareForGeometry(boolean shade) {
bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} else if (shade != currentShade) {
emit();
bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
}

currentShade = shade;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private void prepareForGeometry(boolean shade) {
bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} else if (shade != currentShade) {
emit();
bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
}

currentShade = shade;
Expand Down

0 comments on commit c880cdc

Please sign in to comment.