summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2005-01-13 14:08:47 +0000
committerMichal Krol <[email protected]>2005-01-13 14:08:47 +0000
commit9b3752c8ab721325d02759e1292f94ce566aa3ae (patch)
tree425eb8ddb45ecd9babe97f5238ebbff09667d61b /src/mesa
parent8f8534f691e92e85053a96bd222603d7bac23100 (diff)
init ARB_shader_objects subsystem
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/context.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 98e684d3936..779d11061b3 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 );