diff options
author | Mathias Fröhlich <Mathias.Froehlich@web.de> | 2011-10-31 22:23:51 +0100 |
---|---|---|
committer | Mathias Fröhlich <Mathias.Froehlich@web.de> | 2011-11-29 06:37:19 +0100 |
commit | 762c9766c93697af8d7fbaa729aed118789dbe8e (patch) | |
tree | cff8bf8eaa64b2a47226c9f02f0e5e85c42949d0 /src/mesa/main/api_validate.c | |
parent | dca6a28a14f22d77273d79d44f57b0d853c0242d (diff) |
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>
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r-- | src/mesa/main/api_validate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 4c7baca863b..efdecb212aa 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -120,7 +120,7 @@ check_valid_to_render(struct gl_context *ctx, const char *function) case API_OPENGLES: /* For OpenGL ES, only draw if we have vertex positions */ - if (!ctx->Array.ArrayObj->Vertex.Enabled) + if (!ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) return GL_FALSE; break; #endif @@ -142,8 +142,8 @@ check_valid_to_render(struct gl_context *ctx, const char *function) /* Draw if we have vertex positions (GL_VERTEX_ARRAY or generic * array [0]). */ - return (ctx->Array.ArrayObj->Vertex.Enabled || - ctx->Array.ArrayObj->VertexAttrib[0].Enabled); + return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled || + ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled); } } break; |