LibGDX repeating TextureRegion
libgdx, opengl-es, repeat, textures
Solution
If you're using a `TextureRegion`, you can use a TiledDrawable like so:
TiledDrawable tile = new TiledDrawable(textureRegion);
tile.draw(spriteBatcher, x, y, width, height);
Problem
I am using LibGDX for a project, and I am trying to tile/repeat a texture across a specific amount of space. At the moment I am using a TextureRegion set to the proper size, and any extra space off of the texture is being filled as you would expect in OpenGL using "Clamp To Edge". I figured there would be an easy way to change this behavior to the "Repeat" mode, however I cannot seem to find a way to make that work, despite it seeming like something that should be fairly easy to change. So, basically, is there a simple way to repeat an image in a set area using LibGDX, short of having to manually build it by repeating the texture myself in some form of loop?