Package javax.media.opengl

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


      gl.glDisable(GL.GL_DEPTH);

      gl.glDepthMask(false);
     
      gl.glEnable (GL.GL_BLEND);
      gl.glBlendFunc (GL.GL_SRC_ALPHA,
          GL.GL_ONE_MINUS_SRC_ALPHA);
      // draw markers
      for(Marker marker : markers) {
//        Point3D center = getGlmain3d().getSphere().getPoint(marker.point);
        Point3D center = marker.getPoint();
View Full Code Here


        context.makeCurrent();
        try {
            res.init();
            GL gl = context.getGL();
            gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
            gl.glClearColor(0.1f, 0.2f, 0.1f, 1);

            gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER,
                    GL.GL_NEAREST);
            gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER,
View Full Code Here

      e.printStackTrace();
      System.exit(1);
    }
   
    GL gl = drawable.getGL();
    gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
    gl.glClearColor(0.1f, 0.2f, 0.1f, 1);
   
    gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
    gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
   
View Full Code Here

    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
    gl.glEnable(GL.GL_LIGHTING);
View Full Code Here

    void setBlendFunc(Context ctx, int srcBlendFunction, int dstBlendFunction) {
        if (VERBOSE) System.err.println("JoglPipeline.setBlendFunc()");

        GL gl = context(ctx).getGL();
        gl.glEnable(GL.GL_BLEND);
        gl.glBlendFunc(blendFunctionTable[srcBlendFunction],
                blendFunctionTable[dstBlendFunction]);
    }

    // native method for setting fog enable flag
    @Override
View Full Code Here

                && lineAA) ||
                ((((geometryType & RenderMolecule.POINT) != 0) ||
                (polygonMode == PolygonAttributes.POLYGON_POINT))
                && pointAA)) {
            gl.glEnable(GL.GL_BLEND);
            gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
        } else {
            gl.glDisable(GL.GL_BLEND);
        }
        gl.glDisable(GL2.GL_POLYGON_STIPPLE);
    }
View Full Code Here

        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
   
   
    // Set up lighting
   
    if(LightEnabled){     
View Full Code Here

    GL gl = drawable.getGL();
    if(drawingMode == DrawingMode.ALPHA_BLEND) {
      if(isGlExtBlendSubtractSupported) {
        gl.glBlendEquation(GL.GL_FUNC_ADD);
      }
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
    } else if(drawingMode == DrawingMode.ADD) {
      if(isGlExtBlendSubtractSupported) {
        gl.glBlendEquation(GL.GL_FUNC_ADD);
      }
      gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE);
View Full Code Here

      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
    } else if(drawingMode == DrawingMode.ADD) {
      if(isGlExtBlendSubtractSupported) {
        gl.glBlendEquation(GL.GL_FUNC_ADD);
      }
      gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE);
    } else if(drawingMode == DrawingMode.ALPHA_ADD) {
      if(isGlExtBlendSubtractSupported) {
        gl.glBlendEquation(GL.GL_FUNC_ADD);
      }
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
View Full Code Here

      gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE);
    } else if(drawingMode == DrawingMode.ALPHA_ADD) {
      if(isGlExtBlendSubtractSupported) {
        gl.glBlendEquation(GL.GL_FUNC_ADD);
      }
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
    } else if(drawingMode == DrawingMode.MULTIPLY) {
      if(isGlExtBlendSubtractSupported) {
        gl.glBlendEquation(GL.GL_FUNC_ADD);
      }
      gl.glBlendFunc(GL.GL_DST_COLOR, GL.GL_ZERO);
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.