I understand that when using OpenGL 2.0 and libGDX my texture images have to be of a power of two. This is stated on this page https://github.com/libgdx/libgdx/wiki/Textures,-textureregion-and-spritebatch.
One thing that I cannot understand is that this is not always true. I am creating an app that has a splash screen and the texture that I use is loaded directly in the class declaration (the Screen) like below;
private TextureRegion textureRegion = new TextureRegion(
new Texture(Gdx.files.internal("images/splashLogo.png"))
);
This image has dimensions of 133 x 23 which obviously are not powers of two; but, all is fine.
In my game I am using the AssetManager to load textures etc into my game, but I have found that the textures I use have to be of size ^2 such as 128x32, 512x512 etc or they do not work?
An example set of textures from my asset manager is below;
shapes = TextureRegion.split(Assets.assetManager.get("images/shapeSprite.png", Texture.class), 64, 64);
for (TextureRegion[] shapeSet: shapes) {
for (TextureRegion shape: shapeSet) {
shape.flip(false, true);
}
}
The texture is 512x512 and if it is not then the textureRegion does not display.
Why is there a difference in some textures having to be powers of two in size and some others do not?