Examples of glBegin()


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

      }
    }
    // start new primitive if necessary
    if(primitive != null && ended) {
      if(primitive == Primitive.POINT) {
        gl.glBegin(GL.GL_POINTS);
      }
      if(primitive == Primitive.LINE) {
        gl.glBegin(GL.GL_LINES);
      }
      if(primitive == Primitive.TRIANGLE || primitive == Primitive.TEXTURED_TRIANGLE) {
View Full Code Here

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

    if(primitive != null && ended) {
      if(primitive == Primitive.POINT) {
        gl.glBegin(GL.GL_POINTS);
      }
      if(primitive == Primitive.LINE) {
        gl.glBegin(GL.GL_LINES);
      }
      if(primitive == Primitive.TRIANGLE || primitive == Primitive.TEXTURED_TRIANGLE) {
        gl.glBegin(GL.GL_TRIANGLES);
      }
      if(primitive == Primitive.IMAGE) {
View Full Code Here

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

      }
      if(primitive == Primitive.LINE) {
        gl.glBegin(GL.GL_LINES);
      }
      if(primitive == Primitive.TRIANGLE || primitive == Primitive.TEXTURED_TRIANGLE) {
        gl.glBegin(GL.GL_TRIANGLES);
      }
      if(primitive == Primitive.IMAGE) {
        gl.glBegin(GL2.GL_QUADS);
      }
     
View Full Code Here

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

      }
      if(primitive == Primitive.TRIANGLE || primitive == Primitive.TEXTURED_TRIANGLE) {
        gl.glBegin(GL.GL_TRIANGLES);
      }
      if(primitive == Primitive.IMAGE) {
        gl.glBegin(GL2.GL_QUADS);
      }
     
      ended = false;
    }
    drawable.setLastImage(image);
View Full Code Here

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

            public void render() {
                System.out.println("Canvas3D.render()");
                GraphicsContext3D gc = GraphicsContext3D.getGC();
    GL2 gl = gc.getGL();
    gl.glTranslatef(-1.5f, 0.0f, -6.0f);
    gl.glBegin(GL2.GL_TRIANGLES);
    gl.glVertex3f( 0.0f1.0f, 0.0f);
    gl.glVertex3f(-1.0f, -1.0f, 0.0f);
    gl.glVertex3f( 1.0f, -1.0f, 0.0f);
    gl.glEnd();
    gl.glTranslatef(3.0f, 0.0f, 0.0f);
View Full Code Here

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

    gl.glVertex3f( 0.0f1.0f, 0.0f);
    gl.glVertex3f(-1.0f, -1.0f, 0.0f);
    gl.glVertex3f( 1.0f, -1.0f, 0.0f);
    gl.glEnd();
    gl.glTranslatef(3.0f, 0.0f, 0.0f);
    gl.glBegin(GL2.GL_QUADS);
    gl.glVertex3f(-1.0f1.0f, 0.0f);
    gl.glVertex3f( 1.0f1.0f, 0.0f);
    gl.glVertex3f( 1.0f, -1.0f, 0.0f);
    gl.glVertex3f(-1.0f, -1.0f, 0.0f);
    gl.glEnd();
View Full Code Here

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

  @Override
  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);
    }
View Full Code Here

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

      Vec2 v = vertices[i];
      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);
    }
View Full Code Here

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

    float s = MathUtils.sin(theta);
    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;
View Full Code Here

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

    float s = MathUtils.sin(theta);
    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;
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.