Examples of glVertex2f()


Examples of javax.media.opengl.GL.glVertex2f()

      texLeft = texRight;
      texRight = temp;
    }
       
    gl.glTexCoord2f(texLeft, texTop);
        gl.glVertex2f(0, 0);

        gl.glTexCoord2f(texRight, texTop);
        gl.glVertex2f(width, 0);

        gl.glTexCoord2f(texRight, texBottom);
View Full Code Here

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

  public void drawPoint(Vec2 argPoint, float argRadiusOnScreen, Color3f argColor) {
    Vec2 vec = getWorldToScreen(argPoint);
    GL2 gl = panel.getGL().getGL2();
    gl.glBegin(GL2.GL_POINT);
    gl.glPointSize(argRadiusOnScreen);
    gl.glVertex2f(vec.x, vec.y);
    gl.glEnd();
  }

  private final Vec2 trans = new Vec2();
View Full Code Here

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

    GL2 gl = panel.getGL().getGL2();
    gl.glBegin(GL2.GL_TRIANGLE_FAN);
    gl.glColor4f(color.x, color.y, color.z, .4f);
    for (int i = 0; i < vertexCount; i++) {
      getWorldToScreenToOut(vertices[i], trans);
      gl.glVertex2f(trans.x, trans.y);
    }
    gl.glEnd();

    gl.glBegin(GL2.GL_LINE_LOOP);
    gl.glColor4f(color.x, color.y, color.z, 1f);
View Full Code Here

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

    gl.glBegin(GL2.GL_LINE_LOOP);
    gl.glColor4f(color.x, color.y, color.z, 1f);
    for (int i = 0; i < vertexCount; i++) {
      getWorldToScreenToOut(vertices[i], trans);
      gl.glVertex2f(trans.x, trans.y);
    }
    gl.glEnd();
  }

  private final Vec2Array vec2Array = new Vec2Array();
View Full Code Here

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

  public void drawSegment(Vec2 p1, Vec2 p2, Color3f color) {
    GL2 gl = panel.getGL().getGL2();
    gl.glBegin(GL2.GL_LINES);
    gl.glColor3f(color.x, color.y, color.z);
    getWorldToScreenToOut(p1, trans);
    gl.glVertex2f(trans.x, trans.y);
    getWorldToScreenToOut(p2, trans);
    gl.glVertex2f(trans.x, trans.y);
    gl.glEnd();
  }
View Full Code Here

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

    gl.glBegin(GL2.GL_LINES);
    gl.glColor3f(color.x, color.y, color.z);
    getWorldToScreenToOut(p1, trans);
    gl.glVertex2f(trans.x, trans.y);
    getWorldToScreenToOut(p2, trans);
    gl.glVertex2f(trans.x, trans.y);
    gl.glEnd();
  }


  private final Vec2 temp = new Vec2();
View Full Code Here

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

    gl.glColor3f(1, 0, 0);

    temp2.x = xf.p.x + k_axisScale * xf.q.c;
    temp2.y = xf.p.y + k_axisScale * xf.q.s;
    getWorldToScreenToOut(temp2, temp2);
    gl.glVertex2f(temp.x, temp.y);
    gl.glVertex2f(temp2.x, temp2.y);

    gl.glColor3f(0, 1, 0);
    temp2.x = xf.p.x + -k_axisScale * xf.q.s;
    temp2.y = xf.p.y + k_axisScale * xf.q.c;
 
View Full Code Here

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

    temp2.x = xf.p.x + k_axisScale * xf.q.c;
    temp2.y = xf.p.y + k_axisScale * xf.q.s;
    getWorldToScreenToOut(temp2, temp2);
    gl.glVertex2f(temp.x, temp.y);
    gl.glVertex2f(temp2.x, temp2.y);

    gl.glColor3f(0, 1, 0);
    temp2.x = xf.p.x + -k_axisScale * xf.q.s;
    temp2.y = xf.p.y + k_axisScale * xf.q.c;
    getWorldToScreenToOut(temp2, temp2);
View Full Code Here

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

    gl.glColor3f(0, 1, 0);
    temp2.x = xf.p.x + -k_axisScale * xf.q.s;
    temp2.y = xf.p.y + k_axisScale * xf.q.c;
    getWorldToScreenToOut(temp2, temp2);
    gl.glVertex2f(temp.x, temp.y);
    gl.glVertex2f(temp2.x, temp2.y);
    gl.glEnd();
  }

  @Override
View Full Code Here

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

    gl.glColor3f(0, 1, 0);
    temp2.x = xf.p.x + -k_axisScale * xf.q.s;
    temp2.y = xf.p.y + k_axisScale * xf.q.c;
    getWorldToScreenToOut(temp2, temp2);
    gl.glVertex2f(temp.x, temp.y);
    gl.glVertex2f(temp2.x, temp2.y);
    gl.glEnd();
  }

  @Override
  public void drawString(float x, float y, String s, Color3f color) {
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.