diff options
author | makamys <makamys@outlook.com> | 2022-06-07 22:43:26 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-07 22:43:26 +0200 |
commit | 5daa6c567bf439ed2bed64ff16dc53ae7a320d34 (patch) | |
tree | 1e5065e783cf914eeea4f770fdbf1f45b8a65d02 /src/main/java/makamys/lodmod/util | |
parent | 14aafa1180648e3e2bac2f38dc5934a3e4e49974 (diff) | |
download | Neodymium-5daa6c567bf439ed2bed64ff16dc53ae7a320d34.tar.gz Neodymium-5daa6c567bf439ed2bed64ff16dc53ae7a320d34.tar.bz2 Neodymium-5daa6c567bf439ed2bed64ff16dc53ae7a320d34.zip |
Make GPU debugger a bit prettier
Diffstat (limited to 'src/main/java/makamys/lodmod/util')
-rw-r--r-- | src/main/java/makamys/lodmod/util/GuiHelper.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/util/GuiHelper.java b/src/main/java/makamys/lodmod/util/GuiHelper.java index 0f0f80e..3054237 100644 --- a/src/main/java/makamys/lodmod/util/GuiHelper.java +++ b/src/main/java/makamys/lodmod/util/GuiHelper.java @@ -26,7 +26,6 @@ public class GuiHelper { public static void drawRectangle(int x, int y, int w, int h, int color) { Tessellator tessellator = Tessellator.instance; - //GL11.glEnable(GL11.GL_BLEND); tessellator.startDrawingQuads(); tessellator.setColorOpaque_I(color); tessellator.addVertex(x, y, 0); @@ -37,6 +36,22 @@ public class GuiHelper { tessellator.draw(); } + public static void drawRectangle(int x, int y, int w, int h, int color, int opacity) { + GL11.glEnable(GL11.GL_BLEND); + + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_I(color, opacity); + tessellator.addVertex(x, y, 0); + tessellator.addVertex(x, y+h, 0); + tessellator.addVertex(x+w, y+h, 0); + tessellator.addVertex(x+w, y, 0); + + tessellator.draw(); + + GL11.glDisable(GL11.GL_BLEND); + } + public static void end() { //GL11.glDisable(GL11.GL_BLEND); |