struct {
GLuint attr;
GLuint size;
+ const struct gl_vertex_array *array;
const GLubyte *src_ptr;
struct gl_vertex_buffer_binding dstbinding;
GLuint i;
for (i = 0; i < copy->nr_varying; i++) {
- const struct gl_vertex_array *srcarray = ©->array[i];
+ const struct gl_vertex_array *srcarray = copy->varying[i].array;
const struct gl_vertex_buffer_binding* srcbinding
= srcarray->BufferBinding;
const GLubyte *srcptr
GLuint j = copy->nr_varying++;
copy->varying[j].attr = i;
+ copy->varying[j].array = ©->array[i];
copy->varying[j].size = attr_size(attrib);
copy->vertex_size += attr_size(attrib);
/* Setup new vertex arrays to point into the output buffer:
*/
for (offset = 0, i = 0; i < copy->nr_varying; i++) {
- const struct gl_vertex_array *src = ©->array[i];
+ const struct gl_vertex_array *src = copy->varying[i].array;
const struct gl_array_attributes *srcattr = src->VertexAttrib;
struct gl_vertex_array *dst = ©->dstarray[i];
struct gl_vertex_buffer_binding *dstbind = ©->varying[i].dstbinding;
/* Unmap VBO's */
for (i = 0; i < copy->nr_varying; i++) {
struct gl_buffer_object *vbo =
- copy->array[i].BufferBinding->BufferObj;
+ copy->varying[i].array->BufferBinding->BufferObj;
if (_mesa_is_bufferobj(vbo) && _mesa_bufferobj_mapped(vbo, MAP_INTERNAL))
ctx->Driver.UnmapBuffer(ctx, vbo, MAP_INTERNAL);
}