From 9b3752c8ab721325d02759e1292f94ce566aa3ae Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Thu, 13 Jan 2005 14:08:47 +0000 Subject: init ARB_shader_objects subsystem --- src/mesa/main/context.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 98e684d393..779d11061b 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -8,7 +8,7 @@ * Mesa 3-D graphics library * Version: 6.3 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -126,7 +126,8 @@ #include "math/m_matrix.h" #include "math/m_xform.h" #include "math/mathmod.h" -#endif +#endif +#include "shaderobjects.h" #ifdef USE_SPARC_ASM #include "sparc/sparc.h" @@ -865,7 +866,9 @@ alloc_shared_state( GLcontext *ctx ) goto cleanup; #endif - ss->BufferObjects = _mesa_NewHashTable(); + ss->BufferObjects = _mesa_NewHashTable(); + + ss->GL2Objects = _mesa_NewHashTable (); ss->Default1D = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_1D); if (!ss->Default1D) @@ -921,7 +924,10 @@ alloc_shared_state( GLcontext *ctx ) #if FEATURE_ARB_vertex_buffer_object if (ss->BufferObjects) _mesa_DeleteHashTable(ss->BufferObjects); -#endif +#endif + + if (ss->GL2Objects) + _mesa_DeleteHashTable (ss->GL2Objects); if (ss->Default1D) (*ctx->Driver.DeleteTexture)(ctx, ss->Default1D); @@ -1018,7 +1024,10 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ) #if FEATURE_ARB_vertex_buffer_object _mesa_DeleteHashTable(ss->BufferObjects); -#endif +#endif + + _mesa_DeleteHashTable (ss->GL2Objects); + _glthread_DESTROY_MUTEX(ss->Mutex); FREE(ss); @@ -1178,7 +1187,8 @@ init_attrib_groups( GLcontext *ctx ) _mesa_init_point( ctx ); _mesa_init_polygon( ctx ); _mesa_init_program( ctx ); - _mesa_init_rastpos( ctx ); + _mesa_init_rastpos( ctx ); + _mesa_init_shaderobjects (ctx); _mesa_init_stencil( ctx ); _mesa_init_transform( ctx ); _mesa_init_varray( ctx ); -- cgit v1.2.3