I’m having trouble with loading textures regarding their resolution on openGL for Android. If the texture is 256×256 everything works perfectly, but if it’s other resolution, the program throws this exception on start:
android.content.res.Resources$NotFoundException: Resource ID #0x……..
I found a code on the internet that changes the density of the bitmap this way:
BitmapFactory.Options options = new BitmapFactory.Options();
options.inDensity = 240;
and by doing this, I can load 512×512 textures. But I’m not able to load for example 128×128 bitmaps, because I don’t know which density I have to use. I’m not sure either that this is the normal procedure to load textures, because I don’t found many information on the internet.
Thank you for reading!
If anyone has this problem, or the textures show up messed up (like ones being another, or other weird things) I was able to solve it by deleting all the items on the “drawable” folder and putting them in again. It seems the pointers to the images were corrupted or something.