Examples of glTranslatef()


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

        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
        // Reset the current matrix to the "identity"
        gl.glLoadIdentity();

        // Move the "drawing cursor" around
        gl.glTranslatef(-1.5f, 0.0f, -6.0f);

        // Drawing Using Triangles
        gl.glBegin(GL.GL_TRIANGLES);
            gl.glColor3f(1.0f, 0.0f, 0.0f);    // Set the current drawing color to red
            gl.glVertex3f(0.0f, 1.0f, 0.0f);   // Top
View Full Code Here

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

            gl.glVertex3f(1.0f, -1.0f, 0.0f)// Bottom Right
        // Finished Drawing The Triangle
        gl.glEnd();

        // Move the "drawing cursor" to another position
        gl.glTranslatef(3.0f, 0.0f, 0.0f);
        // Draw A Quad
        gl.glBegin(GL.GL_QUADS);
            gl.glColor3f(0.5f, 0.5f, 1.0f);    // Set the current drawing color to light blue
            gl.glVertex3f(-1.0f, 1.0f, 0.0f)// Top Left
            gl.glVertex3f(1.0f, 1.0f, 0.0f);   // Top Right
View Full Code Here

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

   
    GL gl = arg0.getGL();
   
    gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)//Clear the buffers
    gl.glLoadIdentity();                      //Reset the view
    gl.glTranslatef(0.0f, -2.0f, zOffset);              //Translate the scene backwards   
   
    gl.glPolygonMode(GL.GL_FRONT_AND_BACK, render_mode);
    gl.glCullFace(GL.GL_FRONT);
    gl.glEnable(GL.GL_CULL_FACE);/**/
   
 
View Full Code Here

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

    gl.glMatrixMode(GL.GL_PROJECTION);
    gl.glLoadIdentity();
    gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
    gl.glMatrixMode(GL.GL_MODELVIEW);
    gl.glLoadIdentity();
    gl.glTranslatef(0.0f, 0.0f, -20.0f);
  }

  @Override
  public void mouseClicked(MouseEvent mouseevent) {
    // TODO Auto-generated method stub
View Full Code Here

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

//    GL gl = pgl.beginGL();
    GL gl = pgl.gl;
   
    gl.glPushMatrix();
    gl.glScalef(1, -1, 1);
    gl.glTranslatef(p.width/2, p.height/2, 0);
    gl.glScalef((float)map.sc, (float)map.sc, 1);
    gl.glTranslatef((float)map.tx, (float)map.ty, 0);
    gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, model);
    gl.glPopMatrix();
//    pgl.endGL();
View Full Code Here

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

   
    gl.glPushMatrix();
    gl.glScalef(1, -1, 1);
    gl.glTranslatef(p.width/2, p.height/2, 0);
    gl.glScalef((float)map.sc, (float)map.sc, 1);
    gl.glTranslatef((float)map.tx, (float)map.ty, 0);
    gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, model);
    gl.glPopMatrix();
//    pgl.endGL();
   
    try {
View Full Code Here

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

//    */
   
    if (this.isUseDirectGL()){
      GL gl = Tools3D.beginGL(pa);
      if (totalScrollTextX != 0.0f && totalScrollTextY != 0.0f){
        gl.glTranslatef(totalScrollTextX, totalScrollTextY + font.getFontMaxAscent(), 0);
      }else{
        gl.glTranslatef(0, font.getFontMaxAscent(), 0);
      }
     
      /*
 
View Full Code Here

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

    if (this.isUseDirectGL()){
      GL gl = Tools3D.beginGL(pa);
      if (totalScrollTextX != 0.0f && totalScrollTextY != 0.0f){
        gl.glTranslatef(totalScrollTextX, totalScrollTextY + font.getFontMaxAscent(), 0);
      }else{
        gl.glTranslatef(0, font.getFontMaxAscent(), 0);
      }
     
      /*
      //Disabled so that no new list is created everytime something changes
      if (!enableCaret && useDisplayList && this.contentDisplayListDirty){
View Full Code Here

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

        gl.glLoadIdentity();

        Double labelScale = this.getActiveAttributes().getLabelScale();
        if (labelScale != null)
        {
            gl.glTranslatef(x, y, 0); // Assumes matrix mode is MODELVIEW
            gl.glScaled(labelScale, labelScale, 1);
            gl.glTranslatef(-x, -y, 0);
        }

        // Do not depth buffer the label. (Placemarks beyond the horizon are culled above.)
View Full Code Here

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

        Double labelScale = this.getActiveAttributes().getLabelScale();
        if (labelScale != null)
        {
            gl.glTranslatef(x, y, 0); // Assumes matrix mode is MODELVIEW
            gl.glScaled(labelScale, labelScale, 1);
            gl.glTranslatef(-x, -y, 0);
        }

        // Do not depth buffer the label. (Placemarks beyond the horizon are culled above.)
        gl.glDisable(GL.GL_DEPTH_TEST);
        gl.glDepthMask(false);
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.