Just something that came into my head while messing around with sprite drawing and thinking about making things more efficient and cleaner in the code...
Right now I have a situation where all of my quads (actually 2 triangles) use the same vertex data and texture coordinate data, before being altered per instance in the shader using ModelView matrices and texture offsets passed into the shader.
It seems a bit wasteful (in principle at least, if not actually significant to performance) that I'm having to send new copies of the same 6 vertices every time I want to add another quad to be drawn, but I haven't been able to find anything online about this (can't phrase it the right way when I search maybe) and messing around to try and make it do this has yielded nothing (all I did was add another ModelView matrix and tell glDrawArraysInstanced to draw twice as much, but after that I'm out of ideas).
With only 6 vertices, is it just coming to the end of those 6 and then ending the draw and ignoring the fact there's another ModelView matrix? The ModelView matrix is of course set up using glVertexAttribDivisor.
Though when I think about it... is 1 instance actually defined by the number of "indices" you tell glDraw* to render...? In which case that would make sense... but I still would have no clue how to do what I'm thinking of doing.
Is there some kind of command that tells it to loop so many times or something? Or do you just have to send separate vertex data for every vertex you want to draw, even if it's the same as another vertex already in the buffer?