Affichage correct des triangles mais pas encore avec les effets de
lumière.
This commit is contained in:
parent
f67a80364a
commit
734ff444b5
|
@ -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;
|
||||
|
|
7
square.c
7
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user