|
From: Dave R. <tr...@us...> - 2004-09-30 10:42:57
|
Update of /cvsroot/bzflag/bzflag/src/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22361/src/bzflag Modified Files: playing.cxx Log Message: - converted TankGeometryMgr into a namespace with static data members - threw some DEBUG3's into TankGeometryMgr - re-added the contextInitializer test key with shift-alt-X (when DEBUG_RENDERING is defined) Index: playing.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/playing.cxx,v retrieving revision 1.662 retrieving revision 1.663 diff -w -u -r1.662 -r1.663 --- playing.cxx 29 Sep 2004 21:52:53 -0000 1.662 +++ playing.cxx 30 Sep 2004 10:42:36 -0000 1.663 @@ -693,9 +693,10 @@ } return true; - /* XXX -- for testing forced recreation of OpenGL context - case 'o': - if (pressed) { + // for testing forced recreation of OpenGL context +#if defined(DEBUG_RENDERING) + case 'X': + if (pressed && ((shiftKeyStatus & BzfKeyEvent::AltKey) != 0)) { // destroy OpenGL context getMainWindow()->getWindow()->freeContext(); @@ -711,8 +712,8 @@ // reload display lists and textures and initialize other state OpenGLGState::initContext(); } - break; - */ + return true; +#endif // DEBUG_RENDERING case ']': case '}': @@ -4595,8 +4596,6 @@ TimeKeeper::setTick(); updateDaylight(epochOffset, *sceneRenderer); - // rebuild the tank display lists - TANKGEOMMGR.rebuildLists(); // main loop while (!CommandsStandard::isQuit()) { @@ -5429,6 +5428,10 @@ sceneBuilder = new SceneDatabaseBuilder(sceneRenderer); World::init(); + // initialize and build the tank display lists + TankGeometryMgr::init(); + TankGeometryMgr::buildLists(); + // prepare dialogs mainMenu = new MainMenu; |