View Full Version : triangle strip winding
05-15-2003, 07:58 AM
How do I reverse the winding of an even vertex triangle strip? I need to draw two exact triangle strips in the same place with back-face culling, (one strip with reverse winding and reverse normals). I want to keep the FrontFace() and CullFace() on all my polygons consistent incase I need to globally change it for all objects in one go. (e.g, For reflections/shadows)
05-15-2003, 08:36 AM
Add a null triangle before it, that is: instead of indices 0, 1, 2, 3 send 0, 0, 1, 2, 3.
[This message has been edited by Relic (edited 05-15-2003).]
05-15-2003, 10:11 AM
Nice and simple. http://www.opengl.org/discussion_boards/ubb/smile.gif Is this a feature that's supported by all the OpenGL primitives or is it a trick that only works with triangle strips?
Also, will the normal/colour properties of the null triangle affect smooth shading?
[This message has been edited by atnak (edited 05-15-2003).]
05-16-2003, 02:35 AM
The null triangle does not generate any fragments. It has zero area after all. The following triangles have no knowledge of the first. The only difference is the winding and the additional vertex in front of the strip.
This won't work with other primitives because none except triangle strips has this CCW-CW winding toggle on consecutive sub-primitives.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.