Textured Triangle Strips?

Started by
2 comments, last by dantheman1337 13 years, 1 month ago
How would I texture a triangle strip? And also, let's say I would like to change texture mid strip, is that possible? If so, could you explain how to accomplish this?

I'm trying to make terrain, which is simple enough, I even made an editor which saves the files and such. However, I don't know how to go about actually applying textures. Once I know how, it should be a breeze.
Advertisement
Lookup 'uv mapping'. Also, you can't change texture in the middle of a strip. Just use multiple draw calls.
[size=2]My Projects:
[size=2]Portfolio Map for Android - Free Visual Portfolio Tracker
[size=2]Electron Flux for Android - Free Puzzle/Logic Game
A single strip is drawn with a single draw-call, so if you want to change any states along the way you need to divide it into two strips. You can still use different textures in the same strip, by binding multiple textures and picking one in the shader, or by using a texture-atlas where changing the texture-coords are enough to pick among multiple sub-textures inside a single larger texture.

Lookup 'uv mapping'. Also, you can't change texture in the middle of a strip. Just use multiple draw calls.



I first read your post, and your method sounds like it would work too, however, Erik's approach seems much easier, and efficient.


A single strip is drawn with a single draw-call, so if you want to change any states along the way you need to divide it into two strips. You can still use different textures in the same strip, by binding multiple textures and picking one in the shader, or by using a texture-atlas where changing the texture-coords are enough to pick among multiple sub-textures inside a single larger texture.



I never would have thought of this. I'll turn it in to a class, much thanks :)

This topic is closed to new replies.

Advertisement