PDA

View Full Version : create triangle_strip of given polygon



powerpad
05-10-2005, 10:32 PM
I have a given polygon that looks like this ...

/\
/ \
/____\
/| |\
/ | | \
| | | |
| | | |
\ | | /
\|______|/
\ /
\ /
\/does anyone know a simple method to obtain the vertex order that generates a GL_TRIANGLE_STRIP
out of this poly...

I tried it with pen and paper but ended up with one triangle left (and trying all possibilites is nothing I want to go for)

tnx in advance

RigidBody
05-10-2005, 10:44 PM
what about GL_TRIANGLE_FAN, starting at one of the four corners of the rectangle (assuming the polygon is flat)?

powerpad
05-11-2005, 01:41 AM
sorry I forgot to mention that it is not flat the middle quad is the bottom and the rest is closed together to form a roof-like structure.

Until now I have used an indexed vertex list but a triangle strip would increase performs alot.