Archived

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

Eber Kain

Tiled textures on a triangle strip?

Recommended Posts

How can you do textured tiles on a triangle strip? All ive come up with was multitextureing, and alternateing the texture coords for each 2 triangles that are drawn? I also thought of a way to do it without multitextureing, but it would require makeing the textures flip back and forth, and that would make mapping the right texture difficult, and would also make the texture look more pronounced(makeing the slightest patterns stand out)? I could also do it with 2 textures, the exact same except they were mirrored. then that sucks up more of the finite texture memory? Multitextureing sounds the best performance wise, but its going to be complicated to code, and even then if a users card dosent have that abbilitie then I would have to limit them from useing triangle strips. I want my project to give the user the choice of drawing plain polys, strips, or with vertex arrays. (display lists wont work cause the polys need to be doformable). Any other ideas on how to do this?

Share this post


Link to post
Share on other sites
what you do is assign texture coordinates greater than 1.0. Let me demonstrate with ascii art:

0,1 1,1 2,1 3,1 4,1
0,0 1,0 2,0 3,0 4,0 ... and so on

then the texture will repeat, assuming you havent used GL_CLAMP

Share this post


Link to post
Share on other sites