Hi,

if you go:

EnableTexturePointer()

EnableVertexPointer()

setvertexpointer(vert)

settexpointer(tex)

glDrawElements(…, indices);

do vert and tex have to be the same number of elements?

Thanks

P.S. I know its not proper syntax

Hi,

if you go:

EnableTexturePointer()

EnableVertexPointer()

setvertexpointer(vert)

settexpointer(tex)

glDrawElements(…, indices);

do vert and tex have to be the same number of elements?

Thanks

P.S. I know its not proper syntax

I believe you can use different sizes but when it come to use them, they SHOULD be the same size !

Say you have 6 vertices and 6 texture coords. You can draw the triangle formed by v1,v2,v3 by passing 1,2,3 for your indices to glDrawElements. The function will then take t1,t2,t3 for your texcoords.

Now imagine you have 6 vertices and 3 texcoords and you want to draw the triangle formed by v4,v5,v6. The function will try to use texcoords t4,t5 and t6 ! In this case, I believe you might meet a giant bug in your program !!!

Well, anyway, why would you have different sizes ??? If you have more elements in one of your arrays, it simply means that your array is too big and that you could be able to save memory !!!

Regards.

Eric