2
OpenGL 编程方法
•
Glut 辅助库:建立窗口、菜单、处理输入
main(int argc, /* I - Number of command-line arguments */
char *argv[]) /* I - Command-line arguments */
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE |
GLUT_DEPTH);
glutInitWindowSize(792, 573);
glutCreateWindow("OpenGL Pencil Using Quadrics");
glutDisplayFunc(Redraw);
glutIdleFunc(Idle);
glutReshapeFunc(Resize);