glDrawArrays and GL calls in between && redundant points

Hello you all!

Ok, I know hot to make use of glDrawArrays and I do like it.

2 questions I now have:

What, if I have an array wich defines the vertices of a pyramid. That would be 3 coors * 3 vertices * 4 faces = 36 elements in this arrays. glDrawArtrays would perfectly draw my pyramid. Now I want do put a texture on ech side of the pyramid. What to do? would it be wise to use glDrawElements only to draw a triangle? Or is the gain of permoance reduces very much?

My 2nd questions concerns the redundant verteces. Does glDrawElemnts completly eliminate them, even if I specifief them in the array? Or do I have to leave them out in the array?

Thanks a lot,


you can use glTexCoordPointer along with glDrawArrays.

I don’t think it changes performance very much if call GL_TRIANGLES instead, and asign your texture coords to each vertex.

Thanks, Viper

And does anybody know about the redundant-points-question?