aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/api_arrayelt.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-29 12:25:28 +0100
committermarha <marha@users.sourceforge.net>2011-11-29 12:25:28 +0100
commit2cfebffb491807a465a8e5f7daca582d8aefb829 (patch)
tree1e17cf480a441bc4b941008005fcd0cc6c3d09a6 /mesalib/src/mesa/main/api_arrayelt.c
parent7417e9a171736b5279881cd4381fb58c617a23d9 (diff)
downloadvcxsrv-2cfebffb491807a465a8e5f7daca582d8aefb829.tar.gz
vcxsrv-2cfebffb491807a465a8e5f7daca582d8aefb829.tar.bz2
vcxsrv-2cfebffb491807a465a8e5f7daca582d8aefb829.zip
mesa git update 29 nov 2011
Diffstat (limited to 'mesalib/src/mesa/main/api_arrayelt.c')
-rw-r--r--mesalib/src/mesa/main/api_arrayelt.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/mesalib/src/mesa/main/api_arrayelt.c b/mesalib/src/mesa/main/api_arrayelt.c
index b93a057e6..7bf55f319 100644
--- a/mesalib/src/mesa/main/api_arrayelt.c
+++ b/mesalib/src/mesa/main/api_arrayelt.c
@@ -1474,44 +1474,44 @@ static void _ae_update_state( struct gl_context *ctx )
actx->nr_vbos = 0;
/* conventional vertex arrays */
- if (arrayObj->Index.Enabled) {
- aa->array = &arrayObj->Index;
+ if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
+ aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX];
aa->offset = IndexFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- if (arrayObj->EdgeFlag.Enabled) {
- aa->array = &arrayObj->EdgeFlag;
+ if (arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) {
+ aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG];
aa->offset = _gloffset_EdgeFlagv;
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- if (arrayObj->Normal.Enabled) {
- aa->array = &arrayObj->Normal;
+ if (arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) {
+ aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL];
aa->offset = NormalFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- if (arrayObj->Color.Enabled) {
- aa->array = &arrayObj->Color;
+ if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) {
+ aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0];
aa->offset = ColorFuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- if (arrayObj->SecondaryColor.Enabled) {
- aa->array = &arrayObj->SecondaryColor;
+ if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) {
+ aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1];
aa->offset = SecondaryColorFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- if (arrayObj->FogCoord.Enabled) {
- aa->array = &arrayObj->FogCoord;
+ if (arrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled) {
+ aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_FOG];
aa->offset = FogCoordFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- struct gl_client_array *attribArray = &arrayObj->TexCoord[i];
+ struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)];
if (attribArray->Enabled) {
/* NOTE: we use generic glVertexAttribNV functions here.
* If we ever remove GL_NV_vertex_program this will have to change.
@@ -1528,8 +1528,8 @@ static void _ae_update_state( struct gl_context *ctx )
}
/* generic vertex attribute arrays */
- for (i = 1; i < Elements(arrayObj->VertexAttrib); i++) { /* skip zero! */
- struct gl_client_array *attribArray = &arrayObj->VertexAttrib[i];
+ for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) { /* skip zero! */
+ struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)];
if (attribArray->Enabled) {
at->array = attribArray;
/* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV
@@ -1563,24 +1563,24 @@ static void _ae_update_state( struct gl_context *ctx )
}
/* finally, vertex position */
- if (arrayObj->VertexAttrib[0].Enabled) {
+ if (arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled) {
/* Use glVertex(v) instead of glVertexAttrib(0, v) to be sure it's
* issued as the last (provoking) attribute).
*/
- aa->array = &arrayObj->VertexAttrib[0];
+ aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0];
assert(aa->array->Size >= 2); /* XXX fix someday? */
aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- else if (arrayObj->Vertex.Enabled) {
- aa->array = &arrayObj->Vertex;
+ else if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) {
+ aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_POS];
aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- check_vbo(actx, ctx->Array.ElementArrayBufferObj);
+ check_vbo(actx, arrayObj->ElementArrayBufferObj);
ASSERT(at - actx->attribs <= VERT_ATTRIB_MAX);
ASSERT(aa - actx->arrays < 32);