Changeset 139 for trunk/VUT/work/ogre_changes
- Timestamp:
- 06/20/05 08:13:57 (20 years ago)
- Location:
- trunk/VUT/work/ogre_changes
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/ogre_changes/OgreMain/include/OgreRenderQueueSortingGrouping.h
r115 r139 197 197 void clear(void); 198 198 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 199 199 200 /** Clears solids in this group of renderables. Leaves transparents in group. 200 201 */ 201 202 void clearSolids(void); 203 204 enum {SOLID_PASSES = 1, 205 SOLID_PASSES_DECAL = 2, 206 SOLID_PASSES_DIFFUSE_SPECULAR = 4, 207 SOLID_PASSES_NOSHADOW = 8, 208 TRANSPARENT_PASSES = 16}; 209 210 /** Clears passes determined by parameter. 211 @param passes can be one or several (combined by |) of: 212 SOLID_PASSES 213 SOLID_PASSES_DECAL 214 SOLID_PASSES_DIFFUSE_SPECULAR 215 SOLID_PASSES_NOSHADOW 216 TRANSPARENT_PASSES 217 */ 218 void clear(const int leavePassesInQueue); 202 219 #endif // GTP_VISIBILITY_MODIFIED_OGRE 203 220 /** Sets whether or not the queue will split passes by their lighting type, … … 306 323 } 307 324 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 325 void clear(int passes) 326 { 327 PriorityMap::iterator i, iend; 328 iend = mPriorityGroups.end(); 329 for (i = mPriorityGroups.begin(); i != iend; ++i) 330 { 331 i->second->clear(passes); 332 } 333 334 } 308 335 /** Clears only solid renderables. Leaves transparents in queue. */ 309 336 void clearSolids(void) -
trunk/VUT/work/ogre_changes/OgreMain/include/OgreSceneManager.h
r131 r139 128 128 @param node scene node to be rendered 129 129 @param cam current camera 130 @param leave TransparentsInQueue if only solid objects should be rendered131 */ 132 void _renderSceneNode(Camera *cam, SceneNode *node, bool leaveTransparentsInQueue = false);130 @param leavePassesInQueue list of passes which are left in queue 131 */ 132 void _renderSceneNode(Camera *cam, SceneNode *node, const int leavePassesInQueue = 0); 133 133 /** deletes all processed queues 134 @remark clears render queues after rendering scene node 135 */ 136 void _deleteRenderedQueueGroups(bool leaveTransparentsInQueue); 134 @param leavePassesInQueue pass list which is not deleted from queue 135 @remark used to clear render queues before rendering scene node 136 */ 137 void _deleteRenderedQueueGroups(int leavePassesInQueue = 0); 137 138 /** Internal method used by _renderVisibleObjects to deal with renderables 138 139 which override the camera's own view / projection materices. … … 156 157 /** Renders an Ogre MovableObject. 157 158 */ 158 void _renderMovableObject(MovableObject *mov, const bool leaveTransparentsInQueue);159 void _renderMovableObject(MovableObject *mov, const int leavePassesInQueue); 159 160 160 161 #endif // GTP_VISIBILITY_MODIFIED_OGRE -
trunk/VUT/work/ogre_changes/OgreMain/src/OgreRenderQueueSortingGrouping.cpp
r115 r139 280 280 void RenderPriorityGroup::clearSolids(void) 281 281 { 282 /*SolidRenderablePassMap::iterator i, iend;282 /*SolidRenderablePassMap::iterator i, iend; 283 283 // Delete queue groups which are using passes which are to be 284 284 // deleted, we won't need these any more and they clutter up … … 313 313 clearSolidPassMap(mSolidPassesNoShadow); 314 314 } 315 //----------------------------------------------------------------------- 316 void RenderPriorityGroup::clear(const int leavePassesInQueue) 317 { 318 SolidRenderablePassMap::iterator i, iend; 319 320 // -- standard method if no passes are left in queue 321 if (leavePassesInQueue == 0) 322 { 323 clear(); 324 return; 325 } 326 327 // We do not clear the unchanged solid pass maps, only the contents of each list 328 // This is because we assume passes are reused a lot and it saves resorting 329 if (!(leavePassesInQueue & SOLID_PASSES)) 330 clearSolidPassMap(mSolidPasses); 331 if (!(leavePassesInQueue & SOLID_PASSES_DECAL)) 332 clearSolidPassMap(mSolidPassesDecal); 333 if (!(leavePassesInQueue & SOLID_PASSES_DIFFUSE_SPECULAR)) 334 clearSolidPassMap(mSolidPassesDiffuseSpecular); 335 if (!(leavePassesInQueue & SOLID_PASSES_NOSHADOW)) 336 clearSolidPassMap(mSolidPassesNoShadow); 337 338 if (!(leavePassesInQueue & TRANSPARENT_PASSES)) 339 mTransparentPasses.clear(); 340 } 315 341 #endif // GTP_VISIBILITY_MODIFIED_OGRE 316 342 //----------------------------------------------------------------------- -
trunk/VUT/work/ogre_changes/OgreMain/src/OgreSceneManager.cpp
r135 r139 1909 1909 1910 1910 itransend = objs.end(); 1911 for (itrans = objs.begin(); 1912 itrans != itransend; ++itrans) 1911 for (itrans = objs.begin(); itrans != itransend; ++itrans) 1913 1912 { 1914 1913 Renderable *r = itrans->renderable; … … 4197 4196 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 4198 4197 //----------------------------------------------------------------------- 4199 void SceneManager::_renderSceneNode(Camera *cam, SceneNode *node, bool leaveTransparentsInQueue)4198 void SceneManager::_renderSceneNode(Camera *cam, SceneNode *node, const int leavePassesInQueue) 4200 4199 { 4201 4200 // delete previously rendered objects from renderqueue 4202 _deleteRenderedQueueGroups(leave TransparentsInQueue);4201 _deleteRenderedQueueGroups(leavePassesInQueue); 4203 4202 4204 4203 node->_findVisibleObjects(cam, getRenderQueue(), false, mDisplayNodes, false); … … 4206 4205 } 4207 4206 //----------------------------------------------------------------------- 4208 void SceneManager::_deleteRenderedQueueGroups( bool leaveTransparentsInQueue)4207 void SceneManager::_deleteRenderedQueueGroups(const int leavePassesInQueue) 4209 4208 { 4210 4209 RenderQueue::QueueGroupIterator queueIt = getRenderQueue()->_getQueueGroupIterator(); … … 4218 4217 if (isRenderQueueToBeProcessed(qId)) 4219 4218 { 4220 if (leaveTransparentsInQueue) 4221 { 4222 pGroup->clearSolids(); 4223 } 4224 else 4225 { 4226 pGroup->clear(); 4227 } 4219 /*if (leaveTransparentsInQueue) 4220 { pGroup->clearSolids(); } else 4221 { pGroup->clear(); }*/ 4222 pGroup->clear(leavePassesInQueue); 4228 4223 } 4229 4224 } … … 4245 4240 }*/ 4246 4241 //----------------------------------------------------------------------- 4247 void SceneManager::_renderMovableObject(MovableObject *mov, const bool leaveTransparentsInQueue)4242 void SceneManager::_renderMovableObject(MovableObject *mov, const int leavePassesInQueue) 4248 4243 { 4249 4244 // delete previously rendered objects from renderqueue 4250 _deleteRenderedQueueGroups(leave TransparentsInQueue);4245 _deleteRenderedQueueGroups(leavePassesInQueue); 4251 4246 4252 4247 mov->_updateRenderQueue(getRenderQueue()); -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/include/OgreOctreeSceneManager.h
r115 r139 112 112 @param octree the octant to be rendered (without children) 113 113 @param onlyShadowCasters if only shadow casters are rendered 114 @param leaveTransparentsInQueue if transparemtshould be left in queue for later processing114 @param passes if passes should be left in queue for later processing 115 115 */ 116 void _renderOctant(Camera* cam, Octree *octree, bool onlyShadowCasters, bool leaveTransparentsInQueue = false); 116 void _renderOctant(Camera* cam, Octree *octree, bool onlyShadowCasters, 117 const int leavePassesInQueue = 0); 117 118 118 119 /** Returns stored list of boxes */ -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctree.cpp
r135 r139 36 36 #include <OgreOctree.h> 37 37 #include <OgreOctreeNode.h> 38 #include <OgreLogManager.h> 38 39 39 40 namespace Ogre … … 109 110 mDepth = 0; 110 111 112 _updateBounds(); 111 113 #endif //GTP_VISIBILITY_MODIFIED_OGRE 112 114 mNumNodes = 0; … … 175 177 //mWireBoundingBox->setupBoundingBox(mBox); 176 178 mWireBoundingBox->setupBoundingBox(mWorldAABB); 179 177 180 return mWireBoundingBox; 178 181 } … … 229 232 // Reset bounds first 230 233 mWorldAABB.setNull(); 231 234 232 235 // Update bounds from own attached objects 233 236 NodeList::iterator it, it_end; … … 247 250 for (int k = 0; k < 2; ++k) 248 251 { 249 if (mChildren[i][j][k] != 0)252 if (mChildren[i][j][k]) 250 253 { 251 254 mWorldAABB.merge(mChildren[i][j][k]->_getWorldAABB()); … … 254 257 } 255 258 } 259 // HACK: clamp to bounds 260 AxisAlignedBox box; 261 _getCullBounds(&box); 262 mWorldAABB = mWorldAABB.intersection(box); 263 264 //std::stringstream d; d << "updating box: " << mWorldAABB << ", depth: " << mDepth << "null: " << mBox.isNull(); 265 //LogManager::getSingleton().logMessage(d.str()); 266 256 267 // recursively update parent bounds 257 268 if (mParent) -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctreeSceneManager.cpp
r135 r139 1176 1176 //----------------------------------------------------------------------- 1177 1177 void OctreeSceneManager::_renderOctant(Camera *cam, Octree *octant, bool onlyShadowCasters, 1178 bool leaveTransparentsInQueue)//, bool useZPassQueue)1178 const int leavePassesInQueue) 1179 1179 { 1180 1180 // delete previously rendered objects from the render queue 1181 _deleteRenderedQueueGroups(leave TransparentsInQueue);1181 _deleteRenderedQueueGroups(leavePassesInQueue); 1182 1182 1183 1183 //Add stuff to be rendered; -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreTerrainRenderable.cpp
r132 r139 388 388 if (mLastNextLevel != nextLevel) 389 389 { 390 //LogManager::getSingleton().logMessage("vbuffer binding"); 391 if (nextLevel > 0) 392 { 393 //LogManager::getSingleton().logMessage("level > 0"); 394 mTerrain->vertexBufferBinding->setBinding(DELTA_BINDING, 390 if (nextLevel > 0) 391 { 392 mTerrain->vertexBufferBinding->setBinding(DELTA_BINDING, 395 393 mDeltaBuffers[nextLevel - 1]); 396 394 } 397 395 else 398 { 399 //LogManager::getSingleton().logMessage("level <= 0 (dummy b)"); 396 { 400 397 // bind dummy (incase bindings checked) 401 398 mTerrain->vertexBufferBinding->setBinding(DELTA_BINDING, … … 406 403 407 404 } 408 //else LogManager::getSingleton().logMessage("no lod morph");409 /*std::stringstream d;410 d << "terrain: " << this->getName() << ", notify camera: " << cam->getName() << ", pos: " << StringConverter::toString(cam->getDerivedPosition()) <<411 ", distance: " << StringConverter::toString(L) << ", lod level: " << mLastNextLevel412 << ", render level: " << getRenderLevel() << ", morph factor: " << mLODMorphFactor;413 LogManager::getSingleton().logMessage(d.str());*/414 415 405 } 416 406 //-----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.