Ignore:
Timestamp:
09/05/07 10:54:23 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/src/ShadowDemo/include/ShadowDemo.h

    r2509 r2550  
    187187                OgreIlluminationManager::getSingleton().setMainViewport(mWindow->getViewport(0)); 
    188188                OgreIlluminationManager::getSingleton().setShadowMapSize(700); 
    189                 OgreIlluminationManager::getSingleton().setShadowMapMaterialName("GTP/Basic/Depth"); 
     189                //OgreIlluminationManager::getSingleton().setShadowMapMaterialName("GTP/Basic/Depth"); 
     190                OgreIlluminationManager::getSingleton().setShadowMapMaterialName("GTP/Basic/CameraDepth"); 
    190191                OgreIlluminationManager::getSingleton().setFocusingSM(true); 
    191192           OgreIlluminationManager::getSingleton().setBlurShadowMap(true); 
  • GTP/trunk/App/Demos/Illum/Ogre/src/SpaceStation/include/SpaceStation.h

    r2525 r2550  
    3030bool highQuality = true; 
    3131bool chc = false; 
     32bool constantTimeStep = false; 
    3233 
    3334Scene* NXScene = 0; 
     
    464465                CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 
    465466                                                                                                                "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), 
    470472                                                                                                                "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                 
    476480                /*               
    477481                CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), 
     
    500504                //Overlay* mainOverlay = OverlayManager::getSingleton().getByName("MORIA/MainOverlay"); 
    501505                //mainOverlay->show(); 
    502  
     506                 
     507                //if(highQuality) 
    503508                createPostproc(); 
    504509 
     
    538543                s.setWorld(NXWorld); 
    539544                s.parseScript(inputStream, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 
     545                if(highQuality) 
    540546                s.parseEntryPoints("StationPrmEntryPoints.text"); 
    541547         
     
    673679        void createFrameListener(void) 
    674680    { 
    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 
    676699                mFrameListener= new SpaceStationFrameListener(mWindow, 
    677700                        mCamera, roomLightNode, roomLight, hallLight, pSysNode  ); 
     701 
    678702        mFrameListener->setPriority(10);         
    679703                mRoot->addFrameListener(mFrameListener); 
  • GTP/trunk/App/Demos/Illum/Ogre/src/SpaceStation/src/SpaceStation.cpp

    r2525 r2550  
    4343#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 
    4444        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        } 
    4955#endif 
    5056    // Create application object 
Note: See TracChangeset for help on using the changeset viewer.