OSDN Git Service

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 d5d0a55..e43fa96 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) {