@Override public void attach(GL11 gl) { originalCullFace = gl.glIsEnabled(GL_CULL_FACE); originalFaceMode = GlUtil.getInteger(gl, GL_FRONT_FACE); switch (faceMode) { case Front: if (!originalCullFace) gl.glEnable(GL_CULL_FACE); gl.glFrontFace(GL_CCW); break; case Back: if (!originalCullFace) gl.glEnable(GL_CULL_FACE); gl.glFrontFace(GL_CW); break; case BothSide: gl.glDisable(GL_CULL_FACE); break; } }
@Override public boolean glIsEnabled(int cap) { return gl.glIsEnabled(cap); }