View Full Version : glDrawArrays and GL calls in between && redundant points

02-01-2001, 01:20 PM
Hello you all!

Ok, I know hot to make use of glDrawArrays and I do like it. http://www.opengl.org/discussion_boards/ubb/smile.gif

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,


02-02-2001, 02:19 AM
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.

02-02-2001, 02:52 PM
Thanks, Viper http://www.opengl.org/discussion_boards/ubb/smile.gif

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