Package javax.media.opengl

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


            }
            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.