Do forgive me if this has been asked before, I've been looking for the answer to this all day and all I'm coming up with is help with tile based 2D games. x~x
I'm trying to create a skinnable GUI in Direct3D 9, using an XML file that has positions for each element and an option to stretch or tile them. Stretching's a simple enough procedure, but I've been unable to figure out a way to tile a small section of a texture. Traditionally to tile a texture I would just set the UV coordinates to > 1.0, but the source texture coordinates are only going to be a small subset of the whole texture, such as 0.4 to 0.5.
I have a feeling I missed something really obvious, but how would I go about simply tiling instead of stretching? My best guess is it has something to do with having more than one set of texture coordinates, but from there, I'm not sure where to go.
The project currently uses the fixed function pipeline, so I would prefer an answer using that if possible, but I would not turn down an answer that uses a shader if that's the only way.