/**
- * Allocate and initialize a new array object.
+ * Allocate and initialize a new vertex array object.
*
* This function is intended to be called via
* \c dd_function_table::NewArrayObject.
struct gl_array_object *
_mesa_new_array_object( GLcontext *ctx, GLuint name )
{
- struct gl_array_object *obj;
-
- (void) ctx;
-
- obj = MALLOC_STRUCT(gl_array_object);
- _mesa_initialize_array_object(ctx, obj, name);
+ struct gl_array_object *obj = MALLOC_STRUCT(gl_array_object);
+ if (obj)
+ _mesa_initialize_array_object(ctx, obj, name);
return obj;
}
_mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj )
{
(void) ctx;
-
_mesa_free(obj);
}
{
GLuint i;
-
obj->Name = name;
/* Vertex arrays */
obj->Vertex.StrideB = 0;
obj->Vertex.Ptr = NULL;
obj->Vertex.Enabled = GL_FALSE;
- obj->Vertex.Flags = CA_CLIENT_DATA;
obj->Normal.Type = GL_FLOAT;
obj->Normal.Stride = 0;
obj->Normal.StrideB = 0;
obj->Normal.Ptr = NULL;
obj->Normal.Enabled = GL_FALSE;
- obj->Normal.Flags = CA_CLIENT_DATA;
obj->Color.Size = 4;
obj->Color.Type = GL_FLOAT;
obj->Color.Stride = 0;
obj->Color.StrideB = 0;
obj->Color.Ptr = NULL;
obj->Color.Enabled = GL_FALSE;
- obj->Color.Flags = CA_CLIENT_DATA;
obj->SecondaryColor.Size = 4;
obj->SecondaryColor.Type = GL_FLOAT;
obj->SecondaryColor.Stride = 0;
obj->SecondaryColor.StrideB = 0;
obj->SecondaryColor.Ptr = NULL;
obj->SecondaryColor.Enabled = GL_FALSE;
- obj->SecondaryColor.Flags = CA_CLIENT_DATA;
obj->FogCoord.Size = 1;
obj->FogCoord.Type = GL_FLOAT;
obj->FogCoord.Stride = 0;
obj->FogCoord.StrideB = 0;
obj->FogCoord.Ptr = NULL;
obj->FogCoord.Enabled = GL_FALSE;
- obj->FogCoord.Flags = CA_CLIENT_DATA;
obj->Index.Type = GL_FLOAT;
obj->Index.Stride = 0;
obj->Index.StrideB = 0;
obj->Index.Ptr = NULL;
obj->Index.Enabled = GL_FALSE;
- obj->Index.Flags = CA_CLIENT_DATA;
for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
obj->TexCoord[i].Size = 4;
obj->TexCoord[i].Type = GL_FLOAT;
obj->TexCoord[i].StrideB = 0;
obj->TexCoord[i].Ptr = NULL;
obj->TexCoord[i].Enabled = GL_FALSE;
- obj->TexCoord[i].Flags = CA_CLIENT_DATA;
}
obj->EdgeFlag.Stride = 0;
obj->EdgeFlag.StrideB = 0;
obj->EdgeFlag.Ptr = NULL;
obj->EdgeFlag.Enabled = GL_FALSE;
- obj->EdgeFlag.Flags = CA_CLIENT_DATA;
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
obj->VertexAttrib[i].Size = 4;
obj->VertexAttrib[i].Type = GL_FLOAT;
obj->VertexAttrib[i].Ptr = NULL;
obj->VertexAttrib[i].Enabled = GL_FALSE;
obj->VertexAttrib[i].Normalized = GL_FALSE;
- obj->VertexAttrib[i].Flags = CA_CLIENT_DATA;
}
-
#if FEATURE_ARB_vertex_buffer_object
/* Vertex array buffers */
obj->Vertex.BufferObj = ctx->Array.NullBufferObj;
struct gl_array_object *newObj = NULL;
ASSERT_OUTSIDE_BEGIN_END(ctx);
-
ASSERT(oldObj != NULL);
if ( oldObj->Name == id )
/**
- * Generate a set of unique array object IDs and store them in \c buffer.
+ * Generate a set of unique array object IDs and store them in \c arrays.
*
* \param n Number of IDs to generate.
- * \param buffer Array of \c n locations to store the IDs.
+ * \param arrays Array of \c n locations to store the IDs.
*/
void GLAPIENTRY
-_mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *buffer)
+_mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *arrays)
{
GET_CURRENT_CONTEXT(ctx);
GLuint first;
return;
}
- if (!buffer) {
+ if (!arrays) {
return;
}
return;
}
_mesa_save_array_object(ctx, obj);
- buffer[i] = first + i;
+ arrays[i] = first + i;
}
_glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);