Examples of glMatrixMode()


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

    public void display(GLAutoDrawable glDrawable) {
        GL gl = glDrawable.getGL();

        // Store old matrices
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glPushMatrix();
        gl.glLoadIdentity();
        gl.glMatrixMode(GL.GL_PROJECTION);
        gl.glPushMatrix();
        gl.glLoadIdentity();
View Full Code Here

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

        // Store old matrices
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glPushMatrix();
        gl.glLoadIdentity();
        gl.glMatrixMode(GL.GL_PROJECTION);
        gl.glPushMatrix();
        gl.glLoadIdentity();

        gl.glViewport(0, 0, glDrawable.getWidth(), glDrawable.getHeight());
View Full Code Here

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

        // Restore enabled state
        gl.glPopAttrib();

        // Restore old matrices
        gl.glPopMatrix();
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glPopMatrix();
    }

    public void displayChanged(GLAutoDrawable glDrawable, boolean b, boolean b1) {
    }
View Full Code Here

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

    if(height <= 0)
      height = 1;

    gl.glViewport(0, 0, width, height);

    gl.glMatrixMode(GL.GL_PROJECTION);                //Select the Projectionmatrix
    gl.glLoadIdentity();                    //Reset the current matrix
    glu.gluPerspective(45.0f, width / height, 0.1f, 1000.0f)//set the Viewing Volume

    gl.glMatrixMode(GL.GL_MODELVIEW);        //select The Modelview Matrix
    gl.glLoadIdentity();              //set the ModelView matrix to identity
View Full Code Here

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

    gl.glMatrixMode(GL.GL_PROJECTION);                //Select the Projectionmatrix
    gl.glLoadIdentity();                    //Reset the current matrix
    glu.gluPerspective(45.0f, width / height, 0.1f, 1000.0f)//set the Viewing Volume

    gl.glMatrixMode(GL.GL_MODELVIEW);        //select The Modelview Matrix
    gl.glLoadIdentity();              //set the ModelView matrix to identity
  }

  public void init(GLAutoDrawable glDrawable) {
     renderer = new TextRenderer(
View Full Code Here

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

    // TODO Auto-generated method stub
    GL gl = drawable.getGL();

    float h = (float) height / (float) width;

    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);
View Full Code Here

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

    float h = (float) height / (float) width;

    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
View Full Code Here

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

        x += offset.x;
        y += offset.y;

        GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility.

        gl.glMatrixMode(GL2.GL_MODELVIEW);
        gl.glLoadIdentity();

        Double labelScale = this.getActiveAttributes().getLabelScale();
        if (labelScale != null)
        {
View Full Code Here

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

  @Override
  public void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3, int arg4) {
    GL2 gl2 = arg0.getGL().getGL2();

    gl2.glMatrixMode(GL2.GL_PROJECTION);
    gl2.glLoadIdentity();

    // coordinate system origin at lower left with width and height same as the window
    GLU glu = new GLU();
    glu.gluOrtho2D(0.0f, getWidth(), 0.0f, getHeight());
View Full Code Here

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

    // coordinate system origin at lower left with width and height same as the window
    GLU glu = new GLU();
    glu.gluOrtho2D(0.0f, getWidth(), 0.0f, getHeight());

    gl2.glMatrixMode(GL2.GL_MODELVIEW);
    gl2.glLoadIdentity();

    gl2.glViewport(0, 0, getWidth(), getHeight());

    controller.updateExtents(arg3 / 2, arg4 / 2);
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.