glutAttachMenu(GLUT_RIGHT_BUTTON);\r
}\r
\r
+/**\r
+ * Called when window is resized\r
+ * @param w New width\r
+ * @param h New height\r
+ */\r
+void windowReshape(int w, int h) {\r
+\r
+}\r
+\r
+/**\r
+ * Called when mouse event occurs\r
+ * @param btn Mouse button\r
+ * @param state State of mouse button\r
+ * @param x Mouse x position\r
+ * @param y Mouse y position\r
+ */\r
+void mouse(int btn, int state, int x, int y) {\r
+ \r
+}\r
+\r
/**\r
* Display function\r
*/\r
for(int i=0; i<NMESH; i++) meshes[i]=NULL;\r
for(int i=0; i<NTEXTURE; i++) textures[i]=NULL;\r
\r
- // The following is enough to run the program, but you'll\r
- // need to change it significantly.\r
-\r
glutInit(&argc, argv);\r
+\r
+ glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);\r
+ glutInitWindowSize(500, 500);\r
glutCreateWindow("Scene Editor");\r
+ glutReshapeFunc(windowReshape);\r
glutDisplayFunc(display);\r
+ glutMouseFunc(mouse);\r
+ glEnable(GL_DEPTH_TEST); // Enable hidden surface removal\r
\r
makeMenu();\r
glutMainLoop();\r