Prepping for a true pulse effect

This commit is contained in:
pahimar 2012-11-30 15:40:48 -05:00
parent 0ecca70ffe
commit 55558bf211

View file

@ -123,8 +123,7 @@ public class DrawBlockHighlightHandler {
public static void renderSlidingQuad(int texture, float transparency) { public static void renderSlidingQuad(int texture, float transparency) {
float slide = (System.currentTimeMillis() % 3000) / 3000f; float pulse = (System.currentTimeMillis() % 3000) / 3000f;
double pulse = (double) 1 + slide;
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture); GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
@ -132,10 +131,10 @@ public class DrawBlockHighlightHandler {
GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1, 1, 1, slide); GL11.glColor4f(1, 1, 1, pulse);
tessellator.startDrawingQuads(); tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(1, 1, 1, slide); tessellator.setColorRGBA_F(1, 1, 1, pulse);
tessellator.addVertexWithUV(-0.5D, 0.5D, 0F, 0, 1); tessellator.addVertexWithUV(-0.5D, 0.5D, 0F, 0, 1);
tessellator.addVertexWithUV(0.5D, 0.5D, 0F, 1, 1); tessellator.addVertexWithUV(0.5D, 0.5D, 0F, 1, 1);