Package javax.media.opengl

Examples of javax.media.opengl.GL2.glBlendFunc()


      gl.glBlendFunc(GL.GL_DST_COLOR, GL.GL_ZERO);
    } else if(drawingMode == DrawingMode.OVERWRITE) {
      if(isGlExtBlendSubtractSupported) {
        gl.glBlendEquation(GL.GL_FUNC_ADD);
      }
      gl.glBlendFunc(GL.GL_ONE, GL.GL_ZERO);
    } else if(drawingMode == DrawingMode.SUBTRACT) {
      // This uses an extension!!
      if(isGlExtBlendSubtractSupported) {
        gl.glBlendEquation(GL.GL_FUNC_REVERSE_SUBTRACT);
      } else {
View Full Code Here


      if(isGlExtBlendSubtractSupported) {
        gl.glBlendEquation(GL.GL_FUNC_REVERSE_SUBTRACT);
      } else {
        throw new UnsupportedOperationException("Subtract drawing mode is not supported.");
      }
      gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE);
    }
  }
 
  //  public void setPolygonAntialiasing(boolean enabled) {
  //  polygonAntialiasing = enabled;
View Full Code Here

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

    // Texturing
View Full Code Here

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

      // Anti-Aliasing (Polygon antialiasing causes problems on most graphics cards, don't use it!)
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.