Examples of glColorMask()


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

        final ColorMaskStateRecord record = (ColorMaskStateRecord) context.getStateRecord(StateType.ColorMask);
        context.setCurrentState(StateType.ColorMask, state);

        if (state.isEnabled()) {
            if (!record.isValid() || !record.is(state.getRed(), state.getGreen(), state.getBlue(), state.getAlpha())) {
                gl.glColorMask(state.getRed(), state.getGreen(), state.getBlue(), state.getAlpha());
                record.set(state.getRed(), state.getGreen(), state.getBlue(), state.getAlpha());
            }
        } else if (!record.isValid() || !record.is(true, true, true, true)) {
            gl.glColorMask(true, true, true, true);
            record.set(true, true, true, true);
View Full Code Here

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

            if (!record.isValid() || !record.is(state.getRed(), state.getGreen(), state.getBlue(), state.getAlpha())) {
                gl.glColorMask(state.getRed(), state.getGreen(), state.getBlue(), state.getAlpha());
                record.set(state.getRed(), state.getGreen(), state.getBlue(), state.getAlpha());
            }
        } else if (!record.isValid() || !record.is(true, true, true, true)) {
            gl.glColorMask(true, true, true, true);
            record.set(true, true, true, true);
        }

        if (!record.isValid()) {
            record.validate();
View Full Code Here

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

      // Clear stencil and disable color //
        // Draw with STENCIL         //
        /////////////////////////////////////
//      /*
      gl.glClearStencil(0);
      gl.glColorMask(false,false,false,false);
      gl.glDisable(GL.GL_BLEND);
     
      gl.glDepthMask(false);//remove..?
     
      //FIXME do this for non-zero rule?
View Full Code Here

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

        gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      //////////////////////
      // Draw fill    //
        //////////////////////
//        /*
      gl.glColorMask(true, true, true, true);
      gl.glEnable (GL.GL_BLEND);
     
        gl.glStencilOp (GL.GL_ZERO, GL.GL_ZERO, GL.GL_ZERO); //org
        gl.glStencilFunc(GL.GL_EQUAL, 0x01, 0x01);
     
View Full Code Here

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

        gl.glDisable (GL.GL_BLEND);
        gl.glEnable (GL.GL_STENCIL_TEST);
//        gl.glStencilMask (0x01);
        gl.glStencilOp (GL.GL_KEEP, GL.GL_KEEP, GL.GL_INVERT);
        gl.glStencilFunc (GL.GL_ALWAYS, 0, ~0);
        gl.glColorMask (false, false, false, false);
//    */
        //Change beziervertices to normal vertices - THIS IS EXPENSIVE!
        Vertex[] allVertsBezierResolved = ToolsGeometry.createVertexArrFromBezierArr(vertexArr, 15);
              
       //DRAW RAW FILL
View Full Code Here

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

          gl.glVertex3f(vertex.x, vertex.y, vertex.z);
        }
       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);
View Full Code Here

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

        final GL2 gl = (GL2) drawable.getGL();

        /* Set up stencil buffer */
        gl.glClearStencil(0);
        gl.glEnable(GL.GL_STENCIL_TEST);
        gl.glColorMask(false, false, false, false);
        gl.glStencilFunc(GL.GL_NEVER, 0, 1);
        gl.glStencilOp(GL.GL_INVERT, GL.GL_INVERT, GL.GL_INVERT);

        // if only 1 vertex, draw a point
        if (polygon.vertices().size() == 1)
View Full Code Here

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

            }
            gl.glEnd();
        }

        /* Re-enable color */
        gl.glColorMask(true, true, true, true);
        gl.glStencilFunc(GL.GL_EQUAL, 1, 1);
        gl.glStencilOp(GL.GL_ZERO, GL.GL_ZERO, GL.GL_ZERO);

        // push the current color
        gl.glPushAttrib(GL2.GL_CURRENT_BIT);
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.