diff options
author | Brian Paul <[email protected]> | 2009-05-21 10:15:18 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-05-21 16:10:45 -0600 |
commit | 8fa0cb2b422abaeee1b69f82ca7e9f02dc8393b9 (patch) | |
tree | f42bb9d372f6b0ba2600a0230682a97fbe7d6b55 /src/mesa/main | |
parent | 1889890c88c3c10287ca4f84369190cc7029884f (diff) |
mesa: added gl_array_object::Weight array field
We don't really implement vertex weights but in the VBO code this
fixes and odd case for the legacy_array[] setup. Before, the
vbo->draw_prims() call was always indicating that the vertex weight
array was present/enabled when it really wasn't.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/arrayobj.c | 3 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 8973c3cb37d..f9b11ee244a 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -81,6 +81,7 @@ unbind_array_object_vbos(GLcontext *ctx, struct gl_array_object *obj) GLuint i; _mesa_reference_buffer_object(ctx, &obj->Vertex.BufferObj, NULL); + _mesa_reference_buffer_object(ctx, &obj->Weight.BufferObj, NULL); _mesa_reference_buffer_object(ctx, &obj->Normal.BufferObj, NULL); _mesa_reference_buffer_object(ctx, &obj->Color.BufferObj, NULL); _mesa_reference_buffer_object(ctx, &obj->SecondaryColor.BufferObj, NULL); @@ -223,6 +224,7 @@ _mesa_initialize_array_object( GLcontext *ctx, /* Init the individual arrays */ init_array(ctx, &obj->Vertex, 4, GL_FLOAT); + init_array(ctx, &obj->Weight, 1, GL_FLOAT); init_array(ctx, &obj->Normal, 3, GL_FLOAT); init_array(ctx, &obj->Color, 4, GL_FLOAT); init_array(ctx, &obj->SecondaryColor, 4, GL_FLOAT); @@ -326,6 +328,7 @@ _mesa_update_array_object_max_element(GLcontext *ctx, GLuint i, min = ~0; min = update_min(min, &arrayObj->Vertex); + min = update_min(min, &arrayObj->Weight); min = update_min(min, &arrayObj->Normal); min = update_min(min, &arrayObj->Color); min = update_min(min, &arrayObj->SecondaryColor); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 2708678e64c..55bfa2bf411 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1563,6 +1563,7 @@ struct gl_array_object /** Conventional vertex arrays */ /*@{*/ struct gl_client_array Vertex; + struct gl_client_array Weight; struct gl_client_array Normal; struct gl_client_array Color; struct gl_client_array SecondaryColor; |