Bonsoir à tous;
J'ai un tout petit code en opengl et je voudrais bien comprendre la gestion de la lumière:
GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f };
GLfloat LightDiffuse[]= { 1.0f, 1.0f, 1.0f, 1.0f };
GLfloat LightPosition[]= { 2.0f, 2.0f, 2.0f, 1.0f };
glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient); // Setup The Ambient Light
glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse); // Setup The Diffuse Light
glLightfv(GL_LIGHT1, GL_POSITION,LightPosition); // Position The Light
j'aimerai bien savoir comment fonctionne ces fonctions.
Et aussi à quoi sert le paramètre GL_PROJECTION.
merci d'avance

cordialement malbackt