Changeset 2184


Ignore:
Timestamp:
03/02/07 17:39:47 (17 years ago)
Author:
mattausch
Message:

debug version: please don't check out

Location:
GTP/trunk/Lib/Vis/OnlineCullingCHC
Files:
7 edited

Legend:

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

    r2183 r2184  
    298298 
    299299        ObjReader *mObjReader; 
     300 
     301        Camera *mDummyCamera; 
    300302}; 
    301303 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp

    r2183 r2184  
    5959mElementaryViewCell(NULL), 
    6060mDeleteQueueAfterRendering(true), 
    61 mNormalExecution(false), 
     61mNormalExecution(true), 
    6262mShowViewCells(false), 
    6363mViewCellsGeometryLoaded(false), 
     
    730730void OcclusionCullingSceneManager::_renderVisibleObjects() 
    731731{ 
     732        if (mNormalExecution) 
     733        { 
     734                // the standard octree rendering mode 
     735                TerrainSceneManager::_renderVisibleObjects(); 
     736                //getRenderQueue()->clear(flushQueue); 
     737                return; 
     738        } 
     739 
    732740        const bool flushQueue =  
    733741                mDeleteQueueAfterRendering && ((mCurrentFrame % mFlushRate) == 0); 
    734742        ++ mCurrentFrame; 
    735743 
    736         if (mNormalExecution) 
    737         { 
    738                 // the standard octree rendering mode 
    739                 TerrainSceneManager::_renderVisibleObjects(); 
    740                 getRenderQueue()->clear(flushQueue); 
    741                 return; 
    742         } 
    743  
    744744        // create material for item buffer pass 
    745745        InitItemBufferPass(); 
     
    752752        //-- (e.g., the visualization mode, the shadow pass) 
    753753 
    754         if (mUseDepthPass || mShowVisualization || 
     754        if (//!mFindVisibleObjects ||  
     755                mUseDepthPass || mShowVisualization || 
    755756            (mShadowTechnique == SHADOWTYPE_TEXTURE_MODULATIVE &&  
    756757             mIlluminationStage == IRS_RENDER_TO_TEXTURE)) 
     
    767768                TerrainSceneManager::_renderVisibleObjects(); 
    768769 
     770                //LogManager::getSingleton().logMessage("x"); 
    769771                mIlluminationStage = savedStage; 
    770772        } 
    771773        else //-- the hierarchical culling algorithm 
    772         { 
     774        {//LogManager::getSingleton().logMessage("y"); 
    773775                // note matt: this is also called in TerrainSceneManager: really necessary? 
    774776                mDestRenderSystem->setLightingEnabled(false); 
     
    812814                // set all necessary parameters for  
    813815                // hierarchical visibility culling and rendering 
    814                 InitVisibilityCulling(mCameraInProgress); 
     816                InitVisibilityCulling(mDummyCamera); 
    815817 
    816818 
     
    857859        // almost same effect as below 
    858860        getRenderQueue()->clear(flushQueue); 
    859  
     861         
    860862        if (0) WriteLog(); // write out stats 
    861863} 
     
    864866void OcclusionCullingSceneManager::_updateSceneGraph(Camera* cam) 
    865867{ 
    866         if (mNormalExecution) 
    867         { 
    868                 TerrainSceneManager::_updateSceneGraph(cam); 
    869                 return; 
    870         } 
    871  
    872         mVisibilityManager->GetCullingManager()->SetHierarchyInterface(mHierarchyInterface); 
    873         mHierarchyInterface->SetRenderSystem(mDestRenderSystem); 
     868        if (!mNormalExecution) 
     869        { 
     870                mVisibilityManager->GetCullingManager()->SetHierarchyInterface(mHierarchyInterface); 
     871                mHierarchyInterface->SetRenderSystem(mDestRenderSystem); 
     872        } 
    874873 
    875874        TerrainSceneManager::_updateSceneGraph(cam); 
     
    10761075 
    10771076                * static_cast<unsigned int *>(val) = (unsigned int)algorithm; 
    1078  
    1079                 //getRenderQueue()->clear(); 
    10801077 
    10811078                return true; 
     
    19131910                                                                                                bool includeOverlays) 
    19141911{ 
     1912        if (0 && mNormalExecution) 
     1913        { 
     1914                TerrainSceneManager::_renderScene(camera, vp, includeOverlays); 
     1915                return; 
     1916        } 
     1917 
    19151918    Root::getSingleton()._setCurrentSceneManager(this); 
    19161919        mActiveQueuedRenderableVisitor->targetSceneMgr = this; 
     
    20572060    { 
    20582061        // Parse the scene and tag visibles 
    2059         myFindVisibleObjects(camera,  
     2062        _findVisibleObjects(camera,  
    20602063            mIlluminationStage == IRS_RENDER_TO_TEXTURE? true : false); 
    20612064    } 
     
    20712074    } 
    20722075 
    2073   
     2076 mDummyCamera = camera; 
    20742077    // Render scene content  
    20752078    _renderVisibleObjects(); 
     
    22732276        // // Render scene content in order fill depth buffer 
    22742277        bool savedUseDepthPass = mUseDepthPass; 
    2275         mUseDepthPass = true; 
     2278        if (1) mUseDepthPass = true; 
    22762279 
    22772280        // don't need shading, render only depth pass 
     
    23592362                                                                                                           bool onlyShadowCasters)                                                                                
    23602363{ 
     2364        if (1 || mNormalExecution) 
     2365        { 
     2366                TerrainSceneManager::_findVisibleObjects(cam, onlyShadowCasters); 
     2367                return; 
     2368        } 
     2369 
    23612370        // lists only used for visualization 
    23622371        mVisible.clear(); 
     
    23782387        OcclusionQueriesQueryManager *queryManager =  
    23792388                new OcclusionQueriesQueryManager(mHierarchyInterface, 
    2380                                                                                  mCurrentViewport, 
     2389                cam->getViewport(),//mCurrentViewport, 
    23812390                                                                                 queryModes,  
    23822391                                                                                 itemBufferMode); 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformHierarchyInterface.cpp

    r1621 r2184  
    9595        static RenderOperation ro; 
    9696 
     97        //LogManager::getSingleton().logMessage("here66"); 
    9798        SolidBoundingBox *solidBox = GetSolidBoundingBox(); 
    9899         
     
    106107 
    107108        solidBox->SetupBoundingBoxVertices(*box); 
    108                                  
     109 
    109110        solidBox->getRenderOperation(ro); 
    110111        ro.srcRenderable = solidBox; 
     112        //std::stringstream d; 
     113        //d << "vt2: " << ro.vertexData; 
     114        //LogManager::getSingleton().logMessage(d.str()); 
     115 
    111116        mRenderSystem->_render(ro); 
    112117} 
     
    175180//----------------------------------------------------------------------- 
    176181GtpVisibility::OcclusionQuery *PlatformHierarchyInterface::IssueNodeOcclusionQuery( 
    177         GtpVisibility::HierarchyNode *node, const bool wasVisible)  
    178 { 
     182        GtpVisibility::HierarchyNode *node,  
     183        const bool wasVisible)  
     184{//LogManager::getSingleton().logMessage("here6960"); 
    179185        // get next available test id 
    180186        GtpVisibility::OcclusionQuery *query = GetNextOcclusionQuery(); 
     
    261267{ 
    262268        if (!mSolidBoundingBox) 
     269        { 
    263270                mSolidBoundingBox = new SolidBoundingBox; 
     271                //LogManager::getSingleton().logMessage("solid box created"); 
     272        } 
    264273 
    265274        return mSolidBoundingBox; 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformQueryManager.cpp

    r2171 r2184  
    1212//-----------------------------------------------------------------------  
    1313PlatformQueryManager::PlatformQueryManager(GtpVisibility::HierarchyInterface *hierarchyInterface,  
    14                                                                                    Viewport *vp, int queryModes): 
     14                                                                                   Viewport *vp,  
     15                                                                                   int queryModes): 
    1516QueryManager(hierarchyInterface, queryModes),  
    1617mViewport(vp),  
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidBoundingBox.cpp

    r925 r2184  
    7676         SetOcclusionQueryMaterial(); 
    7777         //setMaterial("BaseWhiteNoLighting"); 
     78 
     79        /* std::stringstream d; 
     80        d << "vtx: " << mRenderOp.vertexData; 
     81        LogManager::getSingleton().logMessage(d.str()); 
     82        */ 
     83 
    7884} 
    7985//----------------------------------------------------------------------- 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj

    r2183 r2184  
    5252                        <Tool 
    5353                                Name="VCPostBuildEventTool" 
    54                                 CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)"/> 
     54                                CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName) 
     55copy $(OutDir)\$(TargetFileName) D:\svn\gametools\GTP\trunk\App\Demos\Illum\Ogre\bin\$(ConfigurationName)"/> 
    5556                        <Tool 
    5657                                Name="VCPreBuildEventTool"/> 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp

    r2171 r2184  
    115115                                // update node's visited flag 
    116116                                mHierarchyInterface->SetLastVisited(node, mHierarchyInterface->GetFrameId()); 
    117  
     117                                //Ogre::LogManager::getSingleton().logMessage("here999"); 
    118118                                // skip testing previously visible nodes without geometry 
    119119                                if (issueQuery) 
Note: See TracChangeset for help on using the changeset viewer.