• Create Account

Banner advertising on our site currently available from just \$5!

# Polygons: clockwise or counterclockwise

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1Aliii  Members   -  Reputation: 1448

Like
0Likes
Like

Posted 18 May 2013 - 03:45 PM

In OpenGL the "default direction" for triangles is CCW. Makes sense. However, ...is there a standard direction like that for line-strips/polygons? .....I have polygons that are built up from many triangles. It feels more natural to have the points of the line-strip ordered clockwise but I wanted to know if theres a standard for that or it doesnt matter.

### #2phil_t  Crossbones+   -  Reputation: 4856

Like
0Likes
Like

Posted 18 May 2013 - 04:48 PM

Winding order is used for culling backfaces. So that's why there needs to be an established convention. But you need at least 3 vertices to do that (to calculate a normal that indicates whether something faces in or out of the screen), so it doesn't really make sense for lines.

### #3Aliii  Members   -  Reputation: 1448

Like
0Likes
Like

Posted 18 May 2013 - 05:19 PM

Thanks. I was not precise. ....my English. I draw a polygon with the mouse. Which is practically a closed polyline/line-strip. Sometimes I need to reorder the points so the polygon is always "drawn" the same direction. (I dont draw the polygon directly, I build it up from triangles. The triangles are drawn CCW.) Should the points of the polygon ordered CW or CCW?

### #4phil_t  Crossbones+   -  Reputation: 4856

Like
0Likes
Like

Posted 18 May 2013 - 05:26 PM

My point was that it doesn't matter.

### #5Zaoshi Kaba  Crossbones+   -  Reputation: 5025

Like
0Likes
Like

Posted 18 May 2013 - 11:46 PM

Hardware can handle both, CW and CCW. If you're drawing triangles with mouse and having problems with backfacing you could render both sides.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS