1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| void dessinePieces()
{
glEnable (GL_DEPTH_TEST);
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// TOUR BLANCHE
init (fichier);
float pos = 0.35f;
float pos2 = -4.0f;
glTranslatef (0.0, 0.0, -5.0);
glScalef(0.52, 0.52, 0.52);
glBegin (GL_QUADS);
glTexCoord2f (-4.0f, -4.0f);
glVertex3f (pos2+-pos+0.5f, pos2+-pos+0.5f, 0.0f);
glTexCoord2f (-3.0f, -4.0f);
glVertex3f (pos2+pos+0.5f, pos2+-pos+0.5f, 0.0f);
glTexCoord2f (-3.0f, -3.0f);
glVertex3f (pos2+pos+0.5f, pos2+pos+0.5f, 0.0f);
glTexCoord2f (-4.0f, -3.0f);
glVertex3f (pos2+-pos+0.5f, pos2+pos+0.5f, 0.0f);
glEnd ();
glDisable (GL_TEXTURE_2D);
} |
Partager