Examples of glColor4f()


Examples of javax.media.opengl.GL2.glColor4f()

          gl.glVertex2f(p.x, p.y);
 
          p = t.getPoint(0);
        c = t.getColor(0);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
          gl.glVertex2f(p.x, p.y);
      }
      // reset color;
      applyColor();
    } else {
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

        if(t == null) continue;

        p = t.getPoint(0);
        c = t.getColor(0);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(1);
        c = t.getColor(1);
        if(c == null) c = color;
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(1);
        c = t.getColor(1);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(2);
        c = t.getColor(2);
        if(c == null) c = color;
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(2);
        c = t.getColor(2);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
            gl.glVertex2f(p.x, p.y);
      }
      // reset color;
      applyColor();
    } else {
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

        if (tc3 == null) throw new IllegalArgumentException("Texture coordinate for triangle must not be null");
   
        p = t.getPoint(0);
        c = t.getColor(0);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        float texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc1.x;
        float texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc1.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
       
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(1);
        c = t.getColor(1);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc2.x;
        texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc2.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
       
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(2);
        c = t.getColor(2);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc3.x;
        texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc3.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
   
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

  public void drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color) {
    GL2 gl = panel.getGL().getGL2();
    gl.glPushMatrix();
    transformViewport(gl, zero);
    gl.glBegin(GL2.GL_TRIANGLE_FAN);
    gl.glColor4f(color.x, color.y, color.z, .4f);
    for (int i = 0; i < vertexCount; i++) {
      Vec2 v = vertices[i];
      gl.glVertex2f(v.x, v.y);
    }
    gl.glEnd();
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

      gl.glVertex2f(v.x, v.y);
    }
    gl.glEnd();

    gl.glBegin(GL2.GL_LINE_LOOP);
    gl.glColor4f(color.x, color.y, color.z, 1f);
    for (int i = 0; i < vertexCount; i++) {
      Vec2 v = vertices[i];
      gl.glVertex2f(v.x, v.y);
    }
    gl.glEnd();
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

    float x = radius;
    float y = 0;
    float cx = center.x;
    float cy = center.y;
    gl.glBegin(GL2.GL_LINE_LOOP);
    gl.glColor4f(color.x, color.y, color.z, 1);
    for (int i = 0; i < NUM_CIRCLE_POINTS; i++) {
      gl.glVertex3f(x + cx, y + cy, 0);
      // apply the rotation matrix
      float temp = x;
      x = c * x - s * y;
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.