From 0207b47aafebc06cf83fbdb8c9b01f63374fac66 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 9 Sep 2003 00:10:12 +0000 Subject: Added most of the infrastructure required to support ARB_vertex_buffer_object. THIS IS INCOMPLETE. --- src/mesa/main/context.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 9151c74899..dea778c39a 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -840,6 +840,8 @@ alloc_shared_state( GLcontext *ctx ) goto cleanup; #endif + ss->BufferObjects = _mesa_NewHashTable(); + ss->Default1D = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_1D); if (!ss->Default1D) goto cleanup; @@ -895,6 +897,9 @@ alloc_shared_state( GLcontext *ctx ) if (ss->DefaultFragmentProgram) _mesa_delete_program(ctx, ss->DefaultFragmentProgram); #endif + if (ss->BufferObjects) + _mesa_DeleteHashTable(ss->BufferObjects); + if (ss->Default1D) (*ctx->Driver.DeleteTexture)(ctx, ss->Default1D); if (ss->Default2D) @@ -972,6 +977,8 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ) _mesa_DeleteHashTable(ss->Programs); #endif + _mesa_DeleteHashTable(ss->BufferObjects); + _glthread_DESTROY_MUTEX(ss->Mutex); FREE(ss); -- cgit v1.2.3