[android-developers] Re: OpenGL texture display properly on my phone. But 'white box' on some device?

2011-03-20 Thread Kakyoin
Hi. Sorry for taking so long to get back to you. It works now. =) The problem here is the alpha. I tried setting the alpha to 1.0 instead of 0.0 and it works. //solution gl.glColor4f(0.0f, 0.0f, 0.0f, 1.0f); Also thank you for the tips about drawable-nodpi/debugging the actual bitmap after

Re: [android-developers] Re: OpenGL texture display properly on my phone. But 'white box' on some device?

2011-03-18 Thread Terje Olsen
It seems like you are setting color to be completely transparent. Try setting alpha to 1.0 instead of 0.0? Also make sure that depth to -9 is visible. Quickly test with -1 for example. 17. mars. 2011 21.23 Robert Green rbgrn@gmail.com: Debug the actual bitmap dimensions after you decode it.

[android-developers] Re: OpenGL texture display properly on my phone. But 'white box' on some device?

2011-03-17 Thread Kakyoin
*** Update *** Today I just updated my Motorola Milestone to Android 2.2 and this bug is now happening on my device !! The texture was displaying fine when my Milestone was Android 2.1 yesterday. I hope this piece of info will greatly help solving this problem. -- You received this message

[android-developers] Re: OpenGL texture display properly on my phone. But 'white box' on some device?

2011-03-17 Thread Robert Green
Debug the actual bitmap dimensions after you decode it. It could be getting scaled if you don't have it in drawable-nodpi. I also remember something about clamp vs repeat with non-square power- of-two textures on some chips, but that may be for something else. I see you're not using mips here

[android-developers] Re: OpenGL texture display properly on my phone. But 'white box' on some device?

2011-03-17 Thread String
Looking at your code, it appears that the source image is in res/raw, which is a good practice for textures. It should insure that they don't prescale. Nonetheless, Robert's advice is good: debug into it and check the actual dimensions. In my experience, non-power-of-two dimensions is almost

[android-developers] Re: OpenGL texture display properly on my phone. But 'white box' on some device?

2011-03-17 Thread Robert Green
It's usually either NPOT or not handling texture IDs and bindings correctly :) I've seen code where people made their own texture IDs incrementally as they didn't know to use glGenTextures - and it works on many drivers but certainly breaks on some. On Mar 17, 2:25 pm, String