glutSwapBuffers();\r
}\r
\r
+/**\r
+ * init function, sets OpenGL's starting state\r
+ */\r
+void init() {\r
+ glMatrixMode(GL_PROJECTION);\r
+ glLoadIdentity();\r
+ gluPerspective( 60, 1, 0.1, 1000.0);\r
+ glMatrixMode(GL_MODELVIEW);\r
+}\r
+\r
/**\r
* Main function\r
* @param argc Number of arguments\r
\r
makeMenu();\r
\r
- glMatrixMode(GL_PROJECTION);\r
- glLoadIdentity();\r
- gluPerspective( 60, 1, 0.1, 1000.0);\r
- glMatrixMode(GL_MODELVIEW);\r
+ init();\r
\r
glutMainLoop();\r
}\r