I set these lightvalues…and then o draw a sphere…I wonder why my shere is blue and not red?
private float[] lightDiffuse = {0.7f, 0.7f, 0.7f, 1f};
private float[] lightAmbient = {1f, 1f, 1f, 1f};
private float[] lightPosition = {50f, 50f, 50f, 1f};
gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, lightDiffuse, 0);
gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, lightAmbient, 0);
gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, lightPosition, 0);
gl.glEnable(GL.GL_LIGHT0);
gl.glEnable(GL.GL_LIGHTING);
private float[] matDiffCol = { 1f, 1f, 1f, 1f };
private float[] matAmbCol = {1f, 0f, 0f, 1f}; <---- blue? why not red?
gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT, matAmbCol, 1);
gl.glMaterialfv(GL.GL_FRONT, GL.GL_DIFFUSE, matDiffCol, 1);
is there anything wrong with this code?
thx