Hi,
I’m programming with LibGDX.
I added this code:
float lightColor1[] = {1.0f, 1.0f, 1.0f, 1.0f}; //Color (0.5, 0.2, 0.2)
float lightPos1[] = {-1.0f, 0.5f, 0.5f, 0.0f};
gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_DIFFUSE, lightColor1, 0);
gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_POSITION, lightPos1, 0);
I have two different smartphones. The Light looks different on this two smartphones. I don’t know why?
On the first smartphone the light is weak and on the second smartphone the light is bright.
EDIT:
OK. Now I programmed this:
// Create light components
float ambientLight[] = { 1f, 1f, 1f, 1.0f };
float diffuseLight[] = { 1f, 1f, 1f, 1.0f };
float specularLight[] = { 1f, 1f, 1f, 1.0f };
float position[] = { 0f,0f, 5.0f, 1.0f };
// Assign created components to GL_LIGHT0
gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, ambientLight, 0);
gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, diffuseLight, 0);
gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_SPECULAR, specularLight, 0);
gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, position, 0);
It’s now a little bit better, but on the small smartphone the texture looks brighter.