mesa: use _mesa_reference_buffer_object() in a few places
authorBrian Paul <brianp@vmware.com>
Wed, 10 Jun 2009 19:45:01 +0000 (13:45 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 12 Jun 2009 22:01:02 +0000 (16:01 -0600)
src/mesa/main/bufferobj.c

index a49da3d3b5861e42e45ef4520657448629530961..c04fa691154a9842ee93c4c7ec788d28b2c10466 100644 (file)
@@ -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);
 }