dark_sylinc  committed 86fdbfc

Added performance enhancement to Instancing, as suggested by m2codeGEN.

  • Participants
  • Parent commits 5dcf82f
  • Branches v1-8

Comments (0)

Files changed (1)

File OgreMain/src/OgreInstanceBatch.cpp

 		InstancedEntityVec::const_iterator itor = mInstancedEntities.begin();
 		InstancedEntityVec::const_iterator end  = mInstancedEntities.end();
-		while( itor != end )
+		while( itor != end && !mVisible )
 			//Trick to force Ogre not to render us if none of our instances is visible
 			//Because we do Camera::isVisible(), it is better if the SceneNode from the