   Multiple Textures on one Tri Strip
  Hello All,Recently I read an article stating that glBindTexture() can be expensive, so I moved all of my small textures into a large one and I use texture coordinates to draw specific textures. The problem I faced was how to draw these textures on a tri strip. I ended up drawing a degenerate triangle between texture changes so that I could cover the distance between one set of coordinates to the new one. This works, although, people, please tell me if there is a better way. Anyways, I then realized that to tile my textures, I would have to either make degenerate triangles everywhere (pointless and stupid) or render my texture right side up, then upside down, and etc. I don't feel these solutions are quite adequate. Can someone please guide me in the right direction. How do you texture your tri strips with more than one texture? (not to be confused with multitexturing)Thank you,Adam   
  You could just use indexed triangle lists and dispense with the whole mess.   ;  You can use NV_primitive_restart extension to avoid inserting degenerate triangles. Or, just use tri lists. On newer hardware (Geforce6 and up) there is little difference between tri strips and tri lists in terms of performance, in fact tri lists sometimes work better.   ;  I actually thought up an alternative. I think I will stick with the triangle strip, since rendering a degenerate triangle here and their shouldn't harm performance as much as lots of repeated vertex transferring from client to server (OpenGL framework). I decided to store my textures vertically, so that I can use values greater than 1 as the tex coord to repeat the texture rendering correctly, seeing as I only need to tile along the x plane. Then, when my texture changes, I insert a degenerate triangle which covers the distance between textures and then continue rendering happily. Of course, this wouldn't work with a full 3d world, but for my game, I believe this will do it.Opinions on this method? All I'm really using this for is to render 4 triangle strips which cross the screen horizontally, therefore making a plane on which the character can walk. This terrain will have varying height vertices, which stresses the need for a detailed terrain and hence the triangle strip. I want the textures on one strip to be able to change into another texture, let's say, to mark the transition between grassy plains, to cobbled streets.   ;Quote:Original post by AdamGLrendering a degenerate triangle here and their shouldn't harm performance as much as lots of repeated vertex transferring from client to server (OpenGL framework)For some years now, video cards have had memory right on the board that can be used to store such things as vertices. I suggest you use that memory via vertex buffer objects.   ;Quote:Original post by AdamGLOpinions on this method?Honest opinion ? It's stupid. Why would you use a complex, unflexible and slower method to do something that could be easily done in a flexible and usually faster way with indexed triangle lists ?;  Thanks. I'm actually glad for that bit of honesty there. I guess I was looking to over complicate things. Thanks for all of your opinions and answers. I believe I will just go along with a tri list then. Thanks again!Adam   