Examples of gluPerspective()


Examples of javax.media.opengl.glu.GLU.gluPerspective()

                    gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_ACCUM_BUFFER_BIT
                            | GL.GL_STENCIL_BUFFER_BIT);
                    gl.glMatrixMode(GL.GL_PROJECTION);
                    gl.glLoadIdentity();
                    GLU glu = new GLU();
                    glu.gluPerspective(vport.getFOV(), vport.getAspect(), vport
                            .getMinZ(), vport.getMaxZ());
                    glu.gluLookAt(vport.getViewWorldX(), vport.getViewWorldY(),
                            -vport.getZ(), vport.getViewWorldX(), vport
                                    .getViewWorldY(), 0, 0, -1, 0);
                    if (res != null) {
View Full Code Here

Examples of javax.media.opengl.glu.GLU.gluPerspective()

        }
        final float h = (float) width / (float) height;
        gl.glViewport(0, 0, width, height);
        gl.glMatrixMode(GL.GL_PROJECTION);
        gl.glLoadIdentity();
        glu.gluPerspective(45.0f, h, 1.0, 20.0);
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glLoadIdentity();
    }

    public void display(GLAutoDrawable drawable) {
View Full Code Here

Examples of javax.media.opengl.glu.GLU.gluPerspective()

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