- void main(int argc, char** argv)
- {
- ilInit();
- iluInit();
- ilutRenderer(ILUT_OPENGL);
- glutInit(&argc,argv);
- glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
- glutInitWindowSize(500,500);
- glutInitWindowPosition(100,0);
- glutCreateWindow();
- glutDisplayFunc(display);
- glutReshapeFunc(reshape);
- glutKeyboardFunc(keyboard);
- glutMouseFunc(mouse);
- glutPassiveMotionFunc(mouseMovement);
- glClearColor(0.0, 0.0, 0.0, 1.0);
- glClearDepth(1.0);
- glEnable (GL_DEPTH_TEST); //enable the depth testing
- glEnable (GL_LIGHTING); //enable the lighting
- glEnable (GL_LIGHT0); //enable LIGHT0, our Diffuse Light
- glShadeModel (GL_SMOOTH);
- glEnable(GL_COLOR_MATERIAL);
- glutMainLoop();
- }// end main