Example usage for org.lwjgl.opengl GL11 glClearStencil

List of usage examples for org.lwjgl.opengl GL11 glClearStencil

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glClearStencil.

Prototype

public static void glClearStencil(@NativeType("GLint") int s) 

Source Link

Document

Sets the value to which to clear the stencil buffer.

Usage

From source file:code.elix_x.excore.utils.client.render.wtw.WTWRenderer.java

License:Apache License

@SubscribeEvent(priority = EventPriority.LOW)
public static void renderWorldLast(RenderWorldLastEvent event) {
    GL11.glClearStencil(0);
    GL11.glClear(GL11.GL_STENCIL_BUFFER_BIT);
    INSTANCE.run();//w  w w. j ava 2 s.c  o  m
}

From source file:com.ardor3d.renderer.lwjgl.LwjglRenderer.java

License:Open Source License

public void clearBuffers(final int buffers, final boolean strict) {

    int clear = 0;

    if ((buffers & Renderer.BUFFER_COLOR) != 0) {
        clear |= GL11.GL_COLOR_BUFFER_BIT;
    }//from   w  ww  . ja  va 2 s . co  m

    if ((buffers & Renderer.BUFFER_DEPTH) != 0) {
        clear |= GL11.GL_DEPTH_BUFFER_BIT;

        // make sure no funny business is going on in the z before clearing.
        if (defaultStateList.containsKey(RenderState.StateType.ZBuffer)) {
            defaultStateList.get(RenderState.StateType.ZBuffer).setNeedsRefresh(true);
            doApplyState(defaultStateList.get(RenderState.StateType.ZBuffer));
        }
    }

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

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

    if ((buffers & Renderer.BUFFER_ACCUMULATION) != 0) {
        clear |= GL11.GL_ACCUM_BUFFER_BIT;
    }

    final RenderContext context = ContextManager.getCurrentContext();
    final RendererRecord record = context.getRendererRecord();

    if (strict) {
        // grab our camera to get width and height info.
        final Camera cam = Camera.getCurrentCamera();

        GL11.glEnable(GL11.GL_SCISSOR_TEST);
        GL11.glScissor(0, 0, cam.getWidth(), cam.getHeight());
        record.setClippingTestEnabled(true);
    }

    GL11.glClear(clear);

    if (strict) {
        // put us back.
        LwjglRendererUtil.applyScissors(record);
    }
}

From source file:com.badlogic.gdx.backends.jglfw.JglfwGL20.java

License:Apache License

public void glClearStencil(int s) {
    GL11.glClearStencil(s);
}

From source file:com.badlogic.gdx.backends.lwjgl.LwjglGL10.java

License:Apache License

public final void glClearStencil(int s) {
    GL11.glClearStencil(s);
}

From source file:io.root.gfx.glutils.GL.java

License:Apache License

public static void glClearStencil(int s) {
    GL11.glClearStencil(s);
}

From source file:net.smert.frameworkgl.opengl.OpenGL1.java

License:Apache License

public OpenGL1 setClearStencil(int index) {
    GL11.glClearStencil(index);
    return this;
}

From source file:org.oscim.gdx.LwjglGL20.java

License:Apache License

public void clearStencil(int s) {
    GL11.glClearStencil(s);
}

From source file:playn.java.JavaGL20.java

License:Apache License

@Override
public void glClearStencil(int s) {
    GL11.glClearStencil(s);
}

From source file:processing.opengl.PLWJGL.java

License:Open Source License

@Override
public void clearStencil(int s) {
    GL11.glClearStencil(s);
}

From source file:tk.ivybits.engine.gl.GL.java

License:Open Source License

public static void glClearStencil(int a) {
    GL11.glClearStencil(a);
}