Examples of glClearStencil()


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

    boolean decal1stChildSetup(Context ctx) {
        if (VERBOSE) System.err.println("JoglPipeline.decal1stChildSetup()");

        GL gl = context(ctx).getGL();
        gl.glEnable(GL.GL_STENCIL_TEST);
        gl.glClearStencil(0x0);
        gl.glClear(GL.GL_STENCIL_BUFFER_BIT);
        gl.glStencilFunc(GL.GL_ALWAYS, 0x1, 0x1);
        gl.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_REPLACE);
        if (gl.glIsEnabled(GL.GL_DEPTH_TEST))
            return true;
View Full Code Here

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

        }

        if ((buffers & Renderer.BUFFER_STENCIL) != 0) {
            clear |= GL.GL_STENCIL_BUFFER_BIT;

            gl.glClearStencil(_stencilClearValue);
            gl.glStencilMask(~0);
            gl.glClear(GL.GL_STENCIL_BUFFER_BIT);
        }

        if ((buffers & Renderer.BUFFER_ACCUMULATION) != 0) {
View Full Code Here

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

      /////////////////////////////////////
      // 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..?
     
 
View Full Code Here

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

//      /*
      boolean clipping = false;
      if (GLStencilUtil.getInstance().isClipActive()){
        clipping = true;
        gl.glPushAttrib(GL.GL_STENCIL_BUFFER_BIT);
        gl.glClearStencil(GLStencilUtil.getInstance().stencilValueStack.peek());
        gl.glClear(GL.GL_STENCIL_BUFFER_BIT);
        //      gl.glDisable(GL.GL_STENCIL_TEST);
      }
//      */
     
 
View Full Code Here

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

        // Issue 239 - clear stencil if specified
        if (clearStencil) {
            gl.glPushAttrib(GL.GL_DEPTH_BUFFER_BIT | GL.GL_STENCIL_BUFFER_BIT);

            gl.glClearStencil(0);
            gl.glStencilMask(~0);
            clearMask |= GL.GL_STENCIL_BUFFER_BIT;
        } else {
            gl.glPushAttrib(GL.GL_DEPTH_BUFFER_BIT);
        }
View Full Code Here

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

            return;

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

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.