Bug in LWJGLStencilState?

Hi all,

Ive looked at LWJGLStencilState and ive noticed that StencilState never gets enabled using the GL11.glEnable(…) call.



the current code is:


    public void apply() {
        if (isEnabled()) {
            GL11.glStencilFunc(stencilFunc[getStencilFunc()], getStencilRef(),
                    getStencilMask());
            GL11.glStencilOp(stencilOp[getStencilOpFail()],
                    stencilOp[getStencilOpZFail()],
                    stencilOp[getStencilOpZPass()]);

        }

    }



Shouldn't it be:


    public void apply() {
        if (isEnabled()) {
            GL11.glEnable(GL11.GL_STENCIL_TEST);
            GL11.glStencilFunc(stencilFunc[getStencilFunc()], getStencilRef(),
                    getStencilMask());
            GL11.glStencilOp(stencilOp[getStencilOpFail()],
                    stencilOp[getStencilOpZFail()],
                    stencilOp[getStencilOpZPass()]);

        }else{
            GL11.glDisable(GL11.GL_STENCIL_TEST);
        }
    }



Or am I mistaken?

DP