diff options
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 25457183431..97893b721db 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -329,7 +329,13 @@ _mesa_init_buffer_objects( GLcontext *ctx ) { GLuint i; + /* Allocate the default buffer object and set refcount so high that + * it never gets deleted. + */ ctx->Array.NullBufferObj = _mesa_new_buffer_object(ctx, 0, 0); + if (ctx->Array.NullBufferObj) + ctx->Array.NullBufferObj->RefCount = 1000; + ctx->Array.ArrayBufferObj = ctx->Array.NullBufferObj; ctx->Array.ElementArrayBufferObj = ctx->Array.NullBufferObj; |