mesa: Use VERT_ATTRIB_* indexed array in gl_array_object.

Replace the distinct struct gl_client_array members in gl_array_object by
an array of gl_client_arrays indexed by VERT_ATTRIB_*.
Renumber the vertex attributes slightly to keep the old semantics of the
distinct array members. Make use of the upper 32 bits in VERT_BIT_*.
Update all occurances of the distinct struct members with the array
equivalents.

Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Mathias Fröhlich
2011-10-31 22:23:51 +01:00
parent dca6a28a14
commit 762c9766c9
14 changed files with 286 additions and 384 deletions

View File

@@ -738,17 +738,6 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
}
/* unbind any vertex pointers bound to this buffer */
unbind(ctx, &arrayObj->Vertex.BufferObj, bufObj);
unbind(ctx, &arrayObj->Weight.BufferObj, bufObj);
unbind(ctx, &arrayObj->Normal.BufferObj, bufObj);
unbind(ctx, &arrayObj->Color.BufferObj, bufObj);
unbind(ctx, &arrayObj->SecondaryColor.BufferObj, bufObj);
unbind(ctx, &arrayObj->FogCoord.BufferObj, bufObj);
unbind(ctx, &arrayObj->Index.BufferObj, bufObj);
unbind(ctx, &arrayObj->EdgeFlag.BufferObj, bufObj);
for (j = 0; j < Elements(arrayObj->TexCoord); j++) {
unbind(ctx, &arrayObj->TexCoord[j].BufferObj, bufObj);
}
for (j = 0; j < Elements(arrayObj->VertexAttrib); j++) {
unbind(ctx, &arrayObj->VertexAttrib[j].BufferObj, bufObj);
}