for (int i = 0; i < MAX_CLIP_PLANES; i++) { int clipPlane = GL11.GL_CLIP_PLANE0; switch (i) { case CLIP_PLANE0: clipPlane = GL11.GL_CLIP_PLANE0; break; case CLIP_PLANE1: clipPlane = GL11.GL_CLIP_PLANE1; break; case CLIP_PLANE2: clipPlane = GL11.GL_CLIP_PLANE2; break; case CLIP_PLANE3: clipPlane = GL11.GL_CLIP_PLANE3; break; case CLIP_PLANE4: clipPlane = GL11.GL_CLIP_PLANE4; break; case CLIP_PLANE5: clipPlane = GL11.GL_CLIP_PLANE5; break; }  GL11.glDisable(clipPlane); }
GL11.glDisable(GL11.GL_CLIP_PLANE0); GL11.glDisable(GL11.GL_CLIP_PLANE1); GL11.glDisable(GL11.GL_CLIP_PLANE2); GL11.glDisable(GL11.GL_CLIP_PLANE3); GL11.glDisable(GL11.GL_CLIP_PLANE4); GL11.glDisable(GL11.GL_CLIP_PLANE5);
    public void apply() {        if (isEnabled()) {            for (int i = 0; i < MAX_CLIP_PLANES; i++) {                if (enabledClipPlanes[i]) {                    buf.put(0, planeEquations[i][0]);                    buf.put(1, planeEquations[i][1]);                    buf.put(2, planeEquations[i][2]);                    buf.put(3, planeEquations[i][3]);                    int clipPlane = GL11.GL_CLIP_PLANE0;                    switch (i) {                    case CLIP_PLANE0:                        clipPlane = GL11.GL_CLIP_PLANE0;                        break;                    case CLIP_PLANE1:                        clipPlane = GL11.GL_CLIP_PLANE1;                        break;                    case CLIP_PLANE2:                        clipPlane = GL11.GL_CLIP_PLANE2;                        break;                    case CLIP_PLANE3:                        clipPlane = GL11.GL_CLIP_PLANE3;                        break;                    case CLIP_PLANE4:                        clipPlane = GL11.GL_CLIP_PLANE4;                        break;                    case CLIP_PLANE5:                        clipPlane = GL11.GL_CLIP_PLANE5;                        break;                    }                    GL11.glEnable(clipPlane);                    GL11.glClipPlane(clipPlane, buf);                }            }        } else {            for (int i = 0; i < MAX_CLIP_PLANES; i++) {                int clipPlane = GL11.GL_CLIP_PLANE0;                switch (i) {                case CLIP_PLANE0:                    clipPlane = GL11.GL_CLIP_PLANE0;                    break;                case CLIP_PLANE1:                    clipPlane = GL11.GL_CLIP_PLANE1;                    break;                case CLIP_PLANE2:                    clipPlane = GL11.GL_CLIP_PLANE2;                    break;                case CLIP_PLANE3:                    clipPlane = GL11.GL_CLIP_PLANE3;                    break;                case CLIP_PLANE4:                    clipPlane = GL11.GL_CLIP_PLANE4;                    break;                case CLIP_PLANE5:                    clipPlane = GL11.GL_CLIP_PLANE5;                    break;                }                GL11.glDisable(clipPlane);            }        }    }