Package javax.media.opengl

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


    final GL2 gl = (GL2) drawable.getGL();
    gl.glViewport(0, 0, width, height);
    gl.glMatrixMode(GL2.GL_PROJECTION);
    gl.glLoadIdentity();
    this.glu.gluOrtho2D(0, width, height, 0);
    gl.glMatrixMode(GL2.GL_MODELVIEW);
  }

  /** Runs the animator of the canvas. */
  public void run() {
    this.animator.start();
View Full Code Here


        // Set the view port (display area) to cover the entire window
        gl.glViewport(0, 0, width, height);

        // Setup perspective projection, with aspect ratio matches viewport
        gl.glMatrixMode(GL_PROJECTION); // Choose projection matrix
        gl.glLoadIdentity();            // reset projection matrix
        glu.gluPerspective(45.0, aspect, 0.1, 100.0); // fovy, aspect, zNear, zFar

        // Enable the model-view transform
        gl.glMatrixMode(GL_MODELVIEW);
View Full Code Here

        gl.glMatrixMode(GL_PROJECTION); // Choose projection matrix
        gl.glLoadIdentity();            // reset projection matrix
        glu.gluPerspective(45.0, aspect, 0.1, 100.0); // fovy, aspect, zNear, zFar

        // Enable the model-view transform
        gl.glMatrixMode(GL_MODELVIEW);
        gl.glLoadIdentity();            // reset
    
    }

    /**
 
View Full Code Here

        // Set the view port (display area) to cover the entire window
        gl.glViewport(0, 0, width, height);

        // Setup perspective projection, with aspect ratio matches viewport
        gl.glMatrixMode(GL_PROJECTION); // Choose projection matrix
        gl.glLoadIdentity();            // reset projection matrix
        glu.gluPerspective(45.0, aspect, 0.1, 100.0); // fovy, aspect, zNear, zFar

        // Enable the model-view transform
        gl.glMatrixMode(GL_MODELVIEW);
View Full Code Here

        gl.glMatrixMode(GL_PROJECTION); // Choose projection matrix
        gl.glLoadIdentity();            // reset projection matrix
        glu.gluPerspective(45.0, aspect, 0.1, 100.0); // fovy, aspect, zNear, zFar

        // Enable the model-view transform
        gl.glMatrixMode(GL_MODELVIEW);
        gl.glLoadIdentity();            // reset
    
    }

    /**
 
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.