#include "glheader.h"
#include "imports.h"
#include "accum.h"
+#include "arrayobj.h"
#include "attrib.h"
#include "blend.h"
#include "buffers.h"
ctx->Driver.DeleteBuffer(ctx, bufObj);
}
+/**
+ * Callback for deleting an array object. Called by _mesa_HashDeleteAll().
+ */
+static void
+delete_arrayobj_cb(GLuint id, void *data, void *userData)
+{
+ struct gl_array_object *arrayObj = (struct gl_array_object *) data;
+ GLcontext *ctx = (GLcontext *) userData;
+ _mesa_delete_array_object(ctx, arrayObj);
+}
+
/**
* Deallocate a shared state object and all children structures.
_mesa_DeleteHashTable(ss->BufferObjects);
#endif
+ _mesa_HashDeleteAll(ss->ArrayObjects, delete_arrayobj_cb, ctx);
_mesa_DeleteHashTable(ss->ArrayObjects);
_mesa_DeleteHashTable(ss->GL2Objects);
#if FEATURE_ARB_vertex_buffer_object
_mesa_delete_buffer_object(ctx, ctx->Array.NullBufferObj);
#endif
+ _mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj);
/* free dispatch tables */
_mesa_free(ctx->Exec);