diff options
Diffstat (limited to 'mesalib/src/mesa/main/attrib.c')
-rw-r--r-- | mesalib/src/mesa/main/attrib.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c index 7b7cf0ef3..004528044 100644 --- a/mesalib/src/mesa/main/attrib.c +++ b/mesalib/src/mesa/main/attrib.c @@ -1433,13 +1433,13 @@ copy_pixelstore(struct gl_context *ctx, #define GL_CLIENT_UNPACK_BIT (1<<21) /** - * Copy gl_array_object from src to dest. + * Copy gl_vertex_array_object from src to dest. * 'dest' must be in an initialized state. */ static void copy_array_object(struct gl_context *ctx, - struct gl_array_object *dest, - struct gl_array_object *src) + struct gl_vertex_array_object *dest, + struct gl_vertex_array_object *src) { GLuint i; @@ -1483,10 +1483,10 @@ copy_array_attrib(struct gl_context *ctx, /* skip RebindArrays */ if (!vbo_deleted) - copy_array_object(ctx, dest->ArrayObj, src->ArrayObj); + copy_array_object(ctx, dest->VAO, src->VAO); /* skip ArrayBufferObj */ - /* skip ElementArrayBufferObj */ + /* skip IndexBufferObj */ } /** @@ -1499,15 +1499,15 @@ save_array_attrib(struct gl_context *ctx, { /* Set the Name, needed for restore, but do never overwrite. * Needs to match value in the object hash. */ - dest->ArrayObj->Name = src->ArrayObj->Name; + dest->VAO->Name = src->VAO->Name; /* And copy all of the rest. */ copy_array_attrib(ctx, dest, src, false); /* Just reference them here */ _mesa_reference_buffer_object(ctx, &dest->ArrayBufferObj, src->ArrayBufferObj); - _mesa_reference_buffer_object(ctx, &dest->ArrayObj->ElementArrayBufferObj, - src->ArrayObj->ElementArrayBufferObj); + _mesa_reference_buffer_object(ctx, &dest->VAO->IndexBufferObj, + src->VAO->IndexBufferObj); } /** @@ -1530,13 +1530,13 @@ restore_array_attrib(struct gl_context *ctx, * The semantics of objects created using APPLE_vertex_array_objects behave * differently. These objects expect to be recreated by pop. Alas. */ - const bool arb_vao = (src->ArrayObj->Name != 0 - && src->ArrayObj->ARBsemantics); + const bool arb_vao = (src->VAO->Name != 0 + && src->VAO->ARBsemantics); - if (arb_vao && !_mesa_IsVertexArray(src->ArrayObj->Name)) + if (arb_vao && !_mesa_IsVertexArray(src->VAO->Name)) return; - _mesa_BindVertexArrayAPPLE(src->ArrayObj->Name); + _mesa_BindVertexArrayAPPLE(src->VAO->Name); /* Restore or recreate the buffer objects by the names ... */ if (!arb_vao @@ -1552,10 +1552,10 @@ restore_array_attrib(struct gl_context *ctx, } if (!arb_vao - || src->ArrayObj->ElementArrayBufferObj->Name == 0 - || _mesa_IsBuffer(src->ArrayObj->ElementArrayBufferObj->Name)) + || src->VAO->IndexBufferObj->Name == 0 + || _mesa_IsBuffer(src->VAO->IndexBufferObj->Name)) _mesa_BindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, - src->ArrayObj->ElementArrayBufferObj->Name); + src->VAO->IndexBufferObj->Name); } /** @@ -1566,15 +1566,15 @@ static bool init_array_attrib_data(struct gl_context *ctx, struct gl_array_attrib *attrib) { - /* Get a non driver gl_array_object. */ - attrib->ArrayObj = CALLOC_STRUCT( gl_array_object ); + /* Get a non driver gl_vertex_array_object. */ + attrib->VAO = CALLOC_STRUCT( gl_vertex_array_object ); - if (attrib->ArrayObj == NULL) { + if (attrib->VAO == NULL) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib"); return false; } - _mesa_initialize_array_object(ctx, attrib->ArrayObj, 0); + _mesa_initialize_vao(ctx, attrib->VAO, 0); return true; } @@ -1589,8 +1589,8 @@ free_array_attrib_data(struct gl_context *ctx, { /* 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->ArrayObj); - attrib->ArrayObj = 0; + _mesa_delete_vao(ctx, attrib->VAO); + attrib->VAO = 0; _mesa_reference_buffer_object(ctx, &attrib->ArrayBufferObj, NULL); } |