Skip to content

Commit

Permalink
Reuse modelview in firefly render (#95)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2a1e618)
  • Loading branch information
charagarlnad authored and Dream-Master committed Dec 17, 2024
1 parent be0b442 commit c915667
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class RenderTFTinyFirefly extends Render {
private static final ResourceLocation textureLoc = new ResourceLocation(
TwilightForestMod.MODEL_DIR + "firefly-tiny.png");

private static final FloatBuffer modelview = BufferUtils.createFloatBuffer(16);

public RenderTFTinyFirefly() {
fireflyModel = new ModelTFTinyFirefly();
}
Expand All @@ -42,7 +44,7 @@ public void doRenderTinyFirefly(EntityTFTinyFirefly firefly, double x, double y,
GL11.glTranslatef((float) x, (float) y + 0.5F, (float) z);

// undo rotations so we can draw a billboarded firefly
FloatBuffer modelview = BufferUtils.createFloatBuffer(16);
modelview.clear();

GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelview);

Expand Down

0 comments on commit c915667

Please sign in to comment.