Thursday, March 1, 2012

[android-developers] OpenGL es and min3d - textures only load on certain hardware and how to fix.

Im using min3d to draw 3d boxes and Im applying textures to them in the updateScene method which works great on some devices and on others the textures wont load. Ive tried debugging by turning on the 
glflags but I dont see any errors what so ever. Ive done a lot of reading and googling the past two days on the matter and it looks like theres no real good answer on why opengl would work on one device and not on another.

So far Ive tried making sure the images were in the power of two and that wasnt it. 

The way that Im accessing the images to use as bitmaps is by pulling bitmaps from images that are stored on the devices internal file system. I read in one thread some where that instead of decoding a file to make a bitmap
you could turn the file into a stream and then decode that as a bitmap and that would work but I havent even tried doing that since I spent most of my time trying to debug to find any nullpointers or anything. At first I thought I had found some null textures but they were just textures that hadnt initialized yet.

So as this is a common problem on android I was hoping others could help me out by shedding some light on how they tackled the problem of opengl textures not loading on certain devices. 

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment