Package javax.media.opengl

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


      property.shape.fill(gl);
    }

    // draw the border
    if (property.strokeWidth > 0.0f) {
      gl.glLineWidth(property.strokeWidth);
      gl.glColor4f(property.strokeColor.getRed() / 255f,
          property.strokeColor.getGreen() / 255f,
          property.strokeColor.getBlue() / 255f,
          property.strokeColor.getAlpha() / 255f);
      property.shape.draw(gl);
View Full Code Here


      return false;
    }
    GL2 gl = scene.gl;
    gl.glPushName(property.shapeId);
    if (property.strokeWidth > 0.0f) {
      gl.glLineWidth(property.strokeWidth);
      gl.glColor4f(property.strokeColor.getRed() / 255f,
          property.strokeColor.getGreen() / 255f,
          property.strokeColor.getBlue() / 255f,
          property.strokeColor.getAlpha() / 255f);
View Full Code Here

            int linePatternScaleFactor,
            boolean lineAntialiasing) {
        if (VERBOSE) System.err.println("JoglPipeline.updateLineAttributes()");

    GL2 gl = context(ctx).getGL().getGL2();
        gl.glLineWidth(lineWidth);

        if (linePattern == LineAttributes.PATTERN_SOLID) {
            gl.glDisable(GL2.GL_LINE_STIPPLE);
        } else {
            if (linePattern == LineAttributes.PATTERN_DASH) { // dashed lines
View Full Code Here

        gl.glVertex2f(x2, y2);
       
  }
  private void applyLineWidth() {
    GL2 gl = drawable.getGL().getGL2();
    gl.glLineWidth(lineWidth);
  }
  private Line[] lineArray = new Line[1];
  public void drawLine(Line line, boolean useColors) {
    if (line == null) throw new IllegalArgumentException("line must not be null");
    lineArray[0] = line;
View Full Code Here

     */
    private void renderTool(GLAutoDrawable drawable) {
        GL2 gl = drawable.getGL().getGL2();

       
        gl.glLineWidth(8.0f);
        byte []color;
        color = VisualizerUtils.getVertexColor(VisualizerUtils.Color.YELLOW);
        int verts = 0;
        int colors = 0;
       
View Full Code Here

            }
            if (this.vertexArrayDirty) {
                this.updateGLGeometryArray(drawable);
                this.vertexArrayDirty = false;
            }
            gl.glLineWidth(1.0f);

            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
            gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
            gl.glDrawArrays( GL.GL_LINES, 0, numberOfVertices);
            gl.glDisableClientState(GL2.GL_COLOR_ARRAY);
View Full Code Here

        else {
            // TODO: By using a GL_LINE_STRIP I can easily use half the number of
            //       verticies. May lose some control over line colors though.
            //gl.glEnable(GL2.GL_LINE_SMOOTH);
            gl.glBegin(GL_LINES);
            gl.glLineWidth(1.0f);

            int verts = 0;
            int colors = 0;
            for(LineSegment ls : gcodeLineList)
            {
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.