opengl es transparent fog in android

Posted by Sponge on Stack Overflow See other posts from Stack Overflow or by Sponge
Published on 2010-05-22T21:25:32Z Indexed on 2010/05/22 21:31 UTC
Read the original article Hit count: 154

Filed under:
|
|
|

I was wondering why the fog i use in opengl es on my android phone isn't transparent when i set the colors alpha to 0. I set the background to transparent and it works fine and the Color class or the toFloatBuffer() method are working fine for my meshes but when i set the fog color to transparent then this fact is ignored. here is the basic code i use for fog in the onSurfaceCreated() method of my renderer:

gl.glFogf(GL10.GL_FOG_MODE, GL10.GL_LINEAR);
gl.glFogf(GL10.GL_FOG_START, 4.0f);
gl.glFogf(GL10.GL_FOG_END, 10.0f);
gl.glFogfv(GL10.GL_FOG_COLOR, new Color(0,0,0,0).toFloatBuffer());
gl.glEnable(GL10.GL_FOG);

© Stack Overflow or respective owner

Related posts about android

Related posts about opengl-es