#### Archived

This topic is now archived and is closed to further replies.

# non-sequential texture coords in a quad strip?

This topic is 6297 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

[as subject] can it be done? or do i have to specifiy 4 vertexes instead to force non-sequential texture mapping? __________________ graham "red" reeves. red@deadpenguin.org www.deadpenguin.org

##### Share on other sites

You can use a technique called triangle stitching to make a discontinuity in a triangle or quad strip, either in position, texture coords or any other vertex params. I''ll talk about triangles if you don''t mind as they''re easier to think about ( for me at least ).

What you do is: as you drawing triangles, send some extra triangles that have the points you''re trying to stich together as degenerate points, ie the same point occurs more that once in a triangle. This gives the triangle a side of zero and so it shouldn''t be drawn, which gives you an opportunity to jump to new positions or texture co-ords.

so you draw the points:

0, 1, 2
1, 2, 2
2, 2, 3
2, 3, 3
3, 3, 4
3, 4, 5

If the points 0, 1, 2, are away from 3, 4, 5 this should draw two independent triangles, inside one glBegin/glEnd loop. Or if points 1 and 2 are at the same position as points 3, 4, but with different texture coords, the effect will be a jump in texture mapping

This *should* work on most/all graphics cards, but it obviously depends on the card not drawing any part of the stitching triangle. They shouldn''t do as the length of one of the sides is zero, but I wouldn''t bet any money that some cards out there would draw some annoying glitches on the screen.

cheers
dan

ps mail me if you want a diagram of this, if my explanation don''t make sense.

Game production:
Good, quick, cheap: Choose two.

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 22
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631766
• Total Posts
3002218
×