ok… i started with gl some time ago and now, i’ve got a crazy idea to put some lighting to my code…
so i tried and it won’t work! (what a surprise )… just everything seems to be black and white
i tried to set up ligting using this code (stolen from nehe)
GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 0.1f };
GLfloat LightDiffuse[]= { 1.0f, 1.0f, 1.0f, 0.1f };
GLfloat LightPosition[]= { -10.0f, 0.0f, -3.0f, 1.0f };
GLfloat SceneAmbient[]= { 0.7f, 0.7f, 0.7f, 0.5f };
glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient);
glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse);
glLightfv(GL_LIGHT1, GL_POSITION, LightPosition);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, SceneAmbient);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT1);
what’s wrong or what’s missing?.. i’m sure normal vectors are good… i’m lost, i need your help…