I would love to see a function like:
Imagine this, you have a big mesh, which consists of, let’s say 1000 faces, and each face consists of 3 vertices(one triangle), and you want to use VBO’s to render it.
But you also want to pass the data of each face(because each face contains material properties) to your vertex shader.
This is a problem, because you can’t send data to the shader using vertex buffer objects.
So instead you have to use the regular glVertex* functions, to be able to use your shader functionality properly.
This would almost certainly slow down your program, because of that huge performance penalty.
So I would suggest to have a function like:
which is called after every x elements of the glVertexPointer buffer.

Maybe I misunderstood something, but isn’t that exactly what glVertexAttribPointer already in the API is doing?

Huh? There is a already glVertexAttribPointer…

GL 2.0 spec, Chapter 2.8 (page 24):

void VertexAttribPointer( uint index, int size, enum type,
boolean normalized, sizei stride, const
void *pointer );

There already is?
My bad, sorry :slight_smile:
I’m not really fermilia with the new 2.0 functions(I have the OpenGL programming guide 1.4 here).
I should have done more research.
Again sorry :slight_smile:

He means instancing :slight_smile:

What he wants is sending attributes in with a constant frequency (like every three vertices). Nvidia has an exention for it (like NVX_instanced_array or something) but there are no specs yet.

VertexAttribPointer is the same as normal *Pointer functions, only for generic attributes.