public void drawLine(float[] pts, int numPts, float width, Color color, boolean drawAsLoop) { if (numPts * 2 > pts.length) { throw new ArrayIndexOutOfBoundsException(numPts * 2); } if (numPts >= 2) { tintStack.setColor(color); GL11.glDisable(GL11.GL_TEXTURE_2D); if (useQuadsForLines) { drawLinesAsQuads(numPts, pts, width, drawAsLoop); } else { drawLinesAsLines(numPts, pts, width, drawAsLoop); } GL11.glEnable(GL11.GL_TEXTURE_2D); } }
/** * Calls GL11.glColor4f() with the specified color multiplied by the current global tint color. * * @param color the color to set */ public void setColor(Color color) { tintStack.setColor(color); }
public void popGlobalTintColor() { tintStack = tintStack.pop(); }
/** * Pushes a white entry on the tint stack which ignores the previous tint color. It must be * removed by calling {@link #popGlobalTintColor()}. * * <p>This is useful when rendering to texture */ public void pushGlobalTintColorReset() { tintStack = tintStack.pushReset(); }
public void pushGlobalTintColor(float r, float g, float b, float a) { tintStack = tintStack.push(r, g, b, a); }