Changeset 1304
- Timestamp:
- 08/31/06 16:45:51 (18 years ago)
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTreeAppListener.h
r1300 r1304 132 132 mKT(2.0f), 133 133 mKI(1.0f), 134 mMaxDepth(1 2),134 mMaxDepth(10), 135 135 mSceneManager(SM_KDT), 136 136 mRenderMethod(KdTree::KDRM_GTP_CHC), 137 mBuildMethod(KdTree::KDBM_ PRIORITYQUEUE),137 mBuildMethod(KdTree::KDBM_RECURSIVE), 138 138 mSceneType(ST_SIMPLE), 139 139 mViewCells(VCM_OFF), 140 mDelRenderQueue(true), 140 141 mFastStart(false), 141 142 mBurnIn(false), … … 164 165 int mSceneType; 165 166 int mViewCells; 167 bool mDelRenderQueue; 166 168 bool mFastStart; 167 169 bool mBurnIn; -
GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTree.cpp
r1300 r1304 42 42 .addOpt("f","faststart", ARGUMENT_NONE) 43 43 .addOpt("b","burnin", ARGUMENT_NONE) 44 .addOpt("v","viewcells", ARGUMENT_OPTIONAL); 44 .addOpt("v","viewcells", ARGUMENT_OPTIONAL) 45 .addOpt("","nodelrq", ARGUMENT_NONE); 45 46 46 47 … … 49 50 cmdparser.getOpt("l", options.mDemoLogfileName); 50 51 cmdparser.getOpt("comment", options.mComment); 52 options.mDelRenderQueue = !cmdparser.getOpt("nodelrq"); 51 53 options.mFastStart = cmdparser.getOpt("f"); 52 54 options.mBurnIn = cmdparser.getOpt("b"); … … 621 623 mSceneMgr->setOption("RenderMethod", &mOptions.mRenderMethod); 622 624 mSceneMgr->setOption("EnhancedVisibility", &mOptions.mEnhancedVisibility); 625 mSceneMgr->setOption("DeleteRenderQueue", &mOptions.mDelRenderQueue); 623 626 // fix 624 627 bool depthpass = false; … … 630 633 int alg = CONV_KDT_TO_OCM_ALG(mOptions.mRenderMethod); 631 634 mSceneMgr->setOption("Algorithm", &alg); 635 mSceneMgr->setOption("DeleteRenderQueue", &mOptions.mDelRenderQueue); 632 636 } 633 637 -
GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTreeAppListener.cpp
r1301 r1304 122 122 // rendering/texture options 123 123 mSceneDetailIndex(PM_SOLID), 124 mFiltering(TFO_ANISOTROPIC), 125 mAniso(8), 124 //mFiltering(TFO_ANISOTROPIC), 125 //mAniso(8), 126 mFiltering(TFO_BILINEAR), 127 mAniso(1), 126 128 // chc stats 127 129 mDelayedQueriesIssued(0.0f), … … 139 141 mTimeUntilNextToggle(0.0f), 140 142 // stuff for walkthrough recording/playback 141 mTimeUntilNextLogWrite( options.mDemoInterval),143 mTimeUntilNextLogWrite(0.0f), 142 144 mTimeRemaining(0.0f), 143 145 mWaitBeforeDemoStart(0.0f), … … 208 210 // force X second wait when in demo mode - avoids initial low framerate due to loading delays 209 211 mWaitBeforeDemoStart = DEMO_WAIT; 212 // wait one interval before first write 213 mTimeUntilNextLogWrite = mOptions.mDemoInterval; 210 214 // set playback icon 211 215 togglePlayback(); … … 1336 1340 saveLog(); 1337 1341 if (mOptions.mBurnIn) 1342 { 1343 mTimeUntilNextLogWrite = mOptions.mDemoInterval; 1338 1344 togglePlayback(); 1345 } 1339 1346 else 1347 { 1340 1348 return false; 1349 } 1341 1350 } 1342 1351 } … … 1736 1745 logread >> line; 1737 1746 storedname = line.substr(0,line.find_first_of(',')); 1747 logread.close(); 1738 1748 if (storedname != demoname) 1739 1749 { … … 1741 1751 "##Error##: Saved demo stats do not match the current demo: " + 1742 1752 storedname + " != " + demoname); 1743 logread.close();1744 1753 return; 1745 1754 } … … 1760 1769 // minFPS, avgFPS, maxFPS, frames, time, render system, comment, record separator 1761 1770 logheader << "\"min FPS\"" << fs << "\"avg FPS\"" << fs << "\"max FPS\"" << fs 1762 << "\"# Frames \"" << fs << "\"Total Time\"" << fs << "\" Render System\"" << fs1763 << "\" Comment\"" << rs;1771 << "\"# Frames \"" << fs << "\"Total Time\"" << fs << "\"Comment\"" << fs 1772 << "\"Render System\"" << rs; 1764 1773 logheader.close(); 1765 1774 } … … 1786 1795 } 1787 1796 rendersys += "\""; 1797 1798 // view cells used? 1799 String viewcells; 1800 if (mOptions.mViewCells == VCM_ON) 1801 viewcells = ds + "VC"; 1802 else if (mOptions.mViewCells == VCM_FILTER) 1803 viewcells = ds + "VC+VF"; 1788 1804 1789 1805 // demo settings … … 1803 1819 logwrite << ds << RENDERMETHOD[mOptions.mRenderMethod] << ds << senhvis << 1804 1820 mOptions.mMaxDepth << ds << mOptions.mKT << ds << mOptions.mKI << ds << 1805 BUILDMETHOD[mOptions.mBuildMethod] ;1821 BUILDMETHOD[mOptions.mBuildMethod] << viewcells; 1806 1822 } 1807 1823 else if (mOptions.mSceneManager == SM_OCM && mOptions.mRenderMethod != KdTree::KDRM_INTERNAL) 1808 1824 { 1809 logwrite << ds << RENDERMETHOD[CONV_OCM_TO_KDT_ALG(mOptions.mRenderMethod)] ;1825 logwrite << ds << RENDERMETHOD[CONV_OCM_TO_KDT_ALG(mOptions.mRenderMethod)] << viewcells; 1810 1826 } 1811 1827 logwrite << "\"" << fs; … … 1829 1845 logwrite << (int)minFPS << fs << (int)avgFPS << fs << (int)maxFPS << fs 1830 1846 << mDemoStats.mTotalNumFrames << fs << mDemoStats.mTotalEllapsedTime << fs 1831 << rendersys << fs << "\"" << mOptions.mComment << "\""<< rs;1847 << "\"" << mOptions.mComment << "\"" << fs << rendersys << rs; 1832 1848 logwrite.close(); 1833 1849 } -
GTP/trunk/App/Demos/Vis/KdTreeDemo/README.txt
r1300 r1304 62 62 2 ... use view cells and visibility filter 63 63 These setting can also be changeg ingame (see INGAME COMMANDS). 64 65 --nodelrq 66 Do not delete render queue after each frame (which actually is normal 67 Ogre behavior). Deleting the render queue significantly improves framerates 68 when using occlusion culling. 64 69 65 70 --comment … … 87 92 --buildmode <bm_id> 88 93 Select the mode of building the KdTree. 89 Priority Queue bm_id=PQ (DEFAULT)90 Recursive bm_id=RE 94 Priority Queue bm_id=PQ 95 Recursive bm_id=RE (DEFAULT) 91 96 This setting can also be changed ingame (see INGAME COMMANDS). 92 97 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeHierarchyInterface.cpp
r1195 r1304 42 42 else 43 43 { 44 //KdTree::Branch * kdbranch = KDBRANCHPTR_CAST(node);45 //if (kdbranch->mLeft)46 // mDistanceQueue->push(kdbranch->mLeft);47 //if (kdbranch->mRight)48 // mDistanceQueue->push(kdbranch->mRight);49 44 if (kdnode->getLeftChild()) 50 45 mDistanceQueue->push(kdnode->getLeftChild()); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp
r1301 r1304 36 36 mShowAllBoxes(false), 37 37 mEnhancedVisiblity(true), 38 mBuildMethod(KdTree::KDBM_ PRIORITYQUEUE),38 mBuildMethod(KdTree::KDBM_RECURSIVE), 39 39 mRenderMethod(KdTree::KDRM_INTERNAL), 40 40 mShowVisualization(false), … … 846 846 setAmbientLight(savedAmbient); 847 847 848 if (!mDeleteQueueAfterRendering) 849 getRenderQueue()->clear(); // finally clear render queue 850 else 851 OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 848 849 // almost same effect as below 850 getRenderQueue()->clear(mDeleteQueueAfterRendering); 851 852 //if (!mDeleteQueueAfterRendering) 853 // getRenderQueue()->clear(true); // finally clear render queue 854 //else 855 // OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 852 856 853 857 if (0) WriteLog(); // write out stats -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r1296 r1304 450 450 setAmbientLight(savedAmbient); 451 451 452 if (!mDeleteQueueAfterRendering) 453 getRenderQueue()->clear(); // finally clear render queue 454 else 455 OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 452 // almost same effect as below 453 getRenderQueue()->clear(mDeleteQueueAfterRendering); 454 455 //if (!mDeleteQueueAfterRendering) 456 // getRenderQueue()->clear(true); // finally clear render queue 457 //else 458 // OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 456 459 457 460 if (0) WriteLog(); // write out stats -
OGRE/trunk/resources/overlays/TestKdTree.overlay
r1296 r1304 23 23 left 5 24 24 top 5 25 width 43025 width 350 26 26 height 120 27 27 material Core/StatsBlockCenter … … 46 46 element TextArea(KdTree/RenderMethodInfo): KdTree/Templates/BasicText 47 47 { 48 left 1 6048 left 125 49 49 width 180 50 50 height 30 … … 60 60 element TextArea(KdTree/EnhancedVisInfo): KdTree/Templates/BasicText 61 61 { 62 left 1 6062 left 125 63 63 width 180 64 64 height 30 … … 74 74 element TextArea(KdTree/BuildMethodInfo): KdTree/Templates/BasicText 75 75 { 76 left 1 6076 left 125 77 77 width 180 78 78 height 30 … … 84 84 width 120 85 85 height 30 86 caption [1][2] Max TreeDepth86 caption [1][2] Max Depth 87 87 } 88 88 element TextArea(KdTree/KdTreeMaxDepthInfo): KdTree/Templates/BasicText 89 89 { 90 left 1 6090 left 125 91 91 width 180 92 92 height 30 … … 102 102 element TextArea(KdTree/HighlightLevelInfo): KdTree/Templates/BasicText 103 103 { 104 left 1 60104 left 125 105 105 width 180 106 106 height 30 … … 116 116 element TextArea(KdTree/KTInfo): KdTree/Templates/BasicText 117 117 { 118 left 1 60118 left 125 119 119 width 180 120 120 height 30 … … 130 130 element TextArea(KdTree/KIInfo): KdTree/Templates/BasicText 131 131 { 132 left 1 60132 left 125 133 133 width 180 134 134 height 30 … … 144 144 element TextArea(KdTree/MovementInfo): KdTree/Templates/BasicText 145 145 { 146 left 1 60146 left 125 147 147 width 180 148 148 height 30 … … 158 158 element TextArea(KdTree/TopCamInfo): KdTree/Templates/BasicText 159 159 { 160 left 1 60160 left 125 161 161 width 180 162 162 height 30 … … 172 172 element TextArea(KdTree/ViewCellsInfo): KdTree/Templates/BasicText 173 173 { 174 left 1 60174 left 125 175 175 width 180 176 176 height 30 … … 186 186 element TextArea(KdTree/ViewFilterInfo): KdTree/Templates/BasicText 187 187 { 188 left 1 60188 left 125 189 189 width 180 190 190 height 30
Note: See TracChangeset
for help on using the changeset viewer.