Changeset 155 for trunk/VUT/Ogre/src/OgreItemBufferQueryManager.cpp
- Timestamp:
- 07/05/05 18:35:47 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/Ogre/src/OgreItemBufferQueryManager.cpp
r154 r155 32 32 SceneManager *sm = pfHierarchyInterface->GetSceneManager(); 33 33 34 // -- Render scene as item buffer (e.g., color coded objects)34 // ---- Render scene as item buffer (i.e., objects with their id as color codes) 35 35 36 36 // const_cast allowed because camera is not changed in renderScene … … 49 49 mViewport->setBackgroundColour(ColourValue(0, 0, 0, 0)); 50 50 51 //pfHierarchyInterface->GetRenderSystem()->clearFrameBuffer(FBT_COLOUR); 52 // render item buffer51 52 // --- render item buffer 53 53 pfHierarchyInterface->GetSceneManager()->_renderScene(pCam, mViewport, false); 54 54 55 56 55 57 // reset old overlay status 56 58 mViewport->setOverlaysEnabled(overlayEnabled); … … 84 86 ((*visibleGeometry)[id]).AddVisibility(1, 1); 85 87 } 86 /*else { std::stringstream d;87 d << "adding pixel to geometry with id: " << id << ", buf 1: " << (int)buf[idx] << ", buf 2: " << (int)buf[idx + 1] << ", buf 3: " << (int)buf[idx + 2];88 LogManager::getSingleton().logMessage(d.str()); }*/89 88 } 90 89 … … 101 100 return; 102 101 102 103 103 mWasInitialised = true; 104 104 105 SceneManager::EntityIterator it = 106 dynamic_cast<PlatformHierarchyInterface *>(mHierarchyInterface)-> 107 GetSceneManager()->getEntityIterator(); 105 SceneManager *sm = 106 dynamic_cast<PlatformHierarchyInterface *>(mHierarchyInterface)->GetSceneManager(); 107 108 SceneManager::EntityIterator it = sm->getEntityIterator(); 108 109 109 110 // TODO: make this more efficient … … 115 116 visibleGeometry->push_back(GtpVisibility::MeshInfo(it.getNext(), 0, 0)); 116 117 } 118 119 // -- initialise hierarchy interface for simple node traversal 120 mHierarchyInterface->InitTraversal(false); 121 122 GtpVisibility::HierarchyNode *node = NULL; 123 124 while (node = mHierarchyInterface->GetNextNode()) 125 { 126 visibleNodes->push_back(GtpVisibility::NodeInfo(node, 0, 0)); 127 } 117 128 } 129 118 130 } // namespace Ogre
Note: See TracChangeset
for help on using the changeset viewer.