Examples of GLU


Examples of javax.media.opengl.glu.GLU

  @Override
  public void init(GLAutoDrawable drawable) {
    glDrawable = drawable;
    gl = drawable.getGL();
    glu = new GLU();
    glut = new GLUT();
    glDrawable.setGL(new DebugGL(gl));
   
    this.heightMapDl = this.terreno.createHeightMapDl(gl);
  }
View Full Code Here

Examples of javax.media.opengl.glu.GLU

  // "render" feito logo ap�s a inicializa��o do contexto OpenGL.
  public void init(GLAutoDrawable drawable) {
    glDrawable = drawable;
    gl = drawable.getGL();
    glu = new GLU();
    glut = new GLUT();
    glDrawable.setGL(new DebugGL(gl));
    controller = new Trab03Controller();
    renderer = new Renderer();
   
View Full Code Here

Examples of javax.media.opengl.glu.GLU

  // "render" feito logo ap�s a inicializa��o do contexto OpenGL.
  public void init(GLAutoDrawable drawable) {
    System.out.println(" --- Exe01 ---");
    glDrawable = drawable;
    gl = drawable.getGL();
    glu = new GLU();
    glut = new GLUT();
    glDrawable.setGL(new DebugGL(gl));

    gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
  }
View Full Code Here

Examples of javax.media.opengl.glu.GLU

  // "render" feito logo ap�s a inicializa��o do contexto OpenGL.
  public void init(GLAutoDrawable drawable) {
    System.out.println(" --- Exe02 ---");
    glDrawable = drawable;
    gl = drawable.getGL();
    glu = new GLU();
    glut = new GLUT();
    glDrawable.setGL(new DebugGL(gl));

    gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
  }
View Full Code Here

Examples of javax.media.opengl.glu.GLU

  // "render" feito logo ap�s a inicializa��o do contexto OpenGL.
  public void init(GLAutoDrawable drawable) {
    System.out.println(" --- Exe04 ---");
    glDrawable = drawable;
    gl = drawable.getGL();
    glu = new GLU();
    glut = new GLUT();
    glDrawable.setGL(new DebugGL(gl));

    gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
  }
View Full Code Here

Examples of javax.media.opengl.glu.GLU

        gl.glShadeModel(GL.GL_SMOOTH); // try setting this to GL_FLAT and see what happens.
    }

    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
        GL gl = drawable.getGL();
        GLU glu = new GLU();

        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, 1.0, 20.0);
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glLoadIdentity();
    }
View Full Code Here

Examples of javax.media.opengl.glu.GLU

  // "render" feito logo ap�s a inicializa��o do contexto OpenGL.
  public void init(GLAutoDrawable drawable) {
    System.out.println(" --- Exe00 ---");
    glDrawable = drawable;
    gl = drawable.getGL();
    glu = new GLU();
    glDrawable.setGL(new DebugGL(gl));

    gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
  }
View Full Code Here

Examples of javax.media.opengl.glu.GLU

 

 
  public void reshape(GLAutoDrawable glDrawable, int x, int y, int width, int height) {
    final GL gl = glDrawable.getGL();
    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

    gl.glMatrixMode(GL.GL_MODELVIEW);        //select The Modelview Matrix
    gl.glLoadIdentity();              //set the ModelView matrix to identity
  }
View Full Code Here

Examples of javax.media.opengl.glu.GLU

      Method glLoadIdentity = type.getMethod("glLoadIdentity");
     
      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

    protected static void setup( GL2 gl2, int width, int height ) {
        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
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.