+
+/**
+ * Helper for initializing a vertex array.
+ */
+static void
+init_array(struct gl_context *ctx, struct gl_vertex_array *cl,
+ unsigned size, const void *pointer)
+{
+ memset(cl, 0, sizeof(*cl));
+
+ cl->Size = size;
+ cl->Type = GL_FLOAT;
+ cl->Format = GL_RGBA;
+ cl->StrideB = 0;
+ cl->_ElementSize = cl->Size * sizeof(GLfloat);
+ cl->Ptr = pointer;
+
+ _mesa_reference_buffer_object(ctx, &cl->BufferObj,
+ ctx->Shared->NullBufferObj);
+}
+
+
+/**
+ * Set up the vbo->currval arrays to point at the context's current
+ * vertex attributes (with strides = 0).
+ */
+static void init_legacy_currval(struct gl_context *ctx)