2

I use the following code to create mipmaps in my android app

gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_GENERATE_MIPMAP, GL11.GL_TRUE);  

It works with most of my .png files, but some of them aren't loaded properly (appear as blank white textures) unless I turn off mipmapping. This is on 128 X 128 textures that are all saved as .png in adobe photoshop v 12.0

The textures that work always seem to have a relatively larger file size than the ones that don't, so I'm wondering if it sometimes uses some newer compression that isn't supported by android, and if so how do I turn it off. This is very frustrating and any help would be very appreciated.

PS I'm using a motorola atrix to test the app

Nam5hub
  • 21
  • 3
  • The source of the PNGs that you are saving from shouldn't matter as far as I know. Android treats all PNG extensions as uncompressed. – Jay Snayder Jun 07 '13 at 20:00
  • Yes I believe you are right, since I decided to just build the mip chain manually the GL10 way and it worked. So that's my best advice to anyone else who has this issue. This is still an annoying work-around, and if anyone could explain to me why some pngs won't work with GL11.GL_GENERATE_MIPMAP I'd appreciate it. (all pngs are powers of two and and saved as 32 bit/non-interlaced). – Nam5hub Jun 10 '13 at 20:59

0 Answers0