Вверх ↑
Ответов: 876
Рейтинг: 101
#1: 2009-03-12 12:29:04 ЛС | профиль | цитата

glDisable(GL_TEXTURE_2D);
glEnable(GL_LIGHTING);
glEnable(GL_NORMALIZE);

GLfloat Material_1[] = { 0.000000f, 0.000000f, 1.000000f, 1.000000f };

glBegin(GL_TRIANGLES);

glMaterialfv(GL_FRONT,GL_DIFFUSE,Material_1
glNormal3d(0.000000,-1.000000,0.000000);
glVertex3d(-2.500000,0.000000,-2.500000);
glVertex3d(2.500000,0.000000,-2.500000);
glVertex3d(2.500000,0.000000,2.500000);

glNormal3d(0.000000,-1.000000,0.000000);
glVertex3d(-2.500000,0.000000,-2.500000);
glVertex3d(2.500000,0.000000,2.500000);
glVertex3d(-2.500000,0.000000,2.500000);

glNormal3d(0.894427,0.447214,0.000000);
glVertex3d(2.500000,0.000000,2.500000);
glVertex3d(2.500000,0.000000,-2.500000);
glVertex3d(0.000000,5.000000,0.000000);

glNormal3d(0.000000,0.447214,-0.894427);
glVertex3d(2.500000,0.000000,-2.500000);
glVertex3d(-2.500000,0.000000,-2.500000);
glVertex3d(0.000000,5.000000,0.000000);

glNormal3d(-0.894427,0.447214,0.000000);
glVertex3d(-2.500000,0.000000,-2.500000);
glVertex3d(-2.500000,0.000000,2.500000);
glVertex3d(0.000000,5.000000,0.000000);

glNormal3d(-0.000000,0.447214,0.894427);
glVertex3d(-2.500000,0.000000,2.500000);
glVertex3d(2.500000,0.000000,2.500000);
glVertex3d(0.000000,5.000000,0.000000);

glEnd();


карма: 1

0
файлы: 1code_12142.txt [1.2KB] [98]