aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/zeitheron
diff options
context:
space:
mode:
authorDanielshe <shekwancheung0528@gmail.com>2019-11-03 14:44:52 +0800
committerDanielshe <shekwancheung0528@gmail.com>2019-11-03 14:44:59 +0800
commit9f5a9eae9a7863412cc5eb433bf15e5ee71da616 (patch)
tree0e6b0b94af061c5e9023b1ff19f339a6c30149be /src/main/java/com/zeitheron
parent3e3e25855b9f6df507a7d4c8a07c64b9a502fae2 (diff)
downloadRoughlyEnoughItems-9f5a9eae9a7863412cc5eb433bf15e5ee71da616.tar.gz
RoughlyEnoughItems-9f5a9eae9a7863412cc5eb433bf15e5ee71da616.tar.bz2
RoughlyEnoughItems-9f5a9eae9a7863412cc5eb433bf15e5ee71da616.zip
3.2.1
Diffstat (limited to 'src/main/java/com/zeitheron')
-rw-r--r--src/main/java/com/zeitheron/hammercore/client/utils/Scissors.java52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/main/java/com/zeitheron/hammercore/client/utils/Scissors.java b/src/main/java/com/zeitheron/hammercore/client/utils/Scissors.java
deleted file mode 100644
index c32053447..000000000
--- a/src/main/java/com/zeitheron/hammercore/client/utils/Scissors.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.zeitheron.hammercore.client.utils;
-
-import net.minecraft.client.MinecraftClient;
-import net.minecraft.client.util.Window;
-import org.lwjgl.opengl.GL11;
-
-/**
- * This is originally the part of Hammer Lib, repacked in REI with permission.
- * Adapted GL scissor for minecraft pixel resolution and adjusts (0;0) as left-top corner.
- *
- * @author Zeitheron
- */
-public class Scissors {
- /**
- * Starts the scissor test
- */
- public static void begin() {
- GL11.glEnable(GL11.GL_SCISSOR_TEST);
- }
-
- /**
- * Setup the scissor bounds
- *
- * @param x the top left x coordinates
- * @param y the top left y coordinates
- * @param width the width of the bounds
- * @param height the height of the bounds
- */
- public static void scissor(int x, int y, int width, int height) {
- Window window = MinecraftClient.getInstance().getWindow();
-
- int sw = window.getWidth();
- int sh = window.getHeight();
- float dw = window.getScaledWidth();
- float dh = window.getScaledHeight();
-
- x = Math.round(sw * (x / dw));
- y = Math.round(sh * (y / dh));
-
- width = Math.round(sw * (width / dw));
- height = Math.round(sh * (height / dh));
-
- GL11.glScissor(x, sh - height - y, width, height);
- }
-
- /**
- * Stops the scissor test
- */
- public static void end() {
- GL11.glDisable(GL11.GL_SCISSOR_TEST);
- }
-} \ No newline at end of file