From fe42db902e82d7dd385a4cb8f9d3ec23e3a70e1f Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 19 Sep 2016 20:26:43 +0200 Subject: [PATCH] Cleanup & Set Blend func --- .../gui/font/UnicodeFontRenderer.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/org/darkstorm/minecraft/gui/font/UnicodeFontRenderer.java b/src/org/darkstorm/minecraft/gui/font/UnicodeFontRenderer.java index 76ee1aa..f942ee5 100644 --- a/src/org/darkstorm/minecraft/gui/font/UnicodeFontRenderer.java +++ b/src/org/darkstorm/minecraft/gui/font/UnicodeFontRenderer.java @@ -35,15 +35,7 @@ public UnicodeFontRenderer(Font awtFont) { public int drawString(String string, int x, int y, int color) { if(string == null) return 0; - // glClear(256); - // glMatrixMode(GL_PROJECTION); - // glLoadIdentity(); - // IntBuffer buffer = BufferUtils.createIntBuffer(16); - // glGetInteger(GL_VIEWPORT, buffer); - // glOrtho(0, buffer.get(2), buffer.get(3), 0, 1000, 3000); - // glMatrixMode(GL_MODELVIEW); - // glLoadIdentity(); - // glTranslatef(0, 0, -2000); + glPushMatrix(); glScaled(0.5, 0.5, 0.5); @@ -56,12 +48,11 @@ public int drawString(String string, int x, int y, int color) { glDisable(GL_LIGHTING); if(texture) glDisable(GL_TEXTURE_2D); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + x *= 2; y *= 2; - // glBegin(GL_LINES); - // glVertex3d(x, y, 0); - // glVertex3d(x + getStringWidth(string), y + FONT_HEIGHT, 0); - // glEnd(); font.drawString(x, y, string, new org.newdawn.slick.Color(color)); @@ -75,7 +66,7 @@ public int drawString(String string, int x, int y, int color) { return x; } - @Override + @Override // drawStringWithShadow / func_175063_a (depends on mappings) public int func_175063_a(String string, float x, float y, int color) { return drawString(string, (int) x, (int) y, color); }