I want to display 2 spherical transparent background objects.
The small sphere is surrounded by the big one. Each one has a transparent texture. I can display one of the objects, but it flickers when I add the second one. What can I do to get rid of the flickering? This is the relevant code for my Android app:
gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE);
gl.glTexEnvx(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE,
GL10.GL_DECAL);
I have tried with GL_MODULATE, GL_DECAL, GL_BLEND, or GL_REPLACE, but with the same result. I have also tried with gl.glBlendFunc(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA);
in draw method:
float transp = 0.71f;
gl.glColor4f(1f, 1f, 1f, transp);