Changeset 174 for trunk/VUT/Ogre/src/OgrePlatformQueryManager.cpp
- Timestamp:
- 07/14/05 09:06:16 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/Ogre/src/OgrePlatformQueryManager.cpp
r173 r174 12 12 //----------------------------------------------------------------------- 13 13 PlatformQueryManager::PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface, 14 Viewport *vp, bool renderPatches):15 QueryManager(hierarchyInterface ),14 Viewport *vp, int queryModes): 15 QueryManager(hierarchyInterface, queryModes), 16 16 mViewport(vp), 17 mWasInitialised(false), 18 mRenderPatches(renderPatches) 17 mWasInitialised(false) 19 18 { 20 19 } … … 147 146 uchar *buf = mViewport->getTarget()->getBufferContents(dimx, dimy); 148 147 149 int n = mRenderPatches ?150 (int)visiblePatches->size() : (int)visibleGeometry->size();151 152 148 //std::stringstream d; d << "dimx: " << dimx << ", dimy: " << dimy; LogManager::getSingleton().logMessage(d.str()); 153 149 … … 163 159 164 160 // if valid id <= add visibility (id values start at 1) 165 if ( (id > 0) && (id < n))166 { 167 if ( mRenderPatches)168 { 161 if (mQueryModes == PATCH_VISIBILITY) 162 { 163 if ((id > 0) && (id < (int)visiblePatches->size())) 164 { 169 165 ((*visiblePatches)[id]).AddVisibility(1, 0); 170 166 } 171 else 167 } 168 else if (mQueryModes == GEOMETRY_VISIBILITY) 169 { 170 if ((id > 0) && (id < (int)visibleGeometry->size())) 172 171 { 173 172 ((*visibleGeometry)[id]).AddVisibility(1, 0); … … 213 212 SubEntity *subEnt = ent->getSubEntity(i); 214 213 215 if (m RenderPatches)214 if (mQueryModes == PATCH_VISIBILITY) 216 215 { 217 216 ++ id; … … 223 222 } 224 223 225 if ( !mRenderPatches)224 if (mQueryModes == GEOMETRY_VISIBILITY) 226 225 { 227 226 visibleGeometry->push_back(GtpVisibility::MeshInfo(ent, 0, 0));
Note: See TracChangeset
for help on using the changeset viewer.