Package javax.media.opengl

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


        if (userStencilAvailable) {
            if (stencilEnable) {
                gl.glEnable(GL.GL_STENCIL_TEST);

                gl.glStencilOp(getStencilOpValue(stencilFailOp),
                        getStencilOpValue(stencilZFailOp),
                        getStencilOpValue(stencilZPassOp));

                gl.glStencilFunc(getFunctionValue(stencilFunction),
                        stencilReferenceValue, stencilCompareMask);
View Full Code Here


        /* 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)
            gl.glBegin(GL.GL_POINTS);

View Full Code Here

        }

        /* 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);

        // use the current polygon's color
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.