开发者

OpenGL ES glBlendFunc hardware reqs

After trying out开发者_Go百科 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.


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);


For anyone who might be having the same problem: use the openGL constants (GL10.GL_SRC_COLOR, GL10.GL_DST_COLOR) as arguments, and don't assume that they are mapped to the same actual values on all devices.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜