www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 734ff444b5d84c084d1a33d7793fd0990bf3361e
parent f67a80364af1c088d4507c32442ea0d40a6a409e
Author: Yoann <yoann.b87@voila.fr>
Date:   Tue, 11 Oct 2011 09:13:45 +0200

Affichage correct des triangles mais pas encore avec les effets de
lumière.

Diffstat:
Mdisplay.h | 4++--
Msquare.c | 7+++++--
2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/display.h b/display.h @@ -21,11 +21,11 @@ int nbVertex = 0; float xCamera = 100; float yCamera = 500; -float zCamera = 1500; +float zCamera = 3000; int xSight = 100; int ySight = -500; -int zSight = -1500; +int zSight = -3000; float xAngle = 0; float yAngle = 0; diff --git a/square.c b/square.c @@ -222,6 +222,7 @@ void QT_enumerate(QTNode* first) { for (n = first; n != NULL; n = n->nextNode) { qtnode_print(n); glBegin(GL_TRIANGLE_FAN); + glNormal3f(0,1,0); // envoyer le vertex central (void)(n->center); @@ -237,15 +238,17 @@ void QT_enumerate(QTNode* first) { //(void)(v); } } - glEnd(); + // Nécessaire ssi on fait un TRIANGLE_FAN et qu'on ne peut pas lui dire de fermer la boucle. // On renvoie le 1er vertex du bord : (void)(n->vertices[QT_NO]); + glVertex3f(n->vertices[QT_NO]->x,n->vertices[QT_NO]->y,n->vertices[QT_NO]->z); + glEnd(); } } QTNode* QT_example() { QTNode* q = QT_baseNode(); - //QT_split(q); + QT_split(q); return q; }