[artoolkit-commits] artoolkit/util/calib_cparam calib_cparam.c, 1.14, 1.15
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: Philip L. <phi...@us...> - 2007-08-06 02:39:01
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_cparam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv12768 Modified Files: calib_cparam.c Log Message: Rename some fns for clarity, change Quit to cleanup. Index: calib_cparam.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_cparam/calib_cparam.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** calib_cparam.c 15 Sep 2006 03:08:18 -0000 1.14 --- calib_cparam.c 6 Aug 2007 02:39:02 -0000 1.15 *************** *** 116,120 **** static void Mouse(int button, int state, int x, int y); static void Quit(void); ! static void Idle(void); static void Visibility(int visible); static void Reshape(int w, int h); --- 116,120 ---- static void Mouse(int button, int state, int x, int y); static void Quit(void); ! static void mainLoop(void); static void Visibility(int visible); static void Reshape(int w, int h); *************** *** 158,162 **** // Register GLUT event-handling callbacks. ! // NB: Idle() is registered by Visibility. glutDisplayFunc(Display); glutReshapeFunc(Reshape); --- 158,162 ---- // Register GLUT event-handling callbacks. ! // NB: mainLoop() is registered by Visibility. glutDisplayFunc(Display); glutReshapeFunc(Reshape); *************** *** 250,254 **** // Cancel from mode 0 should quit program. arVideoCapStop(); ! Quit(); } else if (mode == 1) { if (line_num_current == 0) { --- 250,255 ---- // Cancel from mode 0 should quit program. arVideoCapStop(); ! cleanup(); ! exit(0); } else if (mode == 1) { if (line_num_current == 0) { *************** *** 328,333 **** scanf("%s", name); arParamSave( name, 1, &iparam ); ! ! Quit(); } } --- 329,334 ---- scanf("%s", name); arParamSave( name, 1, &iparam ); ! cleanup(); ! exit(0); } } *************** *** 405,409 **** } ! static void Quit(void) { if (gSaveArglSettings) arglCleanup(gSaveArglSettings); --- 406,410 ---- } ! static void cleanup(void) { if (gSaveArglSettings) arglCleanup(gSaveArglSettings); *************** *** 411,418 **** if (gWin) glutDestroyWindow(gWin); arVideoClose(); - exit(0); } ! static void Idle(void) { static int ms_prev; --- 412,418 ---- if (gWin) glutDestroyWindow(gWin); arVideoClose(); } ! static void mainLoop(void) { static int ms_prev; *************** *** 421,425 **** ARUint8 *image; ! // Find out how long since Idle() last ran. ms = glutGet(GLUT_ELAPSED_TIME); s_elapsed = (float)(ms - ms_prev) * 0.001; --- 421,425 ---- ARUint8 *image; ! // Find out how long since mainLoop() last ran. ms = glutGet(GLUT_ELAPSED_TIME); s_elapsed = (float)(ms - ms_prev) * 0.001; *************** *** 444,448 **** { if (visible == GLUT_VISIBLE) { ! glutIdleFunc(Idle); } else { glutIdleFunc(NULL); --- 444,448 ---- { if (visible == GLUT_VISIBLE) { ! glutIdleFunc(mainLoop); } else { glutIdleFunc(NULL); |