int main( int argc, char** argv ) { glutInit( &argc, argv ); glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); glutInitWindowSize( winWidth, winHeight ); glutCreateWindow( "Radiosity Viewer" ); MyInit(); // Read model file. model = RAD_ReadFile( radiosityModelFilename ); // Make OpenGL display lists. gathererQuadsDList = MakeGathererQuadsDisplayList( &model ); gathererQuadsNoColorDList = MakeGathererQuadsNoColorDisplayList( &model ); // Register the callback functions. glutDisplayFunc( MyDisplay ); glutReshapeFunc( MyReshape ); glutKeyboardFunc( MyKeyboard ); glutMouseFunc( MyMouse ); glutMotionFunc( MyMotion ); // Display user instructions in console window. printf( "Press 'R' to reset view.\n" ); printf( "Press 'X' to toggle axes.\n" ); printf( "Press 'C' to toggle back-face culling.\n" ); printf( "Press 'S' to cycle thru different drawing styles.\n" ); printf( "Press 'Q' to quit.\n\n" ); // Enter GLUT event loop. glutMainLoop(); return 0; }
int main( int argc, char** argv ) { glutInit( &argc, argv ); glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); glutInitWindowSize( winWidth, winHeight ); glutCreateWindow( "Quads Viewer" ); MyInit(); // Read model file and subdivide the quads. model = QM_ReadFile( inputModelFilename ); QM_Subdivide( &model, maxShooterQuadEdgeLength, maxGathererQuadEdgeLength ); // Make OpenGL display lists. origQuadsDList = MakeOrigQuadsDisplayList( &model ); shooterQuadsDList = MakeShooterQuadsDisplayList( &model ); gathererQuadsDList = MakeGathererQuadsDisplayList( &model ); // Register the callback functions. glutDisplayFunc( MyDisplay ); glutReshapeFunc( MyReshape ); glutKeyboardFunc( MyKeyboard ); glutMouseFunc( MyMouse ); glutMotionFunc( MyMotion ); // Display user instructions in console window. printf( "Press 'R' to reset view.\n" ); printf( "Press 'X' to toggle axes.\n" ); printf( "Press 'C' to toggle back-face culling.\n" ); printf( "Press 'S' to cycle thru different drawing styles.\n" ); printf( "Press 'M' to cycle thru different types of quads.\n" ); printf( "Press 'Q' to quit.\n\n" ); // Enter GLUT event loop. glutMainLoop(); return 0; }