mokafolio
11-30-2010, 03:19 AM
Hi,
I have one vbo where I would like to use each attribute for two drawn vertices instead of just one, in forward mode, you could simply do it like this:
glVertexAttrib4f(loc, bpos.x, bpos.y, bpos.z, 0.5);
glVertex3f(-1, -1, -1);
glVertex3f(1, 1, 1);
to make sure the attribute gets used for the next two vertices. I don't see any way of doing this with VBOs unless I put each attribute twice into the attribute array. Is there any way to use each element in an attribute array twice?
Thanks
I have one vbo where I would like to use each attribute for two drawn vertices instead of just one, in forward mode, you could simply do it like this:
glVertexAttrib4f(loc, bpos.x, bpos.y, bpos.z, 0.5);
glVertex3f(-1, -1, -1);
glVertex3f(1, 1, 1);
to make sure the attribute gets used for the next two vertices. I don't see any way of doing this with VBOs unless I put each attribute twice into the attribute array. Is there any way to use each element in an attribute array twice?
Thanks