mesa: fix bad mask bit in clip plane restore code for glPopAttrib()
authorLars Henning Wendt <lhwendt@igd.fhg.de>
Thu, 16 Apr 2009 16:14:17 +0000 (10:14 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 16 Apr 2009 16:15:10 +0000 (10:15 -0600)
src/mesa/main/attrib.c

index d5d0a552dbf9381a72716a201e248d70575f4814..e43fa96dd31e2e8671602be7e3ff74d6270190e2 100644 (file)
@@ -1265,7 +1265,7 @@ _mesa_PopAttrib(void)
 
                /* restore clip planes */
                for (i = 0; i < MAX_CLIP_PLANES; i++) {
-                  const GLuint mask = 1 << 1;
+                  const GLuint mask = 1 << i;
                   const GLfloat *eyePlane = xform->EyeUserPlane[i];
                   COPY_4V(ctx->Transform.EyeUserPlane[i], eyePlane);
                   if (xform->ClipPlanesEnabled & mask) {