コード例 #1
0
ファイル: LWJGLRenderer.java プロジェクト: richlen99/GuiAPI
 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);
   }
 }
コード例 #2
0
ファイル: LWJGLRenderer.java プロジェクト: richlen99/GuiAPI
 /**
  * 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);
 }
コード例 #3
0
ファイル: LWJGLRenderer.java プロジェクト: richlen99/GuiAPI
 public void popGlobalTintColor() {
   tintStack = tintStack.pop();
 }
コード例 #4
0
ファイル: LWJGLRenderer.java プロジェクト: richlen99/GuiAPI
 /**
  * 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();
 }
コード例 #5
0
ファイル: LWJGLRenderer.java プロジェクト: richlen99/GuiAPI
 public void pushGlobalTintColor(float r, float g, float b, float a) {
   tintStack = tintStack.push(r, g, b, a);
 }