I'm getting some strange results when enabling ambient lights in
openGL. After some experiments, I determined that for some reason, the
ambient light color is multiplied by 0.2f. That is, setting an ambient
light of color ( 5.0f, 0.0f, 0.0f, 1.0f ) is needed to get a pure red
ambient, not the expected ( 1.0f, 0.0f, 0.0f, 1.0f ), which yields a
dark red ambient.
I even tried setting the ambient light model :
float full[] = { 1.0f, 1.0f, 1.0f, 1.0f };
gl.glLightModelfv(GL10.GL_LIGHT_MODEL_AMBIENT, full, 0);
But that makes no difference.
Note that the diffuse component does not suffer from this 0.2f factor,
only the ambient.
Notice that all the default values in openGL for ambient-related stuff
is 0.2f, so I don't think this is a coincidence. Is there another
openGL function I should be calling to set a global factor ?
Thanks,
Patrick.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---