Is it possible to tile only a part of a texture on a quad?
I was following this tutorial.
It works great as long as I start at (0,0) [top left] in the image. I can’t figure out how to modify the code to actually load the texture from point (x, y) [from top left] with a set width/height [repeatX, repeatY].
Everything I’ve tried so far has either been the same as simply following the example, or has tiled the entire texture. It’s probably something simple I am just messing up since I am new, but help is definitely appreciated.
Afaik, there is no way to tile part of a texture using normal opengl commands. Maybe you could do this with shaders?
Hmm, I would have no clue how to do that yet. :D Still a newb pretty much. Though for the moment it's not too critical since stretching works fine when you're trying to slice a texture into regions. You typically do want the north, south, east, west, and center regions stretched while the corners are set the size of the insets.
For now, I'll just force the textures to be stretched and if somebody does know a way to do the tiling with shaders I can always implement it later.