diff options
author | Kenneth Graunke <[email protected]> | 2014-02-01 19:14:38 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-02-03 00:52:58 -0800 |
commit | 0dfe50f1a6cc5e1f979ac65cca4ed9359d18869d (patch) | |
tree | 19a18b64de4bbfff6da38a854e8ef1b63d57ab2f /src/mesa/main/arrayobj.c | |
parent | 81144c049bc7c12e4edcdf28f91c3c024c6e8b2b (diff) |
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 <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r-- | src/mesa/main/arrayobj.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index fdcf172eae2..9b4e7dd881e 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -376,7 +376,7 @@ _mesa_update_array_object_client_arrays(struct gl_context *ctx, static void bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired) { - struct gl_array_object * const oldObj = ctx->Array.ArrayObj; + struct gl_array_object * const oldObj = ctx->Array.VAO; struct gl_array_object *newObj = NULL; ASSERT(oldObj != NULL); @@ -391,7 +391,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired) /* The spec says there is no array object named 0, but we use * one internally because it simplifies things. */ - newObj = ctx->Array.DefaultArrayObj; + newObj = ctx->Array.DefaultVAO; } else { /* non-default array object */ @@ -426,7 +426,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired) } ctx->NewState |= _NEW_ARRAY; - _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, newObj); + _mesa_reference_array_object(ctx, &ctx->Array.VAO, newObj); /* Pass BindVertexArray call to device driver */ if (ctx->Driver.BindArrayObject && newObj) @@ -491,7 +491,7 @@ _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids) * for that object reverts to zero and the default vertex array * becomes current." */ - if ( obj == ctx->Array.ArrayObj ) { + if ( obj == ctx->Array.VAO ) { _mesa_BindVertexArray(0); } |