PDA

View Full Version : glDrawElements problem



rozz666
07-02-2004, 09:42 AM
I work under WinXP. I have a strange problem. I use glDrawElementas to draw models. It works fine when indices are 0, 1, 2, 3, 4, etc. but when I write them in different order (when two vertices are identical I use only one and write the apropriate index) it renders some weird objects. Does anybody had the same problem or knows what's wrong?

plasmonster
07-02-2004, 12:41 PM
I'm not exactly sure what you mean here. If you're drawing triangles, for example, then you can't just skip identical vertices; you must index all of them. Remember that you are sharing vertices, not indices. For strips, on the other hand, this should be possible, if you're careful about the order.