mesa: use arrayObj var in more places in client_state()
authorBrian Paul <brianp@vmware.com>
Tue, 28 Feb 2012 03:28:09 +0000 (20:28 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 29 Feb 2012 15:39:20 +0000 (08:39 -0700)
src/mesa/main/enable.c

index 270b24045baccada7ef53f115ec5086b636c721c..515dda952434ccaa5e528a40b83287add4473e75 100644 (file)
@@ -118,7 +118,7 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
          CHECK_EXTENSION(NV_vertex_program, cap);
          {
             GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV;
-            ASSERT(VERT_ATTRIB_GENERIC(n) < Elements(ctx->Array.ArrayObj->VertexAttrib));
+            ASSERT(VERT_ATTRIB_GENERIC(n) < Elements(arrayObj->VertexAttrib));
             var = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(n)].Enabled;
             flag = VERT_BIT_GENERIC(n);
          }
@@ -149,9 +149,9 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
    *var = state;
 
    if (state)
-      ctx->Array.ArrayObj->_Enabled |= flag;
+      arrayObj->_Enabled |= flag;
    else
-      ctx->Array.ArrayObj->_Enabled &= ~flag;
+      arrayObj->_Enabled &= ~flag;
 
    if (ctx->Driver.Enable) {
       ctx->Driver.Enable( ctx, cap, state );