* Helper for initializing a vertex array.
*/
static void
-init_array(struct gl_context *ctx, struct gl_vertex_array *cl,
+init_array(struct gl_context *ctx, struct gl_vertex_array *array,
unsigned size, const void *pointer)
{
- memset(cl, 0, sizeof(*cl));
+ memset(array, 0, sizeof(*array));
- cl->Size = size;
- cl->Type = GL_FLOAT;
- cl->Format = GL_RGBA;
- cl->StrideB = 0;
- cl->_ElementSize = cl->Size * sizeof(GLfloat);
- cl->Ptr = pointer;
+ array->Size = size;
+ array->Type = GL_FLOAT;
+ array->Format = GL_RGBA;
+ array->StrideB = 0;
+ array->_ElementSize = array->Size * sizeof(GLfloat);
+ array->Ptr = pointer;
- _mesa_reference_buffer_object(ctx, &cl->BufferObj,
+ _mesa_reference_buffer_object(ctx, &array->BufferObj,
ctx->Shared->NullBufferObj);
}
* attribute:
*/
for (i = 0; i < VERT_ATTRIB_FF_MAX; i++) {
- struct gl_vertex_array *cl = &vbo->currval[VERT_ATTRIB_FF(i)];
+ struct gl_vertex_array *array = &vbo->currval[VERT_ATTRIB_FF(i)];
- init_array(ctx, cl,
+ init_array(ctx, array,
check_size(ctx->Current.Attrib[i]),
ctx->Current.Attrib[i]);
}
GLuint i;
for (i = 0; i < VERT_ATTRIB_GENERIC_MAX; i++) {
- struct gl_vertex_array *cl = &vbo->currval[VBO_ATTRIB_GENERIC0 + i];
+ struct gl_vertex_array *array = &vbo->currval[VBO_ATTRIB_GENERIC0 + i];
- init_array(ctx, cl, 1, ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + i]);
+ init_array(ctx, array, 1, ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + i]);
}
}
* attribute:
*/
for (i = 0; i < MAT_ATTRIB_MAX; i++) {
- struct gl_vertex_array *cl =
+ struct gl_vertex_array *array =
&vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT + i];
unsigned size;
break;
}
- init_array(ctx, cl, size, ctx->Light.Material.Attrib[i]);
+ init_array(ctx, array, size, ctx->Light.Material.Attrib[i]);
}
}