//////////////////////////////////////////// /// Face /// //////////////////////////////////////////// //////////////////////////////////////////// /// Face bleu /// //////////////////////////////////////////// glBegin(GL_QUADS); glColor3ub(0,0,255); // Haut/Gauche glVertex3d(-1.5,1.5,1.5); glVertex3d(-0.5,1.5,1.5); glVertex3d(-0.5,1.5,0.5); glVertex3d(-1.5,1.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,0,255); // Haut/Milieu glVertex3d(-1.5,1.5,0.5); glVertex3d(-0.5,1.5,0.5); glVertex3d(-0.5,1.5,-0.5); glVertex3d(-1.5,1.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,0,255); // Haut/Droite glVertex3d(-1.5,1.5,-0.5); glVertex3d(-0.5,1.5,-0.5); glVertex3d(-0.5,1.5,-1.5); glVertex3d(-1.5,1.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,0,255); // Milieu/Gauche glVertex3d(-0.5,1.5,1.5); glVertex3d(0.5,1.5,1.5); glVertex3d(0.5,1.5,0.5); glVertex3d(-0.5,1.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,0,255); // Milieu/Milieu glVertex3d(-0.5,1.5,0.5); glVertex3d(0.5,1.5,0.5); glVertex3d(0.5,1.5,-0.5); glVertex3d(-1.5,1.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,0,255); // Milieu/Droite glVertex3d(-0.5,1.5,-0.5); glVertex3d(0.5,1.5,-0.5); glVertex3d(0.5,1.5,-1.5); glVertex3d(-0.5,1.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,0,255); // Bas/Gauche glVertex3d(0.5,1.5,1.5); glVertex3d(1.5,1.5,1.5); glVertex3d(1.5,1.5,0.5); glVertex3d(0.5,1.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,0,255); // Bas/Milieu glVertex3d(0.5,1.5,0.5); glVertex3d(1.5,1.5,0.5); glVertex3d(1.5,1.5,-0.5); glVertex3d(0.5,1.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,0,255); // Bas/Droite glVertex3d(0.5,1.5,-0.5); glVertex3d(1.5,1.5,-0.5); glVertex3d(1.5,1.5,-1.5); glVertex3d(0.5,1.5,-1.5); glEnd(); //////////////////////////////////////////// /// Face orange /// //////////////////////////////////////////// glBegin(GL_QUADS); glColor3ub(255,128,0); // Haut/Gauche glVertex3d(1.5,1.5,1.5); glVertex3d(1.5,0.5,1.5); glVertex3d(1.5,0.5,0.5); glVertex3d(1.5,1.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,128,0); // Haut/Milieu glVertex3d(1.5,1.5,0.5); glVertex3d(1.5,0.5,0.5); glVertex3d(1.5,0.5,-0.5); glVertex3d(1.5,1.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,128,0); // Haut/Droite glVertex3d(1.5,1.5,-0.5); glVertex3d(1.5,0.5,-0.5); glVertex3d(1.5,0.5,-1.5); glVertex3d(1.5,1.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,128,0); // Milieu/Gauche glVertex3d(1.5,0.5,1.5); glVertex3d(1.5,-0.5,1.5); glVertex3d(1.5,-0.5,0.5); glVertex3d(1.5,0.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,128,0); // Milieu/Milieu glVertex3d(1.5,0.5,0.5); glVertex3d(1.5,-0.5,0.5); glVertex3d(1.5,-0.5,-0.5); glVertex3d(1.5,0.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,128,0); // Milieu/Droite glVertex3d(1.5,0.5,-0.5); glVertex3d(1.5,-0.5,-0.5); glVertex3d(1.5,-0.5,-1.5); glVertex3d(1.5,0.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,128,0); // Bas/Gauche glVertex3d(1.5,-0.5,1.5); glVertex3d(1.5,-1.5,1.5); glVertex3d(1.5,-1.5,0.5); glVertex3d(1.5,-0.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,128,0); // Bas/Milieu glVertex3d(1.5,-0.5,0.5); glVertex3d(1.5,-1.5,0.5); glVertex3d(1.5,-1.5,-0.5); glVertex3d(1.5,-0.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,128,0); // Bas/Droite glVertex3d(1.5,-0.5,-0.5); glVertex3d(1.5,-1.5,-0.5); glVertex3d(1.5,-1.5,-1.5); glVertex3d(1.5,-0.5,-1.5); glEnd(); //////////////////////////////////////////// /// Face jaune /// //////////////////////////////////////////// glBegin(GL_QUADS); glColor3ub(255,255,0); // Haut/Gauche glVertex3d(-1.5,1.5,1.5); glVertex3d(-1.5,0.5,1.5); glVertex3d(-0.5,0.5,1.5); glVertex3d(-0.5,1.5,1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,0); // Haut/Milieu glVertex3d(-0.5,1.5,1.5); glVertex3d(-0.5,0.5,1.5); glVertex3d(0.5,0.5,1.5); glVertex3d(0.5,1.5,1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,0); // Haut/Droite glVertex3d(0.5,1.5,1.5); glVertex3d(0.5,0.5,1.5); glVertex3d(1.5,0.5,1.5); glVertex3d(1.5,1.5,1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,0); // Milieu/Gauche glVertex3d(-1.5,0.5,1.5); glVertex3d(-1.5,-0.5,1.5); glVertex3d(-0.5,-0.5,1.5); glVertex3d(-0.5,0.5,1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,0); // Milieu/Milieu glVertex3d(-0.5,0.5,1.5); glVertex3d(-0.5,-0.5,1.5); glVertex3d(0.5,-0.5,1.5); glVertex3d(0.5,0.5,1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,0); // Milieu/Droite glVertex3d(0.5,0.5,1.5); glVertex3d(0.5,-0.5,1.5); glVertex3d(1.5,-0.5,1.5); glVertex3d(1.5,0.5,1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,0); // Bas/Gauche glVertex3d(-1.5,-0.5,1.5); glVertex3d(-1.5,-1.5,1.5); glVertex3d(-0.5,-1.5,1.5); glVertex3d(-0.5,-0.5,1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,0); // Bas/Milieu glVertex3d(-0.5,-0.5,1.5); glVertex3d(-0.5,-1.5,1.5); glVertex3d(0.5,-1.5,1.5); glVertex3d(0.5,-0.5,1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,0); // Bas/Droite glVertex3d(0.5,-0.5,1.5); glVertex3d(0.5,-1.5,1.5); glVertex3d(1.5,-1.5,1.5); glVertex3d(1.5,-0.5,1.5); glEnd(); //////////////////////////////////////////// /// Face marron /// //////////////////////////////////////////// glBegin(GL_QUADS); glColor3ub(128,0,0); // Haut/Gauche glVertex3d(-1.5,1.5,1.5); glVertex3d(-1.5,0.5,1.5); glVertex3d(-1.5,0.5,0.5); glVertex3d(-1.5,1.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(128,0,0); // Haut/Milieu glVertex3d(-1.5,1.5,0.5); glVertex3d(-1.5,0.5,0.5); glVertex3d(-1.5,0.5,-0.5); glVertex3d(-1.5,1.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(128,0,0); // Haut/Droite glVertex3d(-1.5,1.5,-0.5); glVertex3d(-1.5,0.5,-0.5); glVertex3d(-1.5,0.5,-1.5); glVertex3d(-1.5,1.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(128,0,0); // Milieu/Gauche glVertex3d(-1.5,0.5,1.5); glVertex3d(-1.5,-0.5,1.5); glVertex3d(-1.5,-0.5,0.5); glVertex3d(-1.5,0.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(128,0,0); // Milieu/Milieu glVertex3d(-1.5,0.5,0.5); glVertex3d(-1.5,-0.5,0.5); glVertex3d(-1.5,-0.5,-0.5); glVertex3d(-1.5,0.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(128,0,0); // Milieu/Droite glVertex3d(-1.5,0.5,-0.5); glVertex3d(-1.5,-0.5,-0.5); glVertex3d(-1.5,-0.5,-1.5); glVertex3d(-1.5,0.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(128,0,0); // Bas/Gauche glVertex3d(-1.5,-0.5,1.5); glVertex3d(-1.5,-1.5,1.5); glVertex3d(-1.5,-1.5,0.5); glVertex3d(-1.5,-0.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(128,0,0); // Bas/Milieu glVertex3d(-1.5,-0.5,0.5); glVertex3d(-1.5,-1.5,0.5); glVertex3d(-1.5,-1.5,-0.5); glVertex3d(-1.5,-0.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(128,0,0); // Bas/Droite glVertex3d(-1.5,-0.5,-0.5); glVertex3d(-1.5,-1.5,-0.5); glVertex3d(-1.5,-1.5,-1.5); glVertex3d(-1.5,-0.5,-1.5); glEnd(); //////////////////////////////////////////// /// Face blanc /// //////////////////////////////////////////// glBegin(GL_QUADS); glColor3ub(255,255,255); // Haut/Gauche glVertex3d(-1.5,1.5,-1.5); glVertex3d(-1.5,0.5,-1.5); glVertex3d(-0.5,0.5,-1.5); glVertex3d(-0.5,1.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,255); // Haut/Milieu glVertex3d(-0.5,1.5,-1.5); glVertex3d(-0.5,0.5,-1.5); glVertex3d(0.5,0.5,-1.5); glVertex3d(0.5,1.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,255); // Haut/Droite glVertex3d(0.5,1.5,-1.5); glVertex3d(0.5,0.5,-1.5); glVertex3d(1.5,0.5,-1.5); glVertex3d(1.5,1.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,255); // Milieu/Gauche glVertex3d(-1.5,0.5,-1.5); glVertex3d(-1.5,-0.5,-1.5); glVertex3d(-0.5,-0.5,-1.5); glVertex3d(-0.5,0.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,255); // Milieu/Milieu glVertex3d(-0.5,0.5,-1.5); glVertex3d(-0.5,-0.5,-1.5); glVertex3d(0.5,-0.5,-1.5); glVertex3d(0.5,0.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,255); // Milieu/Droite glVertex3d(0.5,0.5,-1.5); glVertex3d(0.5,-0.5,-1.5); glVertex3d(1.5,-0.5,-1.5); glVertex3d(1.5,0.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,255); // Bas/Gauche glVertex3d(-1.5,-0.5,-1.5); glVertex3d(-1.5,-1.5,-1.5); glVertex3d(-0.5,-1.5,-1.5); glVertex3d(-0.5,-0.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,255); // Bas/Milieu glVertex3d(-0.5,-0.5,-1.5); glVertex3d(-0.5,-1.5,-1.5); glVertex3d(0.5,-1.5,-1.5); glVertex3d(0.5,-0.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(255,255,255); // Bas/Droite glVertex3d(0.5,-0.5,-1.5); glVertex3d(0.5,-1.5,-1.5); glVertex3d(1.5,-1.5,-1.5); glVertex3d(1.5,-0.5,-1.5); glEnd(); //////////////////////////////////////////// /// Face vert /// //////////////////////////////////////////// glBegin(GL_QUADS); glColor3ub(0,128,0); // Haut/Gauche glVertex3d(-1.5,-1.5,1.5); glVertex3d(-0.5,-1.5,1.5); glVertex3d(-0.5,-1.5,0.5); glVertex3d(-1.5,-1.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,128,0); // Haut/Milieu glVertex3d(-1.5,-1.5,0.5); glVertex3d(-0.5,-1.5,0.5); glVertex3d(-0.5,-1.5,-0.5); glVertex3d(-1.5,-1.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,128,0); // Haut/Droite glVertex3d(-1.5,-1.5,-0.5); glVertex3d(-0.5,-1.5,-0.5); glVertex3d(-0.5,-1.5,-1.5); glVertex3d(-1.5,-1.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,128,0); // Milieu/Gauche glVertex3d(-0.5,-1.5,1.5); glVertex3d(0.5,-1.5,1.5); glVertex3d(0.5,-1.5,0.5); glVertex3d(-0.5,-1.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,128,0); // Milieu/Milieu glVertex3d(-0.5,-1.5,0.5); glVertex3d(0.5,-1.5,0.5); glVertex3d(0.5,-1.5,-0.5); glVertex3d(-1.5,-1.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,128,0); // Milieu/Droite glVertex3d(-0.5,-1.5,-0.5); glVertex3d(0.5,-1.5,-0.5); glVertex3d(0.5,-1.5,-1.5); glVertex3d(-0.5,-1.5,-1.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,128,0); // Bas/Gauche glVertex3d(0.5,-1.5,1.5); glVertex3d(1.5,-1.5,1.5); glVertex3d(1.5,-1.5,0.5); glVertex3d(0.5,-1.5,0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,128,0); // Bas/Milieu glVertex3d(0.5,-1.5,0.5); glVertex3d(1.5,-1.5,0.5); glVertex3d(1.5,-1.5,-0.5); glVertex3d(0.5,-1.5,-0.5); glEnd(); glBegin(GL_QUADS); glColor3ub(0,128,0); // Bas/Droite glVertex3d(0.5,-1.5,-0.5); glVertex3d(1.5,-1.5,-0.5); glVertex3d(1.5,-1.5,-1.5); glVertex3d(0.5,-1.5,-1.5); glEnd();