Changeset 903 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Timestamp:
- 05/05/06 07:44:20 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h
r897 r903 97 97 void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup, 98 98 QueuedRenderableCollection::OrganisationMode om); 99 99 void loadVisibilityConfig(const String& filename); 100 100 /** Override standard function so octree boxes are always of equal side length. 101 101 This has advantages for CHC, because terrain tiles are in different octree nodes … … 127 127 /** Finds object corresponding to this bounding box in the scene. 128 128 */ 129 MovableObject*FindCorrespondingObject(const AxisAlignedBox &box);129 Entity *FindCorrespondingObject(const AxisAlignedBox &box); 130 130 131 131 /** Identifies objects in the scene and gives them unique ids that … … 133 133 */ 134 134 void IdentifyObjects(GtpVisibilityPreprocessor::ObjectContainer &objects); 135 136 /** Loads / unloads pvs of the view cell to set the visibility in the scene. 137 */ 138 void applyViewCellPvs(GtpVisibilityPreprocessor::ViewCell *vc, const bool load); 139 140 /** updates pvs in current frame. 141 */ 142 void updatePvs(Camera *cam); 143 144 /** Sets all objects invisible. 145 */ 146 void SetObjectsVisible(const bool visible); 135 147 136 148 /// the interface to the scene hierarchy. … … 150 162 bool mRenderNodesContentForViz; 151 163 152 /// if werender transparents after the hierarchical traversal164 /// render transparents after the hierarchical traversal 153 165 bool mDelayRenderTransparents; 154 166 155 /// if weuse a depth pass (i.e., fill only the depth buffer in the first pass)167 /// use a depth pass (i.e., fill only the depth buffer in the first pass) 156 168 bool mUseDepthPass; 157 /// if we currently renderingthe depth pass169 /// flag indicating if we currently render the depth pass 158 170 bool mIsDepthPassPhase; 159 171 … … 185 197 bool mIsHierarchicalCulling; 186 198 199 bool mViewCellsLoaded; 187 200 GtpVisibilityPreprocessor::ViewCellsManager *mViewCellsManager; 201 202 203 /// Used to assign Ogre meshes to view cell entries. 204 GtpVisibilityPreprocessor::ObjectContainer mObjects; 205 206 GtpVisibilityPreprocessor::ViewCell *mElementaryViewCell; 207 GtpVisibilityPreprocessor::ViewCell *mCurrentViewCell; 208 209 /// If view cells are used. 210 bool mUseViewCells; 211 212 /// if the view cells are filtered 213 bool mUseVisibilityFilter; 188 214 }; 189 215 216 /// Factory for VisibilityOctreeSceneManager 217 class OcclusionCullingSceneManagerFactory : public SceneManagerFactory 218 { 219 protected: 220 void initMetaData(void) const; 221 GtpVisibility::VisibilityManager *visManager; 222 public: 223 OcclusionCullingSceneManagerFactory(GtpVisibility::VisibilityManager *vm) 224 { 225 visManager = vm; 226 } 227 ~OcclusionCullingSceneManagerFactory() {} 228 /// Factory type name 229 static const String FACTORY_TYPE_NAME; 230 SceneManager* createInstance(const String& instanceName); 231 void destroyInstance(SceneManager* instance); 232 }; 233 190 234 } // namespace Ogre 191 235 192 #endif // CullingTerrainSceneManager_H236 #endif // OcclusionCullingSceneManager_H -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreVisibilityOctreeSceneManager.h
r897 r903 11 11 #include "OgrePlatformQueryManager.h" 12 12 #include "VisibilityManager.h" 13 #include "Containers.h" 13 14 #include "ViewCellsManager.h" 14 15 … … 76 77 void RenderSingleObjectForItemBuffer(Renderable *rend, Pass *pass); 77 78 #endif // ITEM_BUFFER 78 void _renderQueueGroupObjects(RenderQueueGroup* pGroup, QueuedRenderableCollection::OrganisationMode om); 79 void _renderQueueGroupObjects(RenderQueueGroup* pGroup, 80 QueuedRenderableCollection::OrganisationMode om); 79 81 80 82 /** Override from SceneManager so that sub entities can be assigned an id for item buffer. … … 191 193 bool mViewCellsLoaded; 192 194 GtpVisibilityPreprocessor::ViewCellsManager *mViewCellsManager; 195 193 196 194 197 /// Used to assign Ogre meshes to view cell entries. -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r897 r903 1 1 #include "OgreOcclusionCullingSceneManager.h" 2 2 #include "OgreVisibilityOptionsManager.h" 3 #include "OgreTypeConverter.h"4 3 #include <OgreMath.h> 5 4 #include <OgreIteratorWrappers.h> … … 15 14 #include "Containers.h" 16 15 #include "ViewCellsManager.h" 17 16 #include <OgreConfigFile.h> 17 #include "OgreTypeConverter.h" 18 #include "OgreMeshInstance.h" 19 #include "common.h" 18 20 19 21 // normal terrain rendering … … 43 45 mRenderTransparentsForItemBuffer(true), 44 46 mExecuteVertexProgramForAllPasses(true), 45 mIsHierarchicalCulling(false) 47 mIsHierarchicalCulling(false), 48 mViewCellsLoaded(false), 49 mUseViewCells(false), 50 mUseVisibilityFilter(false), 51 mCurrentViewCell(NULL), 52 mElementaryViewCell(NULL) 46 53 { 47 54 mHierarchyInterface = new OctreeHierarchyInterface(this, mDestRenderSystem); … … 82 89 { 83 90 OGRE_DELETE(mHierarchyInterface); 91 CLEAR_CONTAINER(mObjects); 92 OGRE_DELETE(mCurrentViewCell); 84 93 } 85 94 //----------------------------------------------------------------------- … … 155 164 } 156 165 // add bounding boxes of rendered objects 166 if (1) 157 167 for (BoxList::iterator it = mBoxes.begin(); it != mBoxes.end(); ++it) 158 168 { … … 182 192 //(*it)->_addBoundingBoxToQueue(getRenderQueue()); 183 193 } 194 // add renderables itself 184 195 if (mRenderNodesContentForViz) 185 196 { … … 274 285 } 275 286 287 276 288 //-- show visible scene nodes and octree bounding boxes from last frame 277 289 if (mShowVisualization) … … 291 303 OctreeSceneManager::_findVisibleObjects(cam, onlyShadowCasters); 292 304 } 305 293 306 // only shadow casters will be rendered in shadow texture pass 294 307 if (0) mHierarchyInterface->SetOnlyShadowCasters(onlyShadowCasters); 308 309 310 //-- apply view cell pvs 311 updatePvs(cam); 295 312 } 296 313 … … 372 389 // exclude this queues from hierarchical rendering 373 390 setSpecialCaseRenderQueueMode(SceneManager::SCRQM_EXCLUDE); 391 374 392 375 393 // set all necessary parameters for … … 522 540 return true; 523 541 } 524 525 if (key == "UseArbQueries") 526 { 527 bool useArbQueries = (*static_cast<const bool *>(val)); 528 529 if (useArbQueries) 530 { 531 mHierarchyInterface->ResetQueries(); 532 mDestRenderSystem->setConfigOption("ArbQueries", "Yes"); 533 } 534 else 535 { 536 mHierarchyInterface->ResetQueries(); 537 mDestRenderSystem->setConfigOption("ArbQueries", "No"); 538 } 539 } 542 if (key == "LoadViewCells") 543 { 544 if (!mViewCellsLoaded) 545 { 546 LoadViewCells(static_cast<const char *>(val)); 547 mViewCellsLoaded = true; 548 } 549 550 return true; 551 } 552 if (key == "UseViewCells") 553 { 554 mUseViewCells = *static_cast<const bool *>(val); 555 556 // reset view cell 557 OGRE_DELETE(mCurrentViewCell); 558 if (mUseViewCells) 559 mCurrentViewCell = mViewCellsManager->GenerateViewCell(); 560 mElementaryViewCell = NULL; 561 // if using view cells, all objects are set to false initially 562 SetObjectsVisible(!mUseViewCells); 563 564 return true; 565 } 566 if (key == "UseVisibilityFilter") 567 { 568 mUseVisibilityFilter = *static_cast<const bool *>(val); 569 // set null =>recomputation of the pvs 570 mElementaryViewCell = NULL; 571 return true; 572 } 573 540 574 return VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface). 541 575 setOption(key, val) || TerrainSceneManager::setOption(key, val); … … 753 787 754 788 755 // Render a single object, this will set up auto params if required789 // render a single object, this will set up auto params if required 756 790 renderSingleObject(rend, usedPass, false, &nullLightList); 757 791 } … … 799 833 mLeavePassesInQueue |= RenderPriorityGroup::TRANSPARENT_PASSES; 800 834 801 // just render ambient stuff835 // just render ambient passes 802 836 /*** msz: no more IRS_AMBIENT, see OgreSceneManager.h ***/ 803 837 // mIlluminationStage = IRS_AMBIENT; 838 getRenderQueue()->setSplitPassesByLightingType(true); 804 839 } 805 840 … … 885 920 // Also render any objects which have receive shadows disabled 886 921 OctreeSceneManager::renderObjects(pPriorityGrp->getSolidsNoShadowReceive(), om, true); 887 } 888 } 889 else 922 #if 0 923 std::stringstream d; 924 d << " solid size: " << (int)pPriorityGrp->_getSolidPasses().size() 925 << " solid no shadow size: " << (int)pPriorityGrp->_getSolidPassesNoShadow().size() 926 << "difspec size: " << (int)pPriorityGrp->_getSolidPassesDiffuseSpecular().size() 927 << " decal size: " << (int)pPriorityGrp->_getSolidPassesDecal().size(); 928 LogManager::getSingleton().logMessage(d.str()); 929 #endif 930 } 931 } 932 else // render the rest of the passes 890 933 { 891 934 OctreeSceneManager::renderAdditiveStencilShadowedQueueGroupObjects(pGroup, om); … … 917 960 } 918 961 } 919 920 962 //------------------------------------------------------------------------- 921 MovableObject *OcclusionCullingSceneManager::FindCorrespondingObject(const AxisAlignedBox &box) 963 void OcclusionCullingSceneManager::SetObjectsVisible(const bool visible) 964 { 965 GtpVisibilityPreprocessor::ObjectContainer::iterator it, it_end = mObjects.end(); 966 967 for (it = mObjects.begin(); it != it_end; ++ it) 968 { 969 OgreMeshInstance *omi = static_cast<OgreMeshInstance *>(*it); 970 Entity *ent = omi->GetMesh(); 971 ent->setVisible(visible); 972 } 973 } 974 //------------------------------------------------------------------------- 975 void OcclusionCullingSceneManager::loadVisibilityConfig(const String& filename) 976 { 977 // TODO matt 978 // Set up the options 979 ConfigFile config; 980 String val; 981 982 config.load(filename); 983 984 val = config.getSetting("Algorithm"); 985 986 if (!val.empty()) 987 { 988 VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface).setOption("Algorithm", val.c_str()); 989 } 990 991 val = config.getSetting("UseDepthPass"); 992 993 if (!val.empty()) 994 { 995 setOption("UseDepthPass", val.c_str()); 996 } 997 } 998 //------------------------------------------------------------------------- 999 inline static AxisAlignedBox EnlargeBox(const AxisAlignedBox &box) 1000 { 1001 const float eps = 1e-3f; 1002 const Vector3 veps(eps, eps, eps); 1003 Vector3 max = box.getMaximum(); 1004 Vector3 min = box.getMinimum(); 1005 1006 return AxisAlignedBox(min - veps, max + veps); 1007 } 1008 //----------------------------------------------------------------------- 1009 Entity *OcclusionCullingSceneManager::FindCorrespondingObject(const AxisAlignedBox &box) 922 1010 { 923 1011 list<SceneNode *> sceneNodeList; 924 925 findNodesIn(box, sceneNodeList, NULL); 1012 AxisAlignedBox mybox = EnlargeBox(box); 1013 //AxisAlignedBox dummy(Vector3(-50000, -50000, -50000), Vector3(50000, 50000, 50000)); 1014 1015 // get intersecting scene nodes 1016 findNodesIn(mybox, sceneNodeList, NULL); 1017 926 1018 927 1019 list<SceneNode *>::const_iterator sit, sit_end = sceneNodeList.end(); 928 1020 929 bool overlap = false; 930 931 MovableObject *bestFittingObj = NULL; 932 float bestFit = 0.0; 933 1021 float overlap = 0;//GtpVisibilityPreprocessor::Limits::Small; 1022 1023 Entity *bestFittingObj = NULL; 1024 float bestFit = overlap; 1025 1026 // perfect fit threshold 1027 const float thresh = 1.0 - GtpVisibilityPreprocessor::Limits::Small; 1028 1029 934 1030 // find the bbox which is closest to the current bbox 935 for (sit = sceneNodeList.begin(); sit != sceneNodeList.end() , !overlap; ++ sit)1031 for (sit = sceneNodeList.begin(); sit != sceneNodeList.end(); ++ sit) 936 1032 { 937 1033 SceneNode *sn = *sit; … … 940 1036 while (oit.hasMoreElements()) 941 1037 { 942 MovableObject *mo = oit.getNext(); 943 const AxisAlignedBox bbox = mo->getWorldBoundingBox(); 1038 MovableObject *mo = oit.getNext(); 1039 1040 // we are only interested in scene entities 1041 if (mo->getMovableType() != "Entity") 1042 { 1043 continue; 1044 } 944 1045 945 const float overlap = GtpVisibilityPreprocessor::RatioOfOverlap( 946 OgreTypeConverter::ConvertFromOgre(bbox), 947 OgreTypeConverter::ConvertFromOgre(box)); 948 1046 const AxisAlignedBox bbox = EnlargeBox(mo->getWorldBoundingBox()); 1047 1048 1049 // compute measure how much aabbs overlap 1050 overlap = RatioOfOverlap(OgreTypeConverter::ConvertFromOgre(mybox), 1051 OgreTypeConverter::ConvertFromOgre(bbox)); 1052 949 1053 if (overlap > bestFit) 950 1054 { 951 1055 bestFit = overlap; 952 bestFittingObj = mo; 953 954 // perfect fit => object found 955 if (overlap > (1.0 - GtpVisibilityPreprocessor::Limits::Small)) 956 break; 1056 1057 bestFittingObj = static_cast<Entity *>(mo); 1058 1059 // perfect fit => object found, eraly exit 1060 if (overlap >= thresh) 1061 return bestFittingObj; 957 1062 } 958 1063 } 959 1064 } 960 1065 1066 if (0) 1067 { 1068 std::stringstream d; 1069 if (bestFittingObj) 1070 d << "best fit: " << bestFit; 1071 else 1072 d << "warning, objects do not fit\n" << box; 1073 1074 Ogre::LogManager::getSingleton().logMessage(d.str()); 1075 } 1076 961 1077 return bestFittingObj; 962 1078 } 963 964 1079 //----------------------------------------------------------------------- 965 1080 void OcclusionCullingSceneManager::LoadViewCells(string filename) 966 1081 { 967 GtpVisibilityPreprocessor::ObjectContainer objects; 1082 // the objects are set to invisible a prioriy 1083 SetObjectsVisible(false); 1084 968 1085 // identify the corresponding Ogre meshes using the bounding boxes 969 IdentifyObjects( objects);970 1086 IdentifyObjects(mObjects); 1087 971 1088 // load the view cells assigning the found objects to the pvss 972 mViewCellsManager->LoadViewCells(filename, &objects); 973 } 974 975 1089 mViewCellsManager = 1090 GtpVisibilityPreprocessor::ViewCellsManager::LoadViewCells(filename, &mObjects); 1091 1092 std::stringstream d; 1093 d << "view cells loaded" << endl; 1094 Ogre::LogManager::getSingleton().logMessage(d.str()); 1095 } 1096 //----------------------------------------------------------------------- 976 1097 void OcclusionCullingSceneManager::IdentifyObjects(GtpVisibilityPreprocessor::ObjectContainer &objects) 977 1098 { … … 988 1109 const GtpVisibilityPreprocessor::AxisAlignedBox3 box = (*iit).second; 989 1110 const AxisAlignedBox currentBox = OgreTypeConverter::ConvertToOgre(box); 1111 1112 Entity *ent = FindCorrespondingObject(currentBox); 1113 1114 // create new mesh instance 1115 OgreMeshInstance *omi = new OgreMeshInstance(ent); 1116 omi->SetId((*iit).first); 1117 objects.push_back(omi); 1118 } 1119 } 1120 //------------------------------------------------------------------------- 1121 void OcclusionCullingSceneManager::applyViewCellPvs(GtpVisibilityPreprocessor::ViewCell *vc, 1122 const bool load) 1123 { // NOTE: should not happen, rather apply view cell representing unbounded space then 1124 if (!vc) 1125 { 1126 // set everything visible for savety 1127 SetObjectsVisible(true); 1128 1129 return; 1130 } 990 1131 991 MovableObject *mo = FindCorrespondingObject(currentBox); 992 //objects.push_back(mi); 993 } 1132 GtpVisibilityPreprocessor::ObjectPvsMap::const_iterator oit, 1133 oit_end = vc->GetPvs().mEntries.end(); 1134 1135 //-- PVS of view cell 1136 for (oit = vc->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 1137 { 1138 if (!(*oit).first) continue; 1139 1140 OgreMeshInstance *omi = dynamic_cast<OgreMeshInstance*>((*oit).first); 1141 omi->GetMesh()->setVisible(load); 1142 //GtpVisibilityPreprocessor::Debug << "here45 " << omi->GetId() << endl; 1143 } 1144 } 1145 //------------------------------------------------------------------------- 1146 void OcclusionCullingSceneManager::updatePvs(Camera *cam) 1147 { 1148 if (mViewCellsLoaded && mUseViewCells) 1149 { 1150 const GtpVisibilityPreprocessor::Vector3 viewPoint = 1151 OgreTypeConverter::ConvertFromOgre(cam->getDerivedPosition()); 1152 1153 GtpVisibilityPreprocessor::ViewCell *newElementary = 1154 mViewCellsManager->GetViewCell(viewPoint); 1155 1156 // elementary view cell did not change => apply same pvs 1157 if (mElementaryViewCell == newElementary) 1158 return; 1159 1160 mElementaryViewCell = newElementary; 1161 1162 //-- unload old pvs 1163 applyViewCellPvs(mCurrentViewCell, false); 1164 1165 1166 //-- the new view cell 1167 1168 GtpVisibilityPreprocessor::ViewCell *viewCell; 1169 1170 1171 if (mUseVisibilityFilter) 1172 { 1173 //-- compute new filtered cell 1174 GtpVisibilityPreprocessor::PrVs prvs; 1175 mViewCellsManager->GetPrVS(viewPoint, prvs); 1176 viewCell = prvs.mViewCell; 1177 } 1178 else 1179 { 1180 viewCell = newElementary; 1181 } 1182 1183 //-- load new pvs 1184 applyViewCellPvs(viewCell, true); 1185 1186 // store pvs 1187 mCurrentViewCell->SetPvs(viewCell->GetPvs()); 1188 1189 // delete merge tree of filtered view cell 1190 if (mUseVisibilityFilter) 1191 mViewCellsManager->DeleteLocalMergeTree(viewCell); 1192 } 1193 } 1194 1195 1196 1197 //----------------------------------------------------------------------- 1198 const String OcclusionCullingSceneManagerFactory::FACTORY_TYPE_NAME = "OcclusionCullingSceneManager"; 1199 //----------------------------------------------------------------------- 1200 void OcclusionCullingSceneManagerFactory::initMetaData(void) const 1201 { 1202 mMetaData.typeName = FACTORY_TYPE_NAME; 1203 mMetaData.description = "Scene manager organising the scene on the basis of an octree with advanced occlusion culling (TM)."; 1204 mMetaData.sceneTypeMask = 0xFFFF; // support all types 1205 mMetaData.worldGeometrySupported = false; 1206 } 1207 //----------------------------------------------------------------------- 1208 SceneManager* OcclusionCullingSceneManagerFactory::createInstance( 1209 const String& instanceName) 1210 { 1211 return new OcclusionCullingSceneManager(instanceName, visManager); 1212 } 1213 //----------------------------------------------------------------------- 1214 void OcclusionCullingSceneManagerFactory::destroyInstance(SceneManager* instance) 1215 { 1216 delete instance; 994 1217 } 995 1218 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformHierarchyInterface.cpp
r897 r903 81 81 void PlatformHierarchyInterface::ResetQueries() 82 82 { 83 //for (int i = 0; i < (int)mOcclusionQueries.size(); ++ i) OGRE_DELETE(mOcclusionQueries[i]);83 for (int i = 0; i < (int)mOcclusionQueries.size(); ++ i) OGRE_DELETE(mOcclusionQueries[i]); 84 84 85 85 mCurrentTestIdx = 0; 86 //mOcclusionQueries.clear();86 mOcclusionQueries.clear(); 87 87 } 88 88 //----------------------------------------------------------------------- … … 97 97 98 98 // set no depth write, no color, no lighting material 99 //mSceneManager->setPassWrapper(solidBox->getTechnique()->getPass(0)); // HACK! (mySetPass should be setPass)100 mSceneManager->_setPass(solidBox->getTechnique()->getPass(0)); // HACK! (mySetPass should be setPass)99 mSceneManager->setPassWrapper(solidBox->getTechnique()->getPass(0)); // HACK! (mySetPass should be setPass) 100 //mSceneManager->_setPass(solidBox->getTechnique()->getPass(0)); // HACK! (mySetPass should be setPass) 101 101 //SetOcclusionPass(); 102 102 … … 121 121 { 122 122 // create new query if there is no query left 123 if (mCurrentTestIdx == (int)mOcclusionQueries.size()) 124 { 123 if (mCurrentTestIdx >= (int)mOcclusionQueries.size()) 124 { 125 mCurrentTestIdx == (int)mOcclusionQueries.size(); 125 126 mOcclusionQueries.push_back(new PlatformOcclusionQuery(mRenderSystem)); 126 127 } -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformOcclusionQuery.cpp
r897 r903 12 12 PlatformOcclusionQuery::~PlatformOcclusionQuery() 13 13 { 14 delete mHardwareOcclusionQuery;14 //delete mHardwareOcclusionQuery; 15 15 } 16 16 //----------------------------------------------------------------------- … … 32 32 bool isAvailable = true; 33 33 34 if (!waitForResult)34 /*if (!waitForResult) 35 35 isAvailable = !mHardwareOcclusionQuery->isStillOutstanding(); 36 36 */ 37 //visiblePixels = 800; 37 38 if (isAvailable) 38 39 return mHardwareOcclusionQuery->pullOcclusionQuery(&visiblePixels); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidBoundingBox.cpp
r736 r903 74 74 mRenderOp.indexData->indexBuffer = ibuf; 75 75 // set material with no lighting, no color, no depth write 76 SetOcclusionQueryMaterial();77 //setMaterial("BaseWhiteNoLighting");76 //SetOcclusionQueryMaterial(); 77 setMaterial("BaseWhiteNoLighting"); 78 78 } 79 79 //----------------------------------------------------------------------- -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilityOctreeSceneManager.cpp
r897 r903 404 404 //-- now we can render all remaining queue objects 405 405 //-- used for depth pass, transparents, overlay 406 406 407 clearSpecialCaseRenderQueues(); 407 408 408 //-- we render all remaining queue objects409 // used for depth pass, transparents, overlay410 clearSpecialCaseRenderQueues();411 409 OctreeSceneManager::_renderVisibleObjects(); 412 413 410 } // hierarchical culling 414 411 415 412 // reset ambient light 416 setAmbientLight(savedAmbient);413 //setAmbientLight(savedAmbient); 417 414 418 415 getRenderQueue()->clear(); // finally clear render queue … … 641 638 } 642 639 #ifdef ITEM_BUFFER 643 //-- renders item buffer 640 //-- item buffer 641 //-- item buffer: render objects using false colors 644 642 645 643 // Iterate through priorities … … 657 655 { 658 656 // Do solids 659 RenderPriorityGroup::SolidRenderablePassMap solidObjs = pGroup->_getSolidPasses();657 QueuedRenderableCollection solidObjs = pGroup->getSolidsBasic();//msz 660 658 661 659 // ----- SOLIDS LOOP ----- … … 697 695 if (mRenderTransparentsForItemBuffer) 698 696 { 699 RenderPriorityGroup::TransparentRenderablePassList transpObjs = 700 pGroup->_getTransparentPasses(); 697 QueuedRenderableCollection transpObjs = pGroup->getTransparents(); //msz 701 698 RenderPriorityGroup::TransparentRenderablePassList::const_iterator 702 699 itrans, itransend; … … 752 749 } 753 750 754 Pass *usedPass =setPass(mItemBufferPass);751 const Pass *usedPass = _setPass(mItemBufferPass); 755 752 756 753 … … 789 786 mLeavePassesInQueue = 0; 790 787 791 if (!mUseDepthPass && !mUseItemBuffer) 788 // if we have the depth pass or use an item buffer, no passes are left in the queue 789 if (1 && !mUseDepthPass && !mUseItemBuffer) 792 790 { 793 791 if (mShadowTechnique == SHADOWTYPE_STENCIL_ADDITIVE) -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilityOptionsManager.cpp
r897 r903 16 16 { 17 17 // delete old queries (not needed for e.g., view frustum culling) 18 mHierarchyInterface->ResetQueries();18 //mHierarchyInterface->ResetQueries(); 19 19 mVisibilityManager->SetCullingManager(*static_cast<const 20 20 GtpVisibility::VisibilityEnvironment::CullingManagerType *>(val)); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilityTerrainSceneManager.cpp
r897 r903 489 489 } 490 490 491 if (key == "UseArbQueries")492 {493 bool useArbQueries = (*static_cast<const bool *>(val));494 495 if (useArbQueries)496 {497 mHierarchyInterface->ResetQueries();498 mDestRenderSystem->setConfigOption("ArbQueries", "Yes");499 }500 else501 {502 mHierarchyInterface->ResetQueries();503 mDestRenderSystem->setConfigOption("ArbQueries", "No");504 }505 }506 491 return VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface). 507 492 setOption(key, val) || TerrainSceneManager::setOption(key, val);
Note: See TracChangeset
for help on using the changeset viewer.