Package javax.media.opengl

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


            gl.glBegin(GL2.GL_LINE_STRIP);
            gl.glVertex3d(Vec4.ZERO.x, Vec4.ZERO.y, Vec4.ZERO.z);
            gl.glVertex3d(this.terrainPoint.x - this.placePoint.x, this.terrainPoint.y - this.placePoint.y,
                this.terrainPoint.z - this.placePoint.z);
            gl.glEnd();
        }
        finally
        {
            dc.getView().popReferenceCenter(dc);
        }
View Full Code Here


            gl.glDepthFunc(GL.GL_LESS);
            gl.glDepthRange(depth, depth);

            gl.glBegin(GL2.GL_POINTS);
            gl.glVertex3d(this.screenPoint.x, this.screenPoint.y, 0);
            gl.glEnd();

            gl.glDepthRange(0, 1); // reset depth range to the OGL default

            if (!dc.isPickingMode()) // don't pick via the label
                this.drawLabel(dc);
View Full Code Here

      gl.glVertex2d(centerX + halfWidth, centerY + halfWidth);
      gl.glVertex2d(centerX + halfHeight, centerY + halfWidth);
      gl.glVertex2d(centerX + halfHeight, centerY - halfWidth);
      gl.glVertex2d(centerX + halfWidth, centerY - halfWidth);
      gl.glVertex3d(0, 0, 0);
      gl.glEnd();
    }

    gl.glPopMatrix();

    return true;
View Full Code Here

    GLScene.V(gl, halfWidth,  halfHeight);
    gl.glTexCoord2f(tx2, ty2);
    GLScene.V(gl, halfWidth, -halfHeight);
    gl.glTexCoord2f(tx1, ty2);
    GLScene.V(gl, -halfWidth, -halfHeight);
    gl.glEnd();
    gl.glPopMatrix();

    texture.disable(gl);
  }
View Full Code Here

    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();

  @Override
View Full Code Here

    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);
    for (int i = 0; i < vertexCount; i++) {
      getWorldToScreenToOut(vertices[i], trans);
View Full Code Here

    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();

  @Override
View Full Code Here

    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();
  private final Vec2 temp2 = new Vec2();
View Full Code Here

    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

        gl.glBegin(GL2.GL_QUADS);
        gl.glTexCoord2f(texMinU, texMinV); gl.glVertex3f(mapMinX,mapMinY, mapZ);
        gl.glTexCoord2f(texMaxU, texMinV); gl.glVertex3f(mapMaxX,mapMinY, mapZ);
        gl.glTexCoord2f(texMaxU, texMaxV); gl.glVertex3f(mapMaxX,mapMaxY, mapZ);
        gl.glTexCoord2f(texMinU, texMaxV); gl.glVertex3f(mapMinX,mapMaxY, mapZ);
        gl.glEnd();

        // Restore matrices
        gl.glPopMatrix();
        gl.glMatrixMode(GL2.GL_MODELVIEW);
        gl.glPopMatrix();
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.