Examples of glHint()


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

            else
                gl.glLineWidth(lineWidth.floatValue());

            if (!dc.isPickingMode())
            {
                gl.glHint(GL.GL_LINE_SMOOTH_HINT, this.getActiveAttributes().getAntiAliasHint());
                gl.glEnable(GL.GL_LINE_SMOOTH);
            }
        }
    }
View Full Code Here

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

    // Setup GL
    GL gl = drawable.getGL();
    gl.glEnable (GL.GL_DEPTH_TEST);
    gl.glEnable(GL.GL_CULL_FACE);
    gl.glEnable(GL.GL_LINE_SMOOTH);
      gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
    gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
    //enable vsync
    gl.setSwapInterval(1);
   
    // init some lighting
View Full Code Here

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

        gl.glClearColor(0, 0, 0, 1);    // Black Background
        gl.glClearDepth(1.0f);                      // Depth Buffer Setup
        gl.glEnable(GL.GL_DEPTH_TEST);              // Enables Depth Testing
        gl.glDepthFunc(GL.GL_LEQUAL);                // The Type Of Depth Testing To Do
       
        gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST)// Really Nice Perspective Calculations
        gl.glEnable(GL.GL_TEXTURE_2D);
        //gl.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);

    gl.glEnable(GL.GL_BLEND);
    gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); // Korrektes Blending
View Full Code Here

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

    gl.glClearDepth(1.0);                  //Enable Clearing of the Depth buffer
    gl.glDepthFunc(GL.GL_LEQUAL);              //Type of Depth test
    gl.glEnable(GL.GL_DEPTH_TEST);              //Enable Depth Testing

    gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);

    // light
      gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, lightAmbient, 0);
      //Diffuse light component
      gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, lightDiffuse, 0);
View Full Code Here

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

            if (!lineRecord.isValid() || !lineRecord.smoothed) {
                gl.glEnable(GL.GL_LINE_SMOOTH);
                lineRecord.smoothed = true;
            }
            if (!lineRecord.isValid() || lineRecord.smoothHint != GL.GL_NICEST) {
                gl.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);
                lineRecord.smoothHint = GL.GL_NICEST;
            }
        } else if (!lineRecord.isValid() || lineRecord.smoothed) {
            gl.glDisable(GL.GL_LINE_SMOOTH);
            lineRecord.smoothed = false;
View Full Code Here

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

            gl.getGL2GL3().glPointSize(pointSize);
        }
        if (antialiased) {
            if (gl.isGL2ES1()) {
                gl.glEnable(GL2ES1.GL_POINT_SMOOTH);
                gl.glHint(GL2ES1.GL_POINT_SMOOTH_HINT, GL.GL_NICEST);
            }
        }

        if (isSprite && context.getCapabilities().isPointSpritesSupported()) {
            if (gl.isGL2ES1()) {
View Full Code Here

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

            TextureRecord texRecord;

            final int glHint = JoglTextureUtil.getPerspHint(state.getCorrectionType());
            if (!record.isValid() || record.hint != glHint) {
                // set up correction mode
                gl.glHint(GL2ES1.GL_PERSPECTIVE_CORRECTION_HINT, glHint);
                record.hint = glHint;
            }

            // loop through all available texture units...
            for (int i = 0; i < caps.getNumberOfTotalTextureUnits(); i++) {
View Full Code Here

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

                glHint = GL.GL_NICEST;
                break;
        }

        if (!record.isValid() || record.fogHint != glHint) {
            gl.glHint(GL2ES1.GL_FOG_HINT, glHint);
            record.fogHint = glHint;
        }
    }
}
View Full Code Here

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

  }
  private void applyPolygonAntialiasing() {
    GL gl = drawable.getGL();
    // !! Enabling this causes problems on most GFX Cards (though not on my FireGL)
    gl.glDisable(GL.GL_POLYGON_SMOOTH);
    gl.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST);
  }
  private void applyPointAntialiasing() {
    GL gl = drawable.getGL();
    gl.glEnable(GL.GL_POINT_SMOOTH);
    gl.glHint(GL.GL_POINT_SMOOTH_HINT, GL.GL_NICEST);
View Full Code Here

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

    gl.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST);
  }
  private void applyPointAntialiasing() {
    GL gl = drawable.getGL();
    gl.glEnable(GL.GL_POINT_SMOOTH);
    gl.glHint(GL.GL_POINT_SMOOTH_HINT, GL.GL_NICEST);
  }
 
  public void setLineAntialiasing(boolean enabled) {
    endPrimitivesKeepImage();
    lineAntialiasing = enabled;
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.