Examples of gluOrtho2D()


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

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

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

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

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

     
      glMatrixMode.invoke(gl, GL2.GL_PROJECTION);
      glLoadIdentity.invoke(gl);
     
      GLU glu = new GLU();
      glu.gluOrtho2D(0.0f, width, 0.0, height);
     
      glMatrixMode.invoke(gl, GL2.GL_MODELVIEW);
      glLoadIdentity.invoke(gl);
     
      gl.glViewport(0, 0, width, height);
View Full Code Here

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

        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, width, 0.0f, height );

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

        gl2.glViewport( 0, 0, width, height );
View Full Code Here

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

      gl.glTexEnvf(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);

      gl.glMatrixMode(GL2.GL_PROJECTION);
      gl.glLoadIdentity();
      GLU glu = new GLU();
      glu.gluOrtho2D(0, drawable.getWidth(), drawable.getHeight(), 0);
      gl.glMatrixMode(GL2.GL_MODELVIEW);
      gl.glLoadIdentity();

      // reset base color
      float[] baseColorArray = new float[]{1,1,1,1};
View Full Code Here

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

      gl.glLoadIdentity();
     
      GLU glu = new GLU();
      float factorX = (float)delegate.getContext().getGLDrawable().getWidth() / (float)image.getWidth();
      float factorY = (float)delegate.getContext().getGLDrawable().getHeight() / (float)image.getHeight();
      glu.gluOrtho2D(0, view.getWidth() * factorX, 0, view.getHeight() * factorY);
      gl.glMatrixMode(GL.GL_MODELVIEW);
  }

  public void clear() {
    delegate.clear();
View Full Code Here

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

    GL gl = delegate.getGL();
      gl.glMatrixMode(GL.GL_PROJECTION);
      gl.glLoadIdentity();
     
      GLU glu = new GLU();
      glu.gluOrtho2D(-view.getWidth() / 2, view.getWidth() / 2, -view.getHeight() / 2, view.getHeight() / 2);
      gl.glMatrixMode(GL.GL_MODELVIEW);
  }
 
  public void viewSizeChanged() {
    initGLViewPort();
View Full Code Here

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

      gl.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_MODULATE);

      gl.glMatrixMode(GL.GL_PROJECTION);
      gl.glLoadIdentity();
      GLU glu = new GLU();
      glu.gluOrtho2D(0, drawable.getWidth(), drawable.getHeight(), 0);
      gl.glMatrixMode(GL.GL_MODELVIEW);
      gl.glLoadIdentity();

      // reset base color
      float[] baseColorArray = new float[]{1,1,1,1};
View Full Code Here

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

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

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

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

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

      gl.glLoadIdentity();
     
      GLU glu = new GLU();
      float factorX = (float)delegate.getContext().getGLDrawable().getWidth() / (float)image.getWidth();
      float factorY = (float)delegate.getContext().getGLDrawable().getHeight() / (float)image.getHeight();
      glu.gluOrtho2D(0, view.getWidth() * factorX, 0, view.getHeight() * factorY);
      gl.glMatrixMode(GL2.GL_MODELVIEW);
  }

  public void clear() {
    delegate.clear();
View Full Code Here

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

    GL2 gl = delegate.getGL();
      gl.glMatrixMode(GL2.GL_PROJECTION);
      gl.glLoadIdentity();
     
      GLU glu = new GLU();
      glu.gluOrtho2D(-view.getWidth() / 2, view.getWidth() / 2, -view.getHeight() / 2, view.getHeight() / 2);
      gl.glMatrixMode(GL2.GL_MODELVIEW);
  }
 
  public void viewSizeChanged() {
    initGLViewPort();
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.