White textures problem

Problems with Canvas, OpenGL, etc...

White textures problem

Postby Bira » Sat Sep 11, 2010 6:42 pm

Hi all.

I'm having a problem with a user seeing white squares instead of what should be my game objects. Although I already know that this could be a number of things... one I am sure it is not is a power of two problem (all my textures are power of two and work fine on my test device, a xperia X10). The device that has this problem is a HTC MyTouch.

My greater problem here is finding what the problem is... This only report I have is not very detailed. If anyone could have a clue of what could it be (I'm guessing opengl1.1 or max texture size) please advice.

Also... if you have a MyTouch and wish to help, you could download my game and tell me more about this problem (if all is white or if there is some textures to be seen)... that would be great. (It's a free app, no ads yet) GameHall (Reversi Game).

Thanks
Bira
Freshman
Freshman
 
Posts: 7
Joined: Sat Sep 11, 2010 6:16 pm

Top

Re: White textures problem

Postby moblcade.com » Mon Sep 13, 2010 4:49 pm

Are you having the same results in both the emulator and on the actual device?

Could you post your OpenGL setup code, the code you run at the beginning of each frame and the code you run before rendering your textured geometry?
moblcade.com
Junior Developer
Junior Developer
 
Posts: 19
Joined: Tue Sep 07, 2010 6:31 pm

Re: White textures problem

Postby Bira » Mon Sep 13, 2010 5:23 pm

It works fine on the emulator
It works fine on my xperia X10
It doesn't work on the MyTouch

I will check and try to post some relevant code when I get home later today :)
Please note that since this error is from a comment on my app page I have no idea what it looks like.. Aside from there should be white textures being shown :p

I would already be totally satisfied by a decent error report from a MyTouch user though :)
Bira
Freshman
Freshman
 
Posts: 7
Joined: Sat Sep 11, 2010 6:16 pm

Re: White textures problem

Postby mark@project8games.com » Tue Sep 14, 2010 6:56 am

Bira, I can confirm this behavior on the HTC G1 (its also an MSM7200 phone, so it makes sense that it would happen on both).

Phone is also running 1.6.

There's nothing really of value that I can see in the logs. Honestly it looks like a when you try to load a non-power of two texture (in my experience), or at least it behaves exactly the same. None of the textures are visible. Attached is the DDMS screen shot of the actual device running your app.
Attachments
device.png
device.png (7.31 KiB) Viewed 1507 times
User avatar
mark@project8games.com
Developer
Developer
 
Posts: 41
Joined: Tue Mar 02, 2010 8:33 pm

Re: White textures problem

Postby Bira » Tue Sep 14, 2010 8:45 am

Hey... thanks a lot for that :)

My textures are all powers of two... and my device is 1.6 also.
I will try to investigate it further... I'm guessing it maybe an opengl 1.0 issue. I will review my code again tomorrow.

thanks again
Bira
Freshman
Freshman
 
Posts: 7
Joined: Sat Sep 11, 2010 6:16 pm

Re: White textures problem

Postby Bira » Thu Sep 16, 2010 12:42 am

I think I might have found the problem.

It seems that the problem was on the mipmap creation... I'm not 100% sure although I had the same effect of the screenshot by messing on the mipmaps from my code.

Can someone test my app on a MyTouch or HTC G1 again so I can confirm this? Thanks!
Bira
Freshman
Freshman
 
Posts: 7
Joined: Sat Sep 11, 2010 6:16 pm

Top

Re: White textures problem

Postby Bira » Fri Sep 17, 2010 12:15 am

Someone told me his device (a MyTouch) was showing the textures properly now. I will consider this fixed.

For future references, my problem was probably an unsupported opengl1.1 mipmap creation function or not taking into account textures larger than gl_max_texture_size

thanks
Bira
Freshman
Freshman
 
Posts: 7
Joined: Sat Sep 11, 2010 6:16 pm

Re: White textures problem

Postby AshMcConnell » Wed May 25, 2011 4:12 pm

Hi Bira,

Sorry to resurrect an old post, but I'm having a similar problem with the game I just released ( Booger ) . I'm getting white textures on a friend's HTC wildfire and on a Hero.

Do you remember what exactly you had to change to get it to work?

Thanks for your help!
All the best,
Ash
AshMcConnell
Freshman
Freshman
 
Posts: 4
Joined: Sat Apr 09, 2011 5:48 pm
Location: Northern Ireland

Re: White textures problem

Postby bxm » Sun May 29, 2011 2:12 am

I ran into a similar issue when trying to change the blending setting from GL_MODULATE on my glTexEnv call. Check what you are using there and see if changing it improves anything. I'd also double check that GL_TEXTURE_2D is not disabled somewhere accidentally, or is never enabled and is assumed to be the default on all devices.
bxm
Junior Developer
Junior Developer
 
Posts: 24
Joined: Tue May 10, 2011 2:51 am

Re: White textures problem

Postby badbud » Mon Jun 13, 2011 11:31 am

If you load your texture images from resources, be careful to put them into drawable-nodpi folder. If you don't, android has a habit of automatically resizing textures when it thinks your screen is another dpi than the folder, where you put your images says. The result is non power of two texture dimensions and white output.
User avatar
badbud
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Jun 13, 2011 11:23 am
Location: Moscow

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 4 guests