Example usage for org.lwjgl.opengl EXTStencilTwoSide GL_STENCIL_TEST_TWO_SIDE_EXT

List of usage examples for org.lwjgl.opengl EXTStencilTwoSide GL_STENCIL_TEST_TWO_SIDE_EXT

Introduction

In this page you can find the example usage for org.lwjgl.opengl EXTStencilTwoSide GL_STENCIL_TEST_TWO_SIDE_EXT.

Prototype

int GL_STENCIL_TEST_TWO_SIDE_EXT

To view the source code for org.lwjgl.opengl EXTStencilTwoSide GL_STENCIL_TEST_TWO_SIDE_EXT.

Click Source Link

Document

Accepted by the cap parameter of Enable, Disable, and IsEnabled, and by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

Usage

From source file:com.ardor3d.scene.state.lwjgl.LwjglStencilStateUtil.java

License:Open Source License

private static void setTwoSidedEnabled(final boolean enable, final StencilStateRecord record,
        final ContextCapabilities caps) {
    if (caps.isTwoSidedStencilSupported()) {
        if (record.isValid()) {
            if (enable && !record.useTwoSided) {
                GL11.glEnable(EXTStencilTwoSide.GL_STENCIL_TEST_TWO_SIDE_EXT);
            } else if (!enable && record.useTwoSided) {
                GL11.glDisable(EXTStencilTwoSide.GL_STENCIL_TEST_TWO_SIDE_EXT);
            }//w  w w  .  jav  a  2s . c om
        } else {
            if (enable) {
                GL11.glEnable(EXTStencilTwoSide.GL_STENCIL_TEST_TWO_SIDE_EXT);
            } else {
                GL11.glDisable(EXTStencilTwoSide.GL_STENCIL_TEST_TWO_SIDE_EXT);
            }
        }
    }
    record.useTwoSided = enable;
}