Examples of glLoadIdentity()


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

  public void display(GLAutoDrawable gla) {
    long t0 = System.currentTimeMillis();
    GL gl = gla.getGL();
    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.gluPerspective(_viewPort.getFOV(),_viewPort.getAspect(),_viewPort.getMinZ(),_viewPort.getMaxZ());
    _glu.gluLookAt( _viewPort.getViewWorldX(), _viewPort.getViewWorldY(),  -_viewPort.getZ(),
            _viewPort.getViewWorldX(), _viewPort.getViewWorldY()0,
             0, -10);
    if(_res!=null) {
View Full Code Here

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

    GL gl = drawable.getGL();
    gl.glClearColor(1.0f, 1.0f,1.0f, 1.0f);
    gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT | GL.GL_STENCIL_BUFFER_BIT);
    gl.glMatrixMode(GL.GL_MODELVIEW);
   
    gl.glLoadIdentity();
   
    // Set camera transform
    glu.gluLookAt(cameraFrom.x, cameraFrom.y, cameraFrom.z,
        cameraTo.x, cameraTo.y, cameraTo.z,
        0, 1, 0);
View Full Code Here

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

    }
   
    //draw shadows
   
   
    gl.glLoadIdentity();

   
    gl.glDisable(GL.GL_LIGHTING);
    // Set camera transform
    glu.gluLookAt(cameraFrom.x, cameraFrom.y, cameraFrom.z,
View Full Code Here

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

  @Override
  public void reshape(GLAutoDrawable drawable ,int x,int y, int w, int h) {
    // Setup wide screen view port
    GL gl = drawable.getGL();
    gl.glMatrixMode(GL.GL_PROJECTION);
    gl.glLoadIdentity();
    gl.glFrustum (-1.77777*zoom, 1.777777*zoom, -1.0*zoom, 1.0*zoom, 4.0, 100.0);  
    this.height = h; this.width = w;
    this.drawHeight = (int)((double)width/1.77777);
    gl.glViewport (0, (int)((height-drawHeight)/2.0), (int)width, (int)drawHeight);
    //double[] proj = new double[16];
View Full Code Here

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

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

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

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

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

        // Store enabled state and disable lighting, texture mapping and the depth buffer
        gl.glPushAttrib(GL.GL_ENABLE_BIT);
View Full Code Here

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

            height = 1;
        }
        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();
    }
View Full Code Here

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

        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) {
        GL gl = drawable.getGL();
View Full Code Here

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

        GL gl = drawable.getGL();

        // Clear the drawing area
        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
View Full Code Here

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

        if (height <= 0) // avoid a divide by zero error!
            height = 1;
        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, 1f, 100.0);
       
        //gl.glOrtho(-100.0f, 100.0f, -100.0f, 100.0f, -500.0f, 500.0f);     
        //gl.glScalef(20.0f, 20.0f, 20.0f);
         
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.