Changeset 139 for trunk/VUT/work/ogre_changes/OgreMain
- Timestamp:
- 06/20/05 08:13:57 (20 years ago)
- Location:
- trunk/VUT/work/ogre_changes/OgreMain
- Files:
-
- 4 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());
Note: See TracChangeset
for help on using the changeset viewer.