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
| glBindTexture(GL_TEXTURE_2D, this->textures[0].at(0));
glBegin(GL_TRIANGLE_STRIP);
glTexCoord2d(0,0);glVertex3f(-0.5f, -0.5f, -0.5f);
glTexCoord2d(1,0);glVertex3f(0.5f, -0.5f, -0.5f);
glTexCoord2d(0,0.5);glVertex3f(-0.5f, 0.5f, -0.5f);
glTexCoord2d(1,0.5);glVertex3f(0.5f, 0.5f, -0.5f);
glTexCoord2d(0,1);glVertex3f(-0.5f, 0.5f, 0.5f);
glTexCoord2d(1,1);glVertex3f(0.5f, 0.5f, 0.5f);
glEnd();
glBindTexture(GL_TEXTURE_2D, this->textures[0].at(1));
glBegin(GL_TRIANGLE_STRIP);
glTexCoord2d(0,0);glVertex3f(0.5f, 0.5f, -0.5f);
glTexCoord2d(0,1);glVertex3f(0.5f, -0.5f, -0.5f);
glTexCoord2d(0.5,0);glVertex3f(0.5f, 0.5f, 0.5f);
glTexCoord2d(0.5,1);glVertex3f(0.5f, -0.5f, 0.5f);
glTexCoord2d(1,0);glVertex3f(-0.5f, 0.5f, 0.5f);
glTexCoord2d(1,1);glVertex3f(-0.5f, -0.5f, 0.5f);
glEnd();
glBindTexture(GL_TEXTURE_2D, this->textures[0].at(2));
glBegin(GL_TRIANGLE_STRIP);
glTexCoord2d(0,0);glVertex3f(0.5f, -0.5f, -0.5f);
glTexCoord2d(0,1);glVertex3f(0.5f, -0.5f, 0.5f);
glTexCoord2d(0.5,0);glVertex3f(-0.5f, -0.5f, -0.5f);
glTexCoord2d(0.5,1);glVertex3f(-0.5f, -0.5f, 0.5f);
glTexCoord2d(1,0);glVertex3f(-0.5f, 0.5f, -0.5f);
glTexCoord2d(1,1);glVertex3f(-0.5f, 0.5f, 0.5f);
glEnd(); |
Partager