Package javax.media.opengl

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


    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);
  }
 
  public void setLineAntialiasing(boolean enabled) {
    endPrimitivesKeepImage();
View Full Code Here


    return lineAntialiasing;
  }
  private void applyLineAntialiasing() {
    GL gl = drawable.getGL();
    if(lineAntialiasing) {
      gl.glEnable(GL.GL_LINE_SMOOTH);
    } else {
      gl.glDisable(GL.GL_LINE_SMOOTH);
    }
    gl.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);
}
View Full Code Here

    gl.glDisable(GL.GL_DEPTH_TEST);
   
      gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
     
      // Lighting, Coloring
      gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_BLEND);
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      gl.glEnable(GL.GL_COLOR_MATERIAL);
      gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
      gl.glShadeModel(GL.GL_SMOOTH);
View Full Code Here

   
      gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
     
      // Lighting, Coloring
      gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_BLEND);
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      gl.glEnable(GL.GL_COLOR_MATERIAL);
      gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
      gl.glShadeModel(GL.GL_SMOOTH);
View Full Code Here

     
      // Lighting, Coloring
      gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_BLEND);
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      gl.glEnable(GL.GL_COLOR_MATERIAL);
      gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
      gl.glShadeModel(GL.GL_SMOOTH);

    // Texturing
      gl.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_MODULATE);
View Full Code Here

    gl.glDisable(GL.GL_DEPTH_TEST);
   
      gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
     
      // Lighting, Coloring
      gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_BLEND);
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      gl.glEnable(GL.GL_COLOR_MATERIAL);
      gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
      gl.glShadeModel(GL.GL_SMOOTH);
View Full Code Here

   
      gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
     
      // Lighting, Coloring
      gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_BLEND);
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      gl.glEnable(GL.GL_COLOR_MATERIAL);
      gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
      gl.glShadeModel(GL.GL_SMOOTH);
View Full Code Here

     
      // Lighting, Coloring
      gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_BLEND);
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      gl.glEnable(GL.GL_COLOR_MATERIAL);
      gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
      gl.glShadeModel(GL.GL_SMOOTH);

      // Anti-Aliasing (Polygon antialiasing causes problems on most graphics cards, don't use it!)
//    FloatBuffer buf = FloatBuffer.allocate(2);
View Full Code Here

    );

    gl.glShadeModel(GL.GL_SMOOTH);                     // Enable Smooth Shading
    gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);          // 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_FASTEST);

    // Lighting
View Full Code Here

    light2.specular_$eq(new RGBA(0.0f, 0.0f, 0.0f, 0.0f));
    lightManager.addLight(light2);

    // This is necessary for properly rendering scaled objects. Without this, small objects
    // may look too bright, and large objects will look flat.
    gl.glEnable(GL.GL_NORMALIZE);

    // Coloring

    gl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);
    gl.glEnable(GL.GL_COLOR_MATERIAL);
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.