Examples of glEnd()


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

        gl.glVertex3f(x + cx, y + cy, 0);
        float temp = x;
        x = c * x - s * y;
        y = s * temp + c * y;
      }
      gl.glEnd();
    }
    gl.glPopMatrix();
  }

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

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

    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) {
    text.beginRendering(panel.getWidth(), panel.getHeight());
View Full Code Here

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

    Vec2 vec = getWorldToScreen(argPoint);
    GL2 gl = panel.getGL().getGL2();
    gl.glPointSize(argRadiusOnScreen);
    gl.glBegin(GL2.GL_POINTS);
    gl.glVertex2f(vec.x, vec.y);
    gl.glEnd();
  }

  private final Vec2 zero = new Vec2();

  @Override
View Full Code Here

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

    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();
    gl.glPopMatrix();
  }

  @Override
  public void drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color) {
View Full Code Here

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

        // Z-Axis
        gl.glColor3f( 0, 0, 1 );
        gl.glVertex3f( 0, 0, 0 );
        gl.glVertex3f( 0, 0, 50 );
       
        gl.glEnd();
       
        //# Draw number 50 on x/y-axis line.
        //glRasterPos2f(50,-5)
        //glutInit()
        //A = 53
View Full Code Here

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

            gl.glColor3ub(color[0], color[1], color[2]);
            gl.glVertex3d(this.workCoord.x, this.workCoord.y, this.workCoord.z);
            gl.glColor3ub(color[0], color[1], color[2]);
            gl.glVertex3d(this.workCoord.x, this.workCoord.y, this.workCoord.z+(1.0/this.scaleFactor));
           
        gl.glEnd();
    }
   
    /**
     * Render the GCode object.
     */
 
View Full Code Here

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

                gl.glVertex3d(lineVertexData[verts++], lineVertexData[verts++], lineVertexData[verts++]);
                gl.glColor3ub(lineColorData[colors++],lineColorData[colors++],lineColorData[colors++]);
                gl.glVertex3d(lineVertexData[verts++], lineVertexData[verts++], lineVertexData[verts++]);
            }

            gl.glEnd();
        }

        // makes the gui stay on top of elements
        // drawn before.
    }
View Full Code Here

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

            gl.glBegin(GL2.GL_TRIANGLE_FAN); /* For best performance here */

        for (final Point vertex : polygon.vertices())
            gl.glVertex2f(vertex.x, vertex.y);

        gl.glEnd();

        /* Now draw each indidual hole */
        for (ArrayList<Point> hole : polygon.holes())
        {
            // if only 1 vertex, draw a point
View Full Code Here

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

                gl.glBegin(GL2.GL_TRIANGLE_FAN); /* For best performance here */

            for (final Point vertex : hole)
                gl.glVertex2f(vertex.x, vertex.y);

            gl.glEnd();
        }

        /* Finally draw all of the circular holes */
        for (Circle circleHole : polygon.circles())
        {
View Full Code Here

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

            for (double angle = 0; angle < 2 * Math.PI; angle += increment)
            {
                gl.glVertex2d(cx + Math.cos(angle) * radius, cy + Math.sin(angle) * radius);
                gl.glVertex2d(cx + Math.cos(angle + increment) * radius, cy + Math.sin(angle + increment) * radius);
            }
            gl.glEnd();
        }

        /* Re-enable color */
        gl.glColorMask(true, true, true, true);
        gl.glStencilFunc(GL.GL_EQUAL, 1, 1);
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.