Skip to content

Commit

Permalink
Implement Gl transformations in 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SmylerMC committed Jun 17, 2024
1 parent 10817fc commit 7e13711
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.mojang.blaze3d.systems.RenderSystem;
import net.smyler.smylib.Color;


public class Lwjgl3GlState implements GlState {
@Override
public void enableAlpha() {
Expand Down Expand Up @@ -34,4 +35,29 @@ public void disableColorLogic() {
RenderSystem.disableColorLogicOp();
}

@Override
public void pushViewMatrix() {
RenderSystem.getModelViewStack().pushPose();
}

@Override
public void rotate(double angle) {
RenderSystem.getModelViewMatrix().rotate((float)(angle), 0f, 0f, 1f);
}

@Override
public void translate(double x, double y) {
RenderSystem.getModelViewMatrix().translate((float)x, (float)y, 0);
}

@Override
public void scale(double x, double y) {
RenderSystem.getModelViewMatrix().scale((float)x, (float)y, 1);
}

@Override
public void popViewMatrix() {
RenderSystem.getModelViewStack().popPose();
}

}

0 comments on commit 7e13711

Please sign in to comment.