Changeset 343 for trunk/VUT/work/iv


Ignore:
Timestamp:
10/20/05 18:49:11 (19 years ago)
Author:
mattausch
Message:

added switch between NV and ARB queries in the render system and in the demos.
Fixed render queue bug: when clearing queue, we traversed through all priority groups
to clear the passmaps. This became very slow because had to traverse many elements (over 1000
for city demo). Now all we destroy the priority groups for each rendering (per hierarchy node).

Location:
trunk/VUT/work/iv
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/work/iv/IVFrameListener.cpp

    r316 r343  
    4848mVisibilityThreshold(0), 
    4949mAssumedVisibility(0), 
    50 mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING), 
     50//mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING), 
     51//mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::STOP_AND_WAIT_CULLING), 
     52mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::FRUSTUM_CULLING), 
    5153mNodeVizMode(NODEVIZ_NONE), 
    5254mVizCameraHeight(Real(2500.0)), 
     
    6365mShowOctree(false), 
    6466mUseDepthPass(false), 
     67mUseArbQueries(false), 
    6568mTestGeometryForVisibleLeaves(false), 
    6669mShowVisualization(false), 
     
    123126        mSceneMgr->setOption("DelayRenderTransparents", &delayRenderTransparents); 
    124127        mSceneMgr->setOption("UseDepthPass", &mUseDepthPass); 
    125          
     128        mSceneMgr->setOption("UseArbQueries", &mUseArbQueries); 
     129 
    126130        mSceneMgr->setOption("ShowOctree", &mShowOctree); 
    127131        mSceneMgr->setOption("CullCamera", &mCullCamera); 
     
    571575                        guiAvg->setCaption(avgFpsString + StringConverter::toString(avgFps) + " ms"); 
    572576                } 
     577                //std::stringstream d; d << "frame rate :" << stats.lastFPS; 
     578                //Ogre::LogManager::getSingleton().logMessage(d.str()); 
    573579 
    574580                guiCurr->setCaption(currFpsString + StringConverter::toString(stats.lastFPS)); 
     
    646652 
    647653        mSceneMgr->setOption("ShowOctree", &mShowOctree); 
     654} 
     655//----------------------------------------------------------------------- 
     656void IVFrameListener::toggleUseArbQueries() 
     657{ 
     658        mUseArbQueries = !mUseArbQueries; 
     659 
     660        mSceneMgr->setOption("UseArbQueries", &mUseArbQueries); 
     661         
     662        if (mUseArbQueries) 
     663        { 
     664                mUseArbQueriesInfo->setCaption(": ARB"); 
     665        } 
     666        else 
     667        { 
     668                mUseArbQueriesInfo->setCaption(": NV"); 
     669        } 
    648670} 
    649671//----------------------------------------------------------------------- 
     
    808830                mShiftPressed = true; 
    809831                break; 
    810  
     832        case KC_A: 
     833                toggleUseArbQueries(); 
     834                break; 
    811835        default: 
    812836                break; 
     
    11211145        initOverlayElement(&mAssumedVisibilityInfo, ext, "AssumedVisibility", top, ": 0"); top += vert_space; 
    11221146        initOverlayElement(&mCurrentObjectTypeInfo, ext, "CurrentObjectType", top, ": "); top += vert_space; 
     1147        initOverlayElement(&mUseArbQueriesInfo, ext, "UseArbQueries", top, ": NV"); top += vert_space; 
    11231148        //initOverlayElement(&mHelpInfo, ext, "Help", top, ": "); top += vert_space; 
    11241149 
  • trunk/VUT/work/iv/IVFrameListener.h

    r259 r343  
    115115        void toggleShowOctree(); 
    116116        void toggleUseDepthPass(); 
     117        void toggleUseArbQueries(); 
    117118        void toggleShowViz(); 
    118119        void toggleRecord(); 
     
    159160        OverlayElement *mTestGeometryForVisibleLeavesInfo; 
    160161        OverlayElement *mUseDepthPassInfo; 
     162        OverlayElement *mUseArbQueriesInfo; 
    161163        OverlayElement *mRenderedNodesInfo; 
    162164        OverlayElement *mObjectsCountInfo; 
     
    180182        bool mShowOctree; 
    181183        bool mUseDepthPass; 
     184        bool mUseArbQueries; 
    182185        bool mShowVisualization; 
    183186        bool mCullCamera; 
  • trunk/VUT/work/iv/TestCullingIVApplication.cpp

    r259 r343  
    9292        mSceneMgr->setOption("NodeVizScale", &scale); 
    9393        // HACK: change this to relative path 
    94         String path = "D:/svn/gtp/trunk/VUT/Ogre/resources/"; 
     94        String path = "D:/svn/trunk/VUT/Ogre/resources/"; 
    9595                 
    9696        SceneNode *node1 = mSceneMgr->getRootSceneNode()->createChildSceneNode("Node1"); 
Note: See TracChangeset for help on using the changeset viewer.