I am developing a game for Android using OpenGL ES, and until now I’ve using only the folder drawable-hdpi for the textures. My biggest textures are 1024×512.
Which resolutions should I use for folders mdpi and ldpi? Or should I leave just 1 folder?
I am developing a game for Android using OpenGL ES, and until now I’ve
Share
Android’s built-in density bitmap scaling solution isn’t really helpful for GLES applications, and sometimes can even break things (such as the non-power-of-two bitmap scaling). For this reason (and others), libraries like libgdx have their own asset loading infrastructure.
If you want to really keep using bitmap loading from
R.drawable, you should put the images in a drawable-nodpi folder instead, so that no pre-scaling is performed. Otherwise it is a good idea to put it under an assets folder.If you want to do scaling for different screen densities (or more likely screen resolutions), you should do this in your code.