Try to debug by retrieving the GL error code:

Log.d("GL Error", gl.getErrorCode());

When the value is non-0 then there is an error. You need to identify the GL 
function call causing that error state. You could for example add a logging 
output line after each GL function call like this:

gl.glEnable(GL10.GL_FOG);
Log.d("Enable fog", gl.getErrorCode());
gl.glFogx(GL10.GL_FOG_MODE, GL10.GL_EXP);
Log.d("Set fog mode", gl.getErrorCode());
gl.glFogfv(GL10.GL_FOG_COLOR, fogColorsBuffer);
Log.d("Set fog color", gl.getErrorCode());

If you get a non-0 number you need to look up the meaning of that error 
code.

On Saturday, November 23, 2013 4:29:51 AM UTC-6, MobileVisuals wrote:
>
> It was possible to use fog color according to the OpenGL standard in the 
> previous Android versions, but it no longer works in Jellybean. The color 
> of the fog is no longer seen, all fog just becomes black. What can I do to 
> get the fog colors shown on Jellybean? This is my code:
>
> float[] fogColorsVfa;
> FloatBuffer fogColorsBuffer;
>
> fogColorsBuffer = FloatBuffer.allocate(4 * 4); 
> fogColorsVfa = new float[4];
> fogColorsVfa[0] = 0.5f;//yellow with some alpha
> fogColorsVfa[1] = 1f;
> fogColorsVfa[2] = 1f;
> fogColorsVfa[3] = 0f; 
> fogColorsBuffer.put(fogColorsVfa);
>
>
> gl.glEnable(GL10.GL_FOG);
> gl.glFogx(GL10.GL_FOG_MODE, GL10.GL_EXP);
> gl.glFogfv(GL10.GL_FOG_COLOR, fogColorsBuffer);
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to