aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorDaniel She <shekwancheung0528@gmail.com>2019-05-12 10:55:21 +0800
committerDaniel She <shekwancheung0528@gmail.com>2019-05-12 10:55:21 +0800
commitf51e5af85e26f588cbe2eba2eef728e783201bc8 (patch)
treee490afcfe8974af8a6c65954667bf822505224d4 /src/main/java/com
parent64c240a5a5eb6b4312b86e24ddbaaa70ada49359 (diff)
parentb99108611ea89dc0eda6c433447ce398a98ad4ad (diff)
downloadRoughlyEnoughItems-f51e5af85e26f588cbe2eba2eef728e783201bc8.tar.gz
RoughlyEnoughItems-f51e5af85e26f588cbe2eba2eef728e783201bc8.tar.bz2
RoughlyEnoughItems-f51e5af85e26f588cbe2eba2eef728e783201bc8.zip
Merge branch '1.14-dev' into 1.14
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/zeitheron/hammercore/client/utils/Scissors.java14
1 files changed, 14 insertions, 0 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
index 36d56329d..fb1334989 100644
--- a/src/main/java/com/zeitheron/hammercore/client/utils/Scissors.java
+++ b/src/main/java/com/zeitheron/hammercore/client/utils/Scissors.java
@@ -11,10 +11,21 @@ import org.lwjgl.opengl.GL11;
* @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().window;
@@ -32,6 +43,9 @@ public class Scissors {
GL11.glScissor(x, sh - height - y, width, height);
}
+ /**
+ * Stops the scissor test
+ */
public static void end() {
GL11.glDisable(GL11.GL_SCISSOR_TEST);
}