OpenGL 基础图形绘制与投影变换(三)

2015-02-02 14:22:07 · 作者: · 浏览: 21
U_LINE);
?gluCylinder(qobj, 0.2, 0.2, 0.4, 8,8);
?glPopMatrix();
?glFlush();
}


//<<<<<<<<<<<<<<<<<<<<<< main >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void main(int argc, char **argv)
{
?glutInit(&argc, argv);
?glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB );

?glutInitWindowSize(640,480);
?glutInitWindowPosition(100, 100);
?glutCreateWindow("Transformation testbed - wireframes");
?glutDisplayFunc(displayWire);
?glClearColor(1.0f, 1.0f, 1.0f,0.0f);? // background is white
?glViewport(0, 0, 640, 480);//投影变换函数
?glutMainLoop();
}


Reference:http://www.oocities.org/uniq_friq/c_files/openGL/1lab/dots.htm