Using triangle fan for multiple columns

Started by Fool Running, August 24, 2007, 19:27:30

Previous topic - Next topic

Fool Running

I know that triangle fans are much more efficient then drawing individual triangles...
I'm drawing triangles that are laid out like:
-----------
|   /|   /|
|1 / |5 / |
| /  | /  |
|/ 2 |/ 6 |
-----------
|   /|   /|
|3 / |7 / |
| /  | /  |
|/ 4 |/ 8 |
-----------

I can't figure out how to draw the second column (starting with triangle 5) without starting a new triangle strip. This means that I can't store them in a VBO or in an element array for faster drawing.
I assume I'm missing how to do this (although I've looked at many tutorials ::) ) and need some help ;D
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

Matthias

Well - they used to be much more efficient. It's better to use indexed triangles and optimize their order.
See http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html

It's much more efficient to reduce the number of draw calls. But then you could also use degenerates to stitch them together.

Ciao Matthias

Fool Running

Guess I need to get newer OpenGL books :-\

Thanks ;D
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D