OpenGL



5. 3D - 5


( ), , Y , , , , , .

glColor3f(1.0f,0.5f,0.0f);//

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

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

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

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

. , . , Z . Z . , Z . Z , , , . , ;).

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

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

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

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

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

, . , Z .

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

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

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

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

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

. . X . .