ANDROID: OpenGL White Screen Weirdness

For some reason the G1 was displaying a white screen in GLSurfaceView when the NexusOne was displaying images just fine.

Note that my GLSurfaceView is initialized to be ARGB 8888 with DEPTH BUFFER 16
Also, it is set with pixelformat.Translucent

Turns out, this is caused by texture loading, not the EGL. textures in GLES 1.0 needs to be in powers of 2! NexusOne solves that issue by using GLES 2.0, without letting the users know about it.

So, convert your bitmaps to powers of 2, before using the GLUtils method to create your textures!!!

3 comments:

Anonymous said...

thank you. Just ran into this into problem.

Darren said...

This was helpful - I had a similar problem on my Samsung Galaxy S. My app was making sounds but the screen was completely white. Having worked on all the emulators.

When I changed all my textures so that they had dimensions that were exact powers of two all my graphics appeared.

Thanks for the tip.

$iriu$34 said...

Excuse me, i have the same problem, but how can i convert my bitmaps to powers of 2?

Thank's