Examples of glMatrixMode()


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

        gl.glMatrixMode(GL2.GL_PROJECTION);
        gl.glLoadIdentity();
        gl.glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
        gl.glMatrixMode(GL2.GL_MODELVIEW);
        gl.glLoadIdentity();
        gl.glMatrixMode(GL.GL_TEXTURE);
        gl.glPushMatrix();
        gl.glLoadIdentity();

        gl.glBegin(GL2.GL_QUADS);
        gl.glTexCoord2f(texMinU, texMinV); gl.glVertex2f(mapMinX,mapMinY);
View Full Code Here

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

        gl.glEnd();

        // Restore texture Matrix transform
        gl.glPopMatrix();

        gl.glMatrixMode(GL2.GL_MODELVIEW);
        // Restore attributes
        gl.glPopAttrib();

    }
View Full Code Here

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

        gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT,
                (perspCorrectionMode == TextureAttributes.NICEST) ? GL.GL_NICEST : GL.GL_FASTEST);

        // set OGL texture matrix
        gl.glPushAttrib(GL2.GL_TRANSFORM_BIT);
        gl.glMatrixMode(GL.GL_TEXTURE);

        if (isIdentity) {
            gl.glLoadIdentity();
        } else if (gl.isExtensionAvailable("GL_VERSION_1_3")) {
            gl.glLoadTransposeMatrixd(transform, 0);
View Full Code Here

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

                        gl.glTexGenfv(GL2.GL_Q, GL2.GL_OBJECT_PLANE, planeQ, 0);
                    }
                    break;
                case TexCoordGeneration.EYE_LINEAR:

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

                    if (gl.isExtensionAvailable("GL_VERSION_1_3")) {
                        gl.glLoadTransposeMatrixd(vworldToEc, 0);
                    } else {
View Full Code Here

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

    //actualise la camera
    this.repaint(gl);

    gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);

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

    // dessine les cube
    this.render(gl);
View Full Code Here

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

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

    // actualise la camera
    repaint(gl);

    gl.glMatrixMode(GL2.GL_MODELVIEW);
    gl.glLoadIdentity();
   
  }// fin reshape

  /* ******** DISPOSE ******** */
 
View Full Code Here

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

    //actualise la camera
    this.repaint(gl);

    gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);

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

    // dessine les cube
    this.render(gl);
View Full Code Here

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

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

    // actualise la camera
    repaint(gl);

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

  /* ******** DISPOSE ******** */

 
View Full Code Here

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

  public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
    GL2 gl = drawable.getGL().getGL2();

    float h = (float)height / (float)width;
           
    gl.glMatrixMode(GL2.GL_PROJECTION);

    System.err.println("GL_VENDOR: " + gl.glGetString(GL2.GL_VENDOR));
    System.err.println("GL_RENDERER: " + gl.glGetString(GL2.GL_RENDERER));
    System.err.println("GL_VERSION: " + gl.glGetString(GL2.GL_VERSION));
    gl.glLoadIdentity();
View Full Code Here

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

    System.err.println("GL_VENDOR: " + gl.glGetString(GL2.GL_VENDOR));
    System.err.println("GL_RENDERER: " + gl.glGetString(GL2.GL_RENDERER));
    System.err.println("GL_VERSION: " + gl.glGetString(GL2.GL_VERSION));
    gl.glLoadIdentity();
    gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
    gl.glMatrixMode(GL2.GL_MODELVIEW);
    gl.glLoadIdentity();
    gl.glTranslatef(0.0f, 0.0f, -40.0f);
  }

  public void dispose(GLAutoDrawable drawable) {
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.