diff options
author | Brian Paul <[email protected]> | 2009-05-07 13:30:39 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-05-07 14:34:09 -0600 |
commit | 4f6b704f9796775d8d9937c3cf75a2901b99b896 (patch) | |
tree | 9a5ac7599b7e6f7148b031358b2671a78fbf01ac /src/mesa/main/arrayobj.c | |
parent | 105c8529e78db961fee832b6248c3bcf59668bad (diff) |
mesa: move the NullBufferObj from GLcontext to gl_shared_state
Since shared array objects may point to the null/default buffer object,
the null/default buffer object should be part of the shared state.
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r-- | src/mesa/main/arrayobj.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index b04095fd16b..2646c12ccc1 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -112,7 +112,8 @@ init_array(GLcontext *ctx, array->Normalized = GL_FALSE; #if FEATURE_ARB_vertex_buffer_object /* Vertex array buffers */ - array->BufferObj = ctx->Array.NullBufferObj; + _mesa_reference_buffer_object(ctx, &array->BufferObj, + ctx->Shared->NullBufferObj); #endif } @@ -180,7 +181,7 @@ _mesa_remove_array_object( GLcontext *ctx, struct gl_array_object *obj ) static void unbind_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj ) { - if (bufObj != ctx->Array.NullBufferObj) { + if (bufObj != ctx->Shared->NullBufferObj) { _mesa_reference_buffer_object(ctx, &bufObj, NULL); } } |