NOAH IV

10-17-2003, 04:53 AM

When we call glVertexPointer, will the vertex data be transferred to the card immediatly or wait for some other instruction like glDrawElements?

Lets say we have a vertex array with 500 vertices. And two calls to glDrawElements using different subsets of vertices, lets say 300 and 250.

glVertexPointer(...,...,...,...);

glDrawElements(...,...,...,indices1);

glDrawElements(...,...,...,indices2);

How would this work?

a) 500 vertices will be transferred and the two meshes redered using a subset of this vertices?

b) 300 vertices will be transferred for the fist call of glDrawElements plus 250 for the second call?

c) the same 500 vertices will be transferred two times?

I think (b) is probably the way it works but I'm not confident. And depending on how it works my data structure may change a lot.

Thanks!

Lets say we have a vertex array with 500 vertices. And two calls to glDrawElements using different subsets of vertices, lets say 300 and 250.

glVertexPointer(...,...,...,...);

glDrawElements(...,...,...,indices1);

glDrawElements(...,...,...,indices2);

How would this work?

a) 500 vertices will be transferred and the two meshes redered using a subset of this vertices?

b) 300 vertices will be transferred for the fist call of glDrawElements plus 250 for the second call?

c) the same 500 vertices will be transferred two times?

I think (b) is probably the way it works but I'm not confident. And depending on how it works my data structure may change a lot.

Thanks!