Package javax.media.opengl

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


    final GLU glu = new GLU();

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


      glu.gluOrtho2D(0.0f, width, 0.0, height);
     
      glMatrixMode.invoke(gl, GL2.GL_MODELVIEW);
      glLoadIdentity.invoke(gl);
     
      gl.glViewport(0, 0, width, height);
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
View Full Code Here

  }

  @Override
  public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
    GL gl = drawable.getGL();
    gl.glViewport(x, y, width, height);
    onReshape(drawable, x, y, width, height);
  }
 
  @Override
  public void display(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.