views:

36

answers:

1

After trying out various combinations for the glBlendFunc, I've noticed that most of them have no effect on my phone (HTC Desire) while they work just fine in the emulator. On the phone, only 0+1, 1+0, 1+1 have any visible effect, while all other combinations seem to be ignored. Is this a hardware limitation?

P.S. I'm running my tests on Android 2.2, using Java.

A: 

No, it could be just a driver bug, or a mistake in your code. You haven't mentioned practically anything. Does your framebuffer have an alpha channel? Do your textures also have an alpha channel? Did you try the standard blending func:

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Matias Valdenegro
Well, I first noticed this problem while using the Rokon game engine. So thinking that it might be something particular to it, I put together a very rough openGL test to check - nothing fancy, no textures, just basic colours. The result was the same - blending works as expected in the emulator, but not on the device.
someone_else
Here's the basic testing code:http://nothing.exhalus.net/misc/openGLtest/starter.txthttp://nothing.exhalus.net/misc/openGLtest/openGLrenderer.txthttp://nothing.exhalus.net/misc/openGLtest/customGLSurfaceView.txthttp://nothing.exhalus.net/misc/openGLtest/square.txthttp://nothing.exhalus.net/misc/openGLtest/smoothColoredSquare.txt
someone_else