ok, i have the same under linux & windows now
but a wierd thing is, once the lights are set, i can’t change them :
i tried modifiying the lights parameters from a widget, the next method is called, but i see no effect on the scene
public void setLight(GL gl)
{
System.out.println("Ambient "+lightAmbient+ " specular "+lightSpecular+" diffuse "+lightDiffuse+" materialShininess "+materialShininess);
gl.glDisable(GL.GL_LIGHTING);
gl.glDisable(GL.GL_LIGHT0);
gl.glDisable(GL.GL_COLOR_MATERIAL);
gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, new float[]{lightAmbient,lightAmbient,lightAmbient}, 0); // Setup The Ambient Light
gl.glLightfv(GL.GL_LIGHT0, GL.GL_SPECULAR, new float[]{lightSpecular,lightSpecular,lightSpecular}, 0); // Setup The Specular Light
gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, new float[]{lightDiffuse,lightDiffuse,lightDiffuse}, 0); // Setup The Diffuse Light
gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, lightPosition, 0); // Position The Light
float specularReflection[] = {1, 1, 1, 1};
gl.glMaterialfv(GL.GL_FRONT, GL.GL_SPECULAR, specularReflection, 0);
gl.glMateriali(GL.GL_FRONT, GL.GL_SHININESS, materialShininess);
gl.glEnable(GL.GL_COLOR_MATERIAL);
gl.glEnable(GL.GL_LIGHTING);
gl.glEnable(GL.GL_LIGHT0);
gl.glEnable(GL.GL_NORMALIZE);
}
is it only possible the set the light parameters once ? or within a given block ?