Examples of GLU


Examples of javax.media.opengl.glu.GLU

      gl.glLoadIdentity();
   
    VectorXYZ pos = camera.getPos();
    VectorXYZ lookAt = camera.getLookAt();
    VectorXYZ up = camera.getUp();
    new GLU().gluLookAt(
        pos.x, pos.y, -pos.z,
        lookAt.x, lookAt.y, -lookAt.z,
        up.x, up.y, -up.z);
   
  }
View Full Code Here

Examples of javax.media.opengl.glu.GLU

          projection.getNearClippingDistance(),
          projection.getFarClippingDistance());
     
    } else { //perspective

      new GLU().gluPerspective(
          projection.getVertAngle(),
          projection.getAspectRatio(),
          projection.getNearClippingDistance(),
          projection.getFarClippingDistance());
     
View Full Code Here

Examples of javax.media.opengl.glu.GLU

   @Override
   public void init(GLAutoDrawable drawable)
   {
      GL2 gl = drawable.getGL().getGL2();      // get the OpenGL graphics context
      this._glu_ = new GLU();                         // get GL Utilities
      gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // set background (clear) color
      gl.glClearDepth(1.0f);      // set clear depth value to farthest
      gl.glEnable(GL.GL_DEPTH_TEST); // enables depth testing
      gl.glDepthFunc(GL.GL_LEQUAL)// the type of depth test to do
      gl.glHint(GL2ES1.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST); // best perspective correction
View Full Code Here

Examples of javax.media.opengl.glu.GLU

                    GL gl = context.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 glu = new GLU();
                    glu.gluPerspective(vport.getFOV(), vport.getAspect(), vport
                            .getMinZ(), vport.getMaxZ());
                    glu.gluLookAt(vport.getViewWorldX(), vport.getViewWorldY(),
                            -vport.getZ(), vport.getViewWorldX(), vport
                                    .getViewWorldY(), 0, 0, -1, 0);
                    if (res != null) {
                        for (AbstractLayer l : world.getLayers())
                            l.paint(gl);
View Full Code Here

Examples of javax.media.opengl.glu.GLU

    if (rawGL.isGL2()) {
      gl = (GL2) rawGL;
    } else {
      gl = null;
    }
    glu = new GLU();

    canvas.addControlListener(new ControlAdapter() {
      @Override
      public void controlResized(ControlEvent e) {
        resizeScene();
View Full Code Here

Examples of javax.media.opengl.glu.GLU

    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

  // "render" feito logo ap�s a inicializa��o do contexto OpenGL.
  public void init(GLAutoDrawable drawable) {
    System.out.println(" --- Exe05 ---");
    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(" --- Exe06 ---");
    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(" --- Exe03 ---");
    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

  }

  public void init(GLAutoDrawable drawable) {
    glDrawable = drawable;
    gl = drawable.getGL();
    glu = new GLU();
    glut = new GLUT();
    glDrawable.setGL(new DebugGL(gl));
   
    gl.glEnable(GL.GL_CULL_FACE);
    gl.glEnable(GL.GL_DEPTH_TEST);
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.