 			var previousCall	: DrawCall			= null;
 			var passes			: Array				= _passes.concat();
 			
-			_numEnabledDrawCalls = 0;
-			
 			for (passId = 0; passId < numPasses; ++passId)
 			{
 				var pass			: ShaderInstance	= passes[passId];

                    
				drawCalls[instanceId] = drawCall;
				++_numDrawCalls;
                
				// retain the instance, update indexes, watch for invalidation, give to renderingList.
				bindShaderInstance(passInstance, drawCall, meshBindings);

			applyBindingChanges();
			
			_numEnabledPasses = 0;
            
			var context			: Context3DResource	= viewport.context3D;
			var backBuffer 		: RenderTarget		= getRenderingBackBuffer(viewport.backBuffer);
			var numPasses		: uint 				= _passes.length;
