Subversion Repositories gelsvn

Rev

Rev 600 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 600 Rev 625
Line 226... Line 226...
226
void keyboard(unsigned char key, int x, int y)
226
void keyboard(unsigned char key, int x, int y)
227
{
227
{
228
    switch(key)
228
    switch(key)
229
    {
229
    {
230
		case '\033': exit(0); break;
230
		case '\033': exit(0); break;
-
 
231
		case 'a': if(glIsEnabled(GL_MULTISAMPLE)) glDisable(GL_MULTISAMPLE); else glEnable(GL_MULTISAMPLE); return;
231
		case 'w': do_wireframe = !do_wireframe; break;
232
		case 'w': do_wireframe = !do_wireframe; break;
232
		case 'f': per_vertex_normals = !per_vertex_normals; redo_display_list = true; break;
233
		case 'f': per_vertex_normals = !per_vertex_normals; redo_display_list = true; break;
233
		case 's': 
234
		case 's': 
234
		{
235
		{
235
			ofstream f("ball.out", ios::binary);
236
			ofstream f("ball.out", ios::binary);
Line 251... Line 252...
251
	Util::ArgExtracter ae(argc, argv);
252
	Util::ArgExtracter ae(argc, argv);
252
	
253
	
253
	bool redo_normals = ae.extract("-n");
254
	bool redo_normals = ae.extract("-n");
254
	
255
	
255
    // GLUT INIT
256
    // GLUT INIT
256
    glutInitDisplayMode(GLUT_RGBA|GLUT_DOUBLE|GLUT_DEPTH);
257
    glutInitDisplayMode(GLUT_RGBA|GLUT_DOUBLE|GLUT_DEPTH|GLUT_MULTISAMPLE);
257
    glutInitWindowSize(win_size_x, win_size_y);
258
    glutInitWindowSize(win_size_x, win_size_y);
258
    glutInit(&argc, argv);
259
    glutInit(&argc, argv);
259
    main_window = glutCreateWindow("OBJ Viewer");
260
    main_window = glutCreateWindow("OBJ Viewer");
260
    glutDisplayFunc(display);
261
    glutDisplayFunc(display);
261
    glutKeyboardFunc(keyboard);
262
    glutKeyboardFunc(keyboard);