aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
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);
}