- if(argc>1)\r
- strcpy(dataDir, argv[1]);\r
- else if(opendir(dirDefault1))\r
- strcpy(dataDir, dirDefault1);\r
- else if(opendir(dirDefault2))\r
- strcpy(dataDir, dirDefault2);\r
- else fileErr(dirDefault1);\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
- glutInit(&argc, argv);\r
-\r
- //glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);\r
-\r
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL | GLUT_MULTISAMPLE);\r
-\r
- glutInitWindowSize(500, 500);\r
- glutCreateWindow("Scene Editor");\r
-\r
- //glShadeModel(GL_SMOOTH); // Enables Smooth Shading\r
- //glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black Background\r
- //glClearDepth(1.0f); // Depth Buffer Setup\r
- //glEnable(GL_DEPTH_TEST); // Enables Depth Testing\r
- //glDepthFunc(GL_LEQUAL); // the type\r
-\r
- // glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations\r
-\r
- glutReshapeFunc(windowReshape);\r
- glutDisplayFunc(display);\r
- glutMouseFunc(mouse);\r