Results 1 to 4 of 4

Thread: triangle strip winding

  1. #1
    Junior Member Newbie
    Join Date
    May 2003
    Posts
    8

    triangle strip winding

    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)

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: triangle strip winding

    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).]

  3. #3
    Junior Member Newbie
    Join Date
    May 2003
    Posts
    8

    Re: triangle strip winding

    Nice and simple. 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?

    Thanks,

    [This message has been edited by atnak (edited 05-15-2003).]

  4. #4
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: triangle strip winding

    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.

Similar Threads

  1. Triangle Strip - Per Triangle color
    By Aliii in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-27-2013, 10:14 AM
  2. VBO Triangle Strip
    By Jeffg in forum OpenGL: Basic Coding
    Replies: 14
    Last Post: 01-08-2011, 10:01 AM
  3. triangle strip with a LINE triangle display error
    By Samme in forum OpenGL: Windows
    Replies: 22
    Last Post: 11-20-2008, 07:50 PM
  4. Triangle Strip!
    By golgoth13 in forum OpenGL: Basic Coding
    Replies: 14
    Last Post: 03-08-2006, 06:14 AM
  5. triangle winding.
    By Dixie Dude in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-22-2003, 02:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean