Gestion de la lumiere en openGL

malbackt Messages postés 88 Date d'inscription mardi 25 mars 2008 Statut Membre Dernière intervention 3 juin 2009 - 11 juin 2008 à 20:41
luhtor Messages postés 2023 Date d'inscription mardi 24 septembre 2002 Statut Membre Dernière intervention 28 juillet 2008 - 12 juin 2008 à 20:55
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

1 réponse

luhtor Messages postés 2023 Date d'inscription mardi 24 septembre 2002 Statut Membre Dernière intervention 28 juillet 2008 6
12 juin 2008 à 20:55
0
Rejoignez-nous