diff options
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/renderer')
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/renderer/Renderer.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/renderer/Renderer.java b/src/main/java/io/polyfrost/oneconfig/renderer/Renderer.java index 235371f..d5febec 100644 --- a/src/main/java/io/polyfrost/oneconfig/renderer/Renderer.java +++ b/src/main/java/io/polyfrost/oneconfig/renderer/Renderer.java @@ -1,5 +1,6 @@ package io.polyfrost.oneconfig.renderer; +import gg.essential.universal.UGraphics; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; @@ -10,7 +11,7 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.ResourceLocation; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.*; import java.awt.*; @@ -52,9 +53,14 @@ public class Renderer extends Gui { GlStateManager.disableAlpha(); worldRenderer.begin(GL11.GL_POLYGON, DefaultVertexFormats.POSITION); worldRenderer.pos(x, y, 0).endVertex(); - GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST); - GL11.glEnable(GL11.GL_POLYGON_SMOOTH); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); + //GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST); + //GL11.glEnable(GL11.GL_POLYGON_SMOOTH); + //GL11.glCullFace(GL11.GL_FRONT); + //GL11.glCullFace(GL11.GL_FRONT_AND_BACK); + //GL11.glPolygonMode(GL11.GL_FRONT, GL11.GL_FILL); + //GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); + //GL11.glEnable(ARBMultisample.GL_MULTISAMPLE_ARB); + for (int i = 0; i <= sides; i++) { double angle = ((Math.PI * 2) * i / sides) + Math.toRadians(180); @@ -64,12 +70,12 @@ public class Renderer extends Gui { } tessellator.draw(); GlStateManager.disableBlend(); - GL11.glDisable(GL11.GL_POLYGON_SMOOTH); + //GL11.glDisable(GL11.GL_POLYGON_SMOOTH); GL11.glEnable(GL11.GL_TEXTURE_2D); } public static void drawRegularPolygon(double x, double y, int radius, int sides, int color) { - drawRegularPolygon(x, y, radius, sides, color, 0d, 10d); + drawRegularPolygon(x, y, radius, sides, color, 0d, 10000d); } /** @@ -79,7 +85,7 @@ public class Renderer extends Gui { */ public static void drawRoundRect(double x, double y, double width, double height, int radius, int color) { GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); + //GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); Gui.drawRect((int) x + radius, (int) y, (int) (x + width - radius), (int) (y + radius), color); // top Gui.drawRect((int) x + radius, (int) (y + height - radius), (int) (x + width - radius), (int) (y + height), color); // bottom Gui.drawRect((int) x, (int) y + radius, (int) (x + width), (int) (y + height - radius), color); // main @@ -88,6 +94,7 @@ public class Renderer extends Gui { drawRegularPolygon(x + radius, y + height - radius, radius, 80, color, 4.7d, 6.3d); // bottom left drawRegularPolygon(x + width - radius, y + height - radius, radius, 80, color, 6.25d, 7.9d); // bottom right GL11.glDisable(GL11.GL_BLEND); + GL11.glColor4f(1f,1f,1f,1f); } public static float clamp(float number) { |