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.
Textured Triangle Strips?
Lookup 'uv mapping'. Also, you can't change texture in the middle of a strip. Just use multiple draw calls.
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
Popular Topics
Advertisement