OpenGL


18 OpenGL. - 3


glTexCoord2f(1.0f, 0.0f);

glVertex3f( 1.0f, -1.0f, 1.0f); //

glTexCoord2f(1.0f, 1.0f);

glVertex3f( 1.0f, 1.0f, 1.0f); //

glTexCoord2f(0.0f, 1.0f);

glVertex3f(-1.0f, 1.0f, 1.0f); //

//

glNormal3f( 0.0f, 0.0f,-1.0f); //

glTexCoord2f(1.0f, 0.0f);

glVertex3f(-1.0f, -1.0f, -1.0f);//

glTexCoord2f(1.0f, 1.0f);

glVertex3f(-1.0f, 1.0f, -1.0f);//

glTexCoord2f(0.0f, 1.0f);

glVertex3f( 1.0f, 1.0f, -1.0f);//

glTexCoord2f(0.0f, 0.0f);

glVertex3f( 1.0f, -1.0f, -1.0f);//

//

glNormal3f( 0.0f, 1.0f, 0.0f); //

glTexCoord2f(0.0f, 1.0f);

glVertex3f(-1.0f, 1.0f, -1.0f);//

glTexCoord2f(0.0f, 0.0f);

glVertex3f(-1.0f, 1.0f, 1.0f); //

glTexCoord2f(1.0f, 0.0f);

glVertex3f( 1.0f, 1.0f, 1.0f); //

glTexCoord2f(1.0f, 1.0f);

glVertex3f( 1.0f, 1.0f, -1.0f);//

//

glNormal3f( 0.0f,-1.0f, 0.0f); //

glTexCoord2f(1.0f, 1.0f);

glVertex3f(-1.0f, -1.0f, -1.0f);//

glTexCoord2f(0.0f, 1.0f);

glVertex3f( 1.0f, -1.0f, -1.0f);//

glTexCoord2f(0.0f, 0.0f);

glVertex3f( 1.0f, -1.0f, 1.0f); //

glTexCoord2f(1.0f, 0.0f);

glVertex3f(-1.0f, -1.0f, 1.0f); //