Examples of glBlendFunc()


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

//      */
      //////////////////////////////////////
      gl.glDepthMask(true);
     
        gl.glEnable (GL.GL_BLEND);
        gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      //////////////////////
      // Draw fill    //
        //////////////////////
//        /*
      gl.glColorMask(true, true, true, true);
View Full Code Here

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

       gl.glEnd ();

       //Draw aliased off-pixels to real
        gl.glColorMask (true, true, true, true);
        gl.glEnable (GL.GL_BLEND);
        gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);

//      /*       
        gl.glStencilFunc (GL.GL_EQUAL, 0x00, 0x01);
        gl.glStencilOp (GL.GL_KEEP, GL.GL_KEEP, GL.GL_KEEP);
       
View Full Code Here

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

//       */
//      GLStencilUtil.getInstance().endClipping(gl, this);
    fbo.stopRenderToTexture();
     
    if (GLFboStack.getInstance().peekFBO() == 0)
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); //Restore default blend mode //FIXME TEST -> neccessary?
   
    //FIXME NOT NEEDED!? sufficient to call glGenerateMipmapEXT at texture creation!?
    //TODO I actually think its necessary to call each time after rendering to the texture! But only for POT dimensions!?
    /*
    GLTexture tex = (GLTexture) this.getTexture();
View Full Code Here

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

        // the button depressed mask colors with the button colors.
        if (this.getPressedMaskTexture() == texture)
        {
            GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility.
            gl.glEnable(GL.GL_BLEND);
            gl.glBlendFunc(GL.GL_ZERO, GL.GL_SRC_COLOR);
            gl.glColor4f(1f, 1f, 1f, 1f);
        }
    }

    @SuppressWarnings({"UnusedDeclaration"})
View Full Code Here

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

        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);
        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);

        gl.glTexEnvf(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
        gl.glEnable(GL.GL_BLEND);
        gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);

        gl.glEnable(GL.GL_TEXTURE_2D);

        // loaded identity modelview and projection matrix
        gl.glMatrixMode(GL2.GL_PROJECTION);
View Full Code Here

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

                ((((geometryType & RenderMolecule.POINT) != 0) ||
                (polygonMode == PolygonAttributes.POLYGON_POINT))
                && pointAA)) {
            gl.glEnable(GL.GL_BLEND);
            // valid range of blendFunction 0..3 is already verified in shared code.
            gl.glBlendFunc(blendFunctionTable[srcBlendFunction], blendFunctionTable[dstBlendFunction]);
        } else {
            gl.glDisable(GL.GL_BLEND);
        }
    }
View Full Code Here

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

    gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL2.GL_NICEST)// Really Nice Perspective Calculations
    gl.setSwapInterval(1);

    // debut texture
    gl.glEnable(GL2.GL_BLEND);
    gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA);

    gl.glEnable(GL2.GL_TEXTURE_2D);

    //chargement des fichiers
    Forme.init_texture(gl);
View Full Code Here

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

        int width = config.getWidth();
        int height = config.getHeight();
        float[] mu = config.getMu();

  gl.glEnable(GL_BLEND);
            gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
            int baseMu1 = width - MU_RECT_SIZE - 2;
            int baseMu2 = 1;
            drawJuliaSlice(gl, baseMu1, baseMu2, mu[0], mu[1]);
            int baseMu3 = width - MU_RECT_SIZE - 2;
            int baseMu4 = MU_RECT_SIZE + 2;
View Full Code Here

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

        int width = config.getWidth();
        int height = config.getHeight();
        float[] mu = config.getMu();

  gl.glEnable(GL_BLEND);
            gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
            int baseMu1 = width - MU_RECT_SIZE - 2;
            int baseMu2 = 1;
            drawJuliaSlice(gl, baseMu1, baseMu2, mu[0], mu[1]);
            int baseMu3 = width - MU_RECT_SIZE - 2;
            int baseMu4 = MU_RECT_SIZE + 2;
View Full Code Here

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

    GL2 gl = drawable.getGL().getGL2();
    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
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.