_mesa_init_texture_barrier_functions(driver);
/* APPLE_vertex_array_object */
- driver->NewArrayObject = _mesa_new_array_object;
- driver->DeleteArrayObject = _mesa_delete_array_object;
+ driver->NewArrayObject = _mesa_new_vao;
+ driver->DeleteArrayObject = _mesa_delete_vao;
driver->BindArrayObject = NULL;
_mesa_init_shader_object_functions(driver);
if (state & MESA_META_VERTEX) {
/* save vertex array object state */
- _mesa_reference_array_object(ctx, &save->VAO,
+ _mesa_reference_vao(ctx, &save->VAO,
ctx->Array.VAO);
_mesa_reference_buffer_object(ctx, &save->ArrayBufferObj,
ctx->Array.ArrayBufferObj);
/* restore vertex array object */
_mesa_BindVertexArray(save->VAO->Name);
- _mesa_reference_array_object(ctx, &save->VAO, NULL);
+ _mesa_reference_vao(ctx, &save->VAO, NULL);
}
if (state & MESA_META_VIEWPORT) {
struct gl_vertex_array_object *vao = ctx->Array.VAO;
if (vao->NewArrays) {
- _mesa_update_array_object_client_arrays(ctx, vao);
+ _mesa_update_vao_client_arrays(ctx, vao);
vao->NewArrays = 0;
}
}
* \c dd_function_table::NewArrayObject.
*/
struct gl_vertex_array_object *
-_mesa_new_array_object( struct gl_context *ctx, GLuint name )
+_mesa_new_vao(struct gl_context *ctx, GLuint name)
{
struct gl_vertex_array_object *obj = CALLOC_STRUCT(gl_vertex_array_object);
if (obj)
- _mesa_initialize_array_object(ctx, obj, name);
+ _mesa_initialize_vao(ctx, obj, name);
return obj;
}
* \c dd_function_table::DeleteArrayObject.
*/
void
-_mesa_delete_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj )
+_mesa_delete_vao(struct gl_context *ctx, struct gl_vertex_array_object *obj)
{
(void) ctx;
unbind_array_object_vbos(ctx, obj);
/**
* Set ptr to vao w/ reference counting.
- * Note: this should only be called from the _mesa_reference_array_object()
+ * Note: this should only be called from the _mesa_reference_vao()
* inline function.
*/
void
-_mesa_reference_array_object_(struct gl_context *ctx,
- struct gl_vertex_array_object **ptr,
- struct gl_vertex_array_object *vao)
+_mesa_reference_vao_(struct gl_context *ctx,
+ struct gl_vertex_array_object **ptr,
+ struct gl_vertex_array_object *vao)
{
assert(*ptr != vao);
* Initialize a gl_vertex_array_object's arrays.
*/
void
-_mesa_initialize_array_object( struct gl_context *ctx,
- struct gl_vertex_array_object *obj,
- GLuint name )
+_mesa_initialize_vao(struct gl_context *ctx,
+ struct gl_vertex_array_object *obj,
+ GLuint name)
{
GLuint i;
/**
- * Helper for _mesa_update_array_object_max_element().
+ * Helper for _mesa_update_vao_max_element().
* \return min(vao->_VertexAttrib[*]._MaxElement).
*/
static GLuint
* Examine vertex arrays to update the gl_vertex_array_object::_MaxElement field.
*/
void
-_mesa_update_array_object_max_element(struct gl_context *ctx,
+_mesa_update_vao_max_element(struct gl_context *ctx,
struct gl_vertex_array_object *vao)
{
GLbitfield64 enabled;
* or a gl_vertex_buffer_binding has changed.
*/
void
-_mesa_update_array_object_client_arrays(struct gl_context *ctx,
- struct gl_vertex_array_object *vao)
+_mesa_update_vao_client_arrays(struct gl_context *ctx,
+ struct gl_vertex_array_object *vao)
{
GLbitfield64 arrays = vao->NewArrays;
}
ctx->NewState |= _NEW_ARRAY;
- _mesa_reference_array_object(ctx, &ctx->Array.VAO, newObj);
+ _mesa_reference_vao(ctx, &ctx->Array.VAO, newObj);
/* Pass BindVertexArray call to device driver */
if (ctx->Driver.BindArrayObject && newObj)
/* Unreference the array object.
* If refcount hits zero, the object will be deleted.
*/
- _mesa_reference_array_object(ctx, &obj, NULL);
+ _mesa_reference_vao(ctx, &obj, NULL);
}
}
}
_mesa_lookup_arrayobj(struct gl_context *ctx, GLuint id);
extern struct gl_vertex_array_object *
-_mesa_new_array_object( struct gl_context *ctx, GLuint name );
+_mesa_new_vao(struct gl_context *ctx, GLuint name);
extern void
-_mesa_delete_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj );
+_mesa_delete_vao(struct gl_context *ctx, struct gl_vertex_array_object *obj);
extern void
-_mesa_reference_array_object_(struct gl_context *ctx,
- struct gl_vertex_array_object **ptr,
- struct gl_vertex_array_object *vao);
+_mesa_reference_vao_(struct gl_context *ctx,
+ struct gl_vertex_array_object **ptr,
+ struct gl_vertex_array_object *vao);
static inline void
-_mesa_reference_array_object(struct gl_context *ctx,
- struct gl_vertex_array_object **ptr,
- struct gl_vertex_array_object *vao)
+_mesa_reference_vao(struct gl_context *ctx,
+ struct gl_vertex_array_object **ptr,
+ struct gl_vertex_array_object *vao)
{
if (*ptr != vao)
- _mesa_reference_array_object_(ctx, ptr, vao);
+ _mesa_reference_vao_(ctx, ptr, vao);
}
extern void
-_mesa_initialize_array_object( struct gl_context *ctx,
- struct gl_vertex_array_object *obj, GLuint name );
+_mesa_initialize_vao(struct gl_context *ctx,
+ struct gl_vertex_array_object *obj, GLuint name);
extern void
-_mesa_update_array_object_max_element(struct gl_context *ctx,
- struct gl_vertex_array_object *vao);
+_mesa_update_vao_max_element(struct gl_context *ctx,
+ struct gl_vertex_array_object *vao);
extern void
-_mesa_update_array_object_client_arrays(struct gl_context *ctx,
- struct gl_vertex_array_object *vao);
+_mesa_update_vao_client_arrays(struct gl_context *ctx,
+ struct gl_vertex_array_object *vao);
/** Returns the bitmask of all enabled arrays in fixed function mode.
return false;
}
- _mesa_initialize_array_object(ctx, attrib->VAO, 0);
+ _mesa_initialize_vao(ctx, attrib->VAO, 0);
return true;
}
{
/* We use a non driver array object, so don't just unref since we would
* end up using the drivers DeleteArrayObject function for deletion. */
- _mesa_delete_array_object(ctx, attrib->VAO);
+ _mesa_delete_vao(ctx, attrib->VAO);
attrib->VAO = 0;
_mesa_reference_buffer_object(ctx, &attrib->ArrayBufferObj, NULL);
}
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL);
- _mesa_reference_array_object(ctx, &ctx->Array.VAO, NULL);
- _mesa_reference_array_object(ctx, &ctx->Array.DefaultVAO, NULL);
+ _mesa_reference_vao(ctx, &ctx->Array.VAO, NULL);
+ _mesa_reference_vao(ctx, &ctx->Array.DefaultVAO, NULL);
_mesa_free_attrib_data(ctx);
_mesa_free_buffer_objects(ctx);
}
if (new_state & _NEW_ARRAY)
- _mesa_update_array_object_client_arrays(ctx, ctx->Array.VAO);
+ _mesa_update_vao_client_arrays(ctx, ctx->Array.VAO);
if (ctx->Const.CheckArrayBounds &&
new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT)) {
- _mesa_update_array_object_max_element(ctx, ctx->Array.VAO);
+ _mesa_update_vao_max_element(ctx, ctx->Array.VAO);
}
out:
struct gl_vertex_array_object *vao = ctx->Array.VAO;
GLuint i;
- _mesa_update_array_object_max_element(ctx, vao);
+ _mesa_update_vao_max_element(ctx, vao);
printf("Array Object %u\n", vao->Name);
if (vao->_VertexAttrib[VERT_ATTRIB_POS].Enabled)
_mesa_init_varray(struct gl_context *ctx)
{
ctx->Array.DefaultVAO = ctx->Driver.NewArrayObject(ctx, 0);
- _mesa_reference_array_object(ctx, &ctx->Array.VAO,
- ctx->Array.DefaultVAO);
+ _mesa_reference_vao(ctx, &ctx->Array.VAO, ctx->Array.DefaultVAO);
ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */
ctx->Array.Objects = _mesa_NewHashTable();
{
struct gl_vertex_array_object *vao = (struct gl_vertex_array_object *) data;
struct gl_context *ctx = (struct gl_context *) userData;
- _mesa_delete_array_object(ctx, vao);
+ _mesa_delete_vao(ctx, vao);
}
functions->CopyBufferSubData = st_copy_buffer_subdata;
/* For GL_APPLE_vertex_array_object */
- functions->NewArrayObject = _mesa_new_array_object;
- functions->DeleteArrayObject = _mesa_delete_array_object;
+ functions->NewArrayObject = _mesa_new_vao;
+ functions->DeleteArrayObject = _mesa_delete_vao;
}