From 0dfe50f1a6cc5e1f979ac65cca4ed9359d18869d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 1 Feb 2014 19:14:38 -0800 Subject: mesa: Rename ArrayObj to VAO and DefaultArrayObj to DefaultVAO. When reading through the Mesa drawing code, it's not immediately obvious to me that "ArrayObj" (gl_array_object) is the Vertex Array Object (VAO) state. The comment above the structure explains this, but readers still have to remember this and translate accordingly. Out of context, "array object" is a fairly vague. Even in context, "array" has a lot of meanings: glDrawArrays, vertex data stored in user arrays, gl_client_arrays, gl_vertex_attrib_arrays, and so on. Using the term "VAO" immediately associates these fields with the OpenGL concept, clarifying the situation and aiding programmer sanity. Completely generated by: $ find . -type f -print0 | xargs -0 sed -i \ -e 's/ArrayObj;/VAO;/g' \ -e 's/->ArrayObj/->VAO/g' \ -e 's/Array\.ArrayObj/Array.VAO/g' \ -e 's/Array\.DefaultArrayObj/Array.DefaultVAO/g' v2: Rerun command to resolve conflicts with Ian's meta patches. Signed-off-by: Kenneth Graunke Reviewed-by: Jordan Justen Reviewed-by: Ian Romanick Reviewed-by: Brian Paul --- src/mesa/main/api_arrayelt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/api_arrayelt.c') diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index f439b706853..09f314b8e45 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1472,7 +1472,7 @@ check_vbo(AEcontext *actx, struct gl_buffer_object *vbo) static inline void update_derived_client_arrays(struct gl_context *ctx) { - struct gl_array_object *arrayObj = ctx->Array.ArrayObj; + struct gl_array_object *arrayObj = ctx->Array.VAO; if (arrayObj->NewArrays) { _mesa_update_array_object_client_arrays(ctx, arrayObj); @@ -1494,7 +1494,7 @@ _ae_update_state(struct gl_context *ctx) AEarray *aa = actx->arrays; /* non-indexed arrays (ex: glNormal) */ AEattrib *at = actx->attribs; /* indexed arrays (ex: glMultiTexCoord) */ GLuint i; - struct gl_array_object *arrayObj = ctx->Array.ArrayObj; + struct gl_array_object *arrayObj = ctx->Array.VAO; actx->nr_vbos = 0; -- cgit v1.2.3