Реферат: Основы программирования OpenGL в Borland С++Builder и Delphi. Простейшие объекты
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
glBegin(GL_QUAD_STRIP);
glVertex3f(-a/2,-b/2,-c/2);
glVertex3f(-a/2,-b/2, c/2);
glVertex3f(-a/2, b/2,-c/2);
glVertex3f(-a/2, b/2, c/2);
glVertex3f( a/2, b/2,-c/2);
glVertex3f( a/2, b/2, c/2);
glVertex3f( a/2,-b/2,-c/2);
glVertex3f( a/2,-b/2, c/2);
glVertex3f(-a/2,-b/2,-c/2);
glVertex3f(-a/2,-b/2, c/2);
glEnd();
glBegin(GL_QUADS);
glVertex3f(-a/2,-b/2, c/2);
glVertex3f(-a/2, b/2, c/2);
glVertex3f( a/2, b/2, c/2);
glVertex3f( a/2,-b/2, c/2);
glVertex3f(-a/2,-b/2,-c/2);
glVertex3f(-a/2, b/2,-c/2);
glVertex3f( a/2, b/2,-c/2);
glVertex3f( a/2,-b/2,-c/2);
glEnd();
}
procedure piped(a,b,c:GLfloat);
begin
glShadeModel(GL_FLAT);
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
glBegin(GL_QUAD_STRIP);