summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-10 13:45:01 -0600
committerBrian Paul <brianp@vmware.com>2009-06-12 16:01:02 -0600
commit0854b7e972eaea1986aa956d4dffa2d6ad541b62 (patch)
treee72c089ab4ef18c6ab40662f992348e18bee1678 /src
parentd7ea9ddf5824556e47decac7ba200f37cf1e552f (diff)
mesa: use _mesa_reference_buffer_object() in a few places
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/bufferobj.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index a49da3d3b5..c04fa69115 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -470,11 +470,15 @@ _mesa_copy_buffer_subdata(GLcontext *ctx,
void
_mesa_init_buffer_objects( GLcontext *ctx )
{
- ctx->Array.ArrayBufferObj = ctx->Shared->NullBufferObj;
- ctx->Array.ElementArrayBufferObj = ctx->Shared->NullBufferObj;
-
- ctx->CopyReadBuffer = ctx->Shared->NullBufferObj;
- ctx->CopyWriteBuffer = ctx->Shared->NullBufferObj;
+ _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj,
+ ctx->Shared->NullBufferObj);
+ _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj,
+ ctx->Shared->NullBufferObj);
+
+ _mesa_reference_buffer_object(ctx, &ctx->CopyReadBuffer,
+ ctx->Shared->NullBufferObj);
+ _mesa_reference_buffer_object(ctx, &ctx->CopyWriteBuffer,
+ ctx->Shared->NullBufferObj);
}