};
-static GLuint
-attr_size(const struct gl_array_attributes *attrib)
-{
- return attrib->Size * _mesa_sizeof_type(attrib->Type);
-}
-
-
/**
* Shallow copy one vertex array to another.
*/
const GLubyte *ptr = _mesa_vertex_attrib_address(attrib, binding);
printf(" array %d at %p:\n", j, (void*) &arrays[j]);
printf(" ptr %p, size %d, type 0x%x, stride %d\n",
- ptr, attrib->Size, attrib->Type, binding->Stride);
+ ptr, attrib->Format.Size, attrib->Format.Type, binding->Stride);
if (0) {
GLint k = prims[i].start + prims[i].count - 1;
GLfloat *last = (GLfloat *) (ptr + binding->Stride * k);
GL_TRUE,
0,
copy->dstbuf_nr - 1,
- NULL, 0, NULL);
+ 1,
+ 0,
+ NULL, 0);
/* Reset all pointers:
*/
prim->mode = mode;
prim->begin = begin_flag;
- prim->num_instances = 1;
}
csr += copy->varying[i].size;
#ifdef NAN_CHECK
- if (srcarray->Type == GL_FLOAT) {
+ if (srcarray->Format.Type == GL_FLOAT) {
GLuint k;
GLfloat *f = (GLfloat *) srcptr;
for (k = 0; k < srcarray->Size; k++) {
copy->varying[j].attr = i;
copy->varying[j].array = ©->array[i];
- copy->varying[j].size = attr_size(attrib);
- copy->vertex_size += attr_size(attrib);
+ copy->varying[j].size = attrib->Format._ElementSize;
+ copy->vertex_size += attrib->Format._ElementSize;
if (_mesa_is_bufferobj(vbo) &&
!_mesa_bufferobj_mapped(vbo, MAP_INTERNAL))
struct gl_vertex_buffer_binding *dstbind = ©->varying[i].dstbinding;
struct gl_array_attributes *dstattr = ©->varying[i].dstattribs;
- dstattr->Size = srcattr->Size;
- dstattr->Type = srcattr->Type;
- dstattr->Format = GL_RGBA;
- dstbind->Stride = copy->vertex_size;
+ dstattr->Format = srcattr->Format;
dstattr->Ptr = copy->dstbuf + offset;
- dstattr->Normalized = srcattr->Normalized;
- dstattr->Integer = srcattr->Integer;
- dstattr->Doubles = srcattr->Doubles;
+ dstbind->Stride = copy->vertex_size;
dstbind->BufferObj = ctx->Shared->NullBufferObj;
- dstattr->_ElementSize = srcattr->_ElementSize;
dst->BufferBinding = dstbind;
dst->VertexAttrib = dstattr;