I'm developing a game for Android with libGDX framework. I have three images - background, foreground and a mask. Here is the rendering code to make part of background image visible on foreground image using mask:
Gdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.enableBlending();
batch.begin();
batch.setBlendFunction(<params1>);
batch.draw(bgTex, bgTexX, bgTexY, bgTexW, bgTexH);
batch.setBlendFunction(<params2>);
batch.draw(mask, maskX, maskY, maskW, maskH);
batch.setBlendFunction(<params3>);
batch.draw(fgTex, fgTexX, fgTexY, fgTexW, fgTexH);
batch.end();
It works well on desktop (ubuntu 12.04) but it doesn't work on any android phone/tablet I tried it on (they all support Opengl Es 2.0). What can be wrong with blending on Android devices?