Changeset 2550 for GTP/trunk/App/Demos/Illum/Ogre/src/SpaceStation
- Timestamp:
- 09/05/07 10:54:23 (17 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/src/SpaceStation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/SpaceStation/include/SpaceStation.h
r2525 r2550 30 30 bool highQuality = true; 31 31 bool chc = false; 32 bool constantTimeStep = false; 32 33 33 34 Scene* NXScene = 0; … … 464 465 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 465 466 "GTP/SpaceStation/PostProc/DoF", true);*/ 466 467 CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), 468 "GTP/Station/PostProc/Glow"); 469 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 467 if(highQuality) 468 { 469 CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), 470 "GTP/Station/PostProc/Glow"); 471 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 470 472 "GTP/Station/PostProc/Glow", true); 471 472 CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), 473 "GTP/PostProc/ToneMap"); 474 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 475 "GTP/PostProc/ToneMap", true); 473 } 474 475 CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), 476 "GTP/PostProc/ToneMap"); 477 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 478 "GTP/PostProc/ToneMap", true); 479 476 480 /* 477 481 CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), … … 500 504 //Overlay* mainOverlay = OverlayManager::getSingleton().getByName("MORIA/MainOverlay"); 501 505 //mainOverlay->show(); 502 506 507 //if(highQuality) 503 508 createPostproc(); 504 509 … … 538 543 s.setWorld(NXWorld); 539 544 s.parseScript(inputStream, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 545 if(highQuality) 540 546 s.parseEntryPoints("StationPrmEntryPoints.text"); 541 547 … … 673 679 void createFrameListener(void) 674 680 { 675 // This is where we instantiate our own frame listener 681 if(constantTimeStep) 682 { 683 // This is where we instantiate our own frame listener 684 class constantTimeStep : public FrameListener 685 { 686 public: 687 bool frameStarted(const FrameEvent &evt) 688 { 689 FrameEvent* event = (FrameEvent*) &evt; 690 event->timeSinceLastFrame = 1000 / 20; 691 return true; 692 } 693 }; 694 constantTimeStep* ct = new constantTimeStep; 695 ct->setPriority(1); 696 mRoot->addFrameListener(ct); 697 } 698 676 699 mFrameListener= new SpaceStationFrameListener(mWindow, 677 700 mCamera, roomLightNode, roomLight, hallLight, pSysNode ); 701 678 702 mFrameListener->setPriority(10); 679 703 mRoot->addFrameListener(mFrameListener); -
GTP/trunk/App/Demos/Illum/Ogre/src/SpaceStation/src/SpaceStation.cpp
r2525 r2550 43 43 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 44 44 String args = strCmdLine; 45 if(StringUtil::match(args, "low")) 46 highQuality = false; 47 if(StringUtil::match(args, "chc")) 48 chc = true; 45 std::vector<String> arguments = StringUtil::split(args); 46 for(std::vector<String>::iterator it = arguments.begin(); it != arguments.end(); it++) 47 { 48 if(StringUtil::match(*it, "low")) 49 highQuality = false; 50 if(StringUtil::match(*it, "chc")) 51 chc = true; 52 if(StringUtil::match(*it, "cts")) 53 constantTimeStep = true; 54 } 49 55 #endif 50 56 // Create application object
Note: See TracChangeset
for help on using the changeset viewer.