[Mesa-dev] [PATCH 7/7] mesa: use arrayObj var in more places in client_state()

Brian Paul brian.e.paul at gmail.com
Mon Feb 27 19:30:02 PST 2012


From: Brian Paul <brianp at vmware.com>

---
 src/mesa/main/enable.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 270b240..515dda9 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -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 );
-- 
1.7.1



More information about the mesa-dev mailing list