Ignore:
Timestamp:
08/21/06 18:39:49 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/OnlineCullingCHC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneManager.h

    r1221 r1251  
    228228        // if transparents are skipped during rendering 
    229229        bool mSkipTransparents; 
    230  
    231230        // the item buffer pass (render items color-coded) 
    232231        Pass *mItemBufferPass; 
     
    239238        //KdRenderableList mVisibleNodes; 
    240239        KdTree::NodeList mVisibleNodes; 
     240 
     241        bool mDeleteQueueAfterRendering; 
    241242 
    242243        /************************************************************************/ 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h

    r1221 r1251  
    205205        /// if the view cells are filtered 
    206206        bool mUseVisibilityFilter; 
     207 
     208        bool mDeleteQueueAfterRendering; 
    207209}; 
    208210 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp

    r1232 r1251  
    4949mRenderTransparentsForItemBuffer(true), 
    5050mExecuteVertexProgramForAllPasses(false), 
    51 mIsHierarchicalCulling(false) 
     51mIsHierarchicalCulling(false), 
     52mDeleteQueueAfterRendering(true) 
    5253{ 
    5354        // Replace root node with my node 
     
    731732 
    732733                        // delete remaining renderables from queue: 
    733                         // all which are not in mLeavePassesInQueue) 
     734                        // all which are not in mLeavePassesInQueue 
    734735#ifdef GTP_VISIBILITY_MODIFIED_OGRE 
    735736                        _deleteRenderedQueueGroups(mLeavePassesInQueue); 
     
    744745                        mLeavePassesInQueue = 0; 
    745746 
    746 #if 1    
    747747                        // add visible nodes found by the visibility culling algorithm 
    748748                        if (mUseDepthPass) 
    749749                        { 
    750                                 //KdRenderableList::const_iterator it, it_end = mVisibleNodes.end(); 
    751  
    752                                 ////getRenderQueue()->clear(); 
    753                                 //for (it = mVisibleNodes.begin(); it != it_end; ++ it) 
    754                                 //{ 
    755                                 //      (*it)->queueObjects(mCameraInProgress, getRenderQueue(), false); 
    756                                 //} 
    757750                                KdTree::NodeList::const_iterator it, end = mVisibleNodes.end(); 
    758751                                for (it = mVisibleNodes.begin(); it != end; it++) 
     
    762755                                } 
    763756                        } 
    764 #endif 
     757 
    765758                        //-- now we can render all remaining queue objects 
    766759                        //-- used for depth pass, transparents, overlay 
     
    774767                setAmbientLight(savedAmbient); 
    775768 
    776                 getRenderQueue()->clear(); // finally clear render queue 
    777                 if (1) OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 
     769                if (!mDeleteQueueAfterRendering) 
     770                        getRenderQueue()->clear(); // finally clear render queue 
     771                else 
     772                        OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 
    778773 
    779774                if (0) WriteLog(); // write out stats 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp

    r1232 r1251  
    5353mUseVisibilityFilter(false), 
    5454mCurrentViewCell(NULL), 
    55 mElementaryViewCell(NULL) 
     55mElementaryViewCell(NULL), 
     56mDeleteQueueAfterRendering(true) 
    5657{ 
    5758        mHierarchyInterface = new OctreeHierarchyInterface(this, mDestRenderSystem); 
     
    267268 
    268269        //-- set actual pass here 
     270 
    269271        const Pass *result = SceneManager::_setPass(usedPass); 
    270272 
     
    360362        else //-- the hierarchical culling algorithm 
    361363        { 
    362                 // this is also called in TerrainSceneManager: really 
    363                 // nexessary? 
     364                // note matt: this is also called in TerrainSceneManager: really necessary? 
    364365                mDestRenderSystem -> setLightingEnabled(false); 
    365366 
     
    417418#endif 
    418419 
    419                 //-- reset parameters 
     420                //-- reset parameters needed for special rendering 
     421                 
    420422                mIsDepthPassPhase = false; 
    421423                mIsItemBufferPhase = false; 
     
    425427                mLeavePassesInQueue = 0; 
    426428                 
    427 #if 1    
    428429                // add visible nodes found by the visibility culling algorithm 
    429430                if (mUseDepthPass) 
     
    437438                        } 
    438439                } 
    439 #endif   
    440440                //-- now we can render all remaining queue objects 
    441441                //-- used for depth pass, transparents, overlay 
     
    443443 
    444444                TerrainSceneManager::_renderVisibleObjects(); 
    445         } // hierarchical culling 
     445        } // end hierarchical culling 
    446446                 
    447447        // HACK: set the new render level index, important to avoid cracks 
     
    452452        setAmbientLight(savedAmbient); 
    453453 
    454         getRenderQueue()->clear(); // finally clear render queue 
    455         if (1) OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 
     454        if (!mDeleteQueueAfterRendering) 
     455                getRenderQueue()->clear(); // finally clear render queue 
     456        else 
     457                OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 
     458 
    456459        if (0) WriteLog(); // write out stats 
    457460} 
     
    519522                return true; 
    520523        } 
    521  
    522524        if (key == "DepthWrite") 
    523525        { 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/include/QueryManager.h

    r897 r1251  
    8383        */ 
    8484    virtual bool 
    85     ShootRay(const Ray &ray, 
     85                ShootRay(const Ray &ray, 
    8686             std::vector<Mesh *> *visibleMeshes, 
    8787             bool isGlobalLine = false 
Note: See TracChangeset for help on using the changeset viewer.