@Override
  public boolean detach(GL11 gl, Overlay overlay) {
    if (originalCullFace) {
      gl.glEnable(GL_CULL_FACE);
    } else {
      gl.glDisable(GL_CULL_FACE);
    }

    gl.glFrontFace(originalFaceMode);

    return true;
  }
  @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;
    }
  }