diff options
| -rw-r--r-- | indra/newview/llsky.h | 1 | ||||
| -rw-r--r-- | indra/newview/llvoground.h | 1 | ||||
| -rw-r--r-- | indra/newview/llworld.cpp | 38 | ||||
| -rw-r--r-- | indra/newview/llworld.h | 11 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 12 | 
5 files changed, 44 insertions, 19 deletions
diff --git a/indra/newview/llsky.h b/indra/newview/llsky.h index 8c0d70c16c..ec0de1fbfd 100644 --- a/indra/newview/llsky.h +++ b/indra/newview/llsky.h @@ -39,7 +39,6 @@  class LLViewerCamera;  class LLVOWLSky; -class LLVOWLClouds;  class LLSky   diff --git a/indra/newview/llvoground.h b/indra/newview/llvoground.h index a53f309e46..e7033290c7 100644 --- a/indra/newview/llvoground.h +++ b/indra/newview/llvoground.h @@ -49,7 +49,6 @@ public:  	/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);  	/*virtual*/ BOOL		updateGeometry(LLDrawable *drawable); -	void cleanupGL();  };  #endif // LL_LLVOGROUND_H diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 8abb49fba8..5d6e8611a7 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -93,7 +93,7 @@ LLWorld::LLWorld() :  	mLastPacketsLost(0),  	mSpaceTimeUSec(0)  { -	for (S32 i = 0; i < 8; i++) +	for (S32 i = 0; i < EDGE_WATER_OBJECTS_COUNT; i++)  	{  		mEdgeWaterObjects[i] = NULL;  	} @@ -126,7 +126,7 @@ void LLWorld::resetClass()  	LLViewerPartSim::getInstance()->destroyClass();  	mDefaultWaterTexturep = NULL ; -	for (S32 i = 0; i < 8; i++) +	for (S32 i = 0; i < EDGE_WATER_OBJECTS_COUNT; i++)  	{  		mEdgeWaterObjects[i] = NULL;  	} @@ -753,6 +753,8 @@ void LLWorld::clearAllVisibleObjects()  		//clear all cached visible objects.  		(*iter)->clearCachedVisibleObjects();  	} +    clearHoleWaterObjects(); +    clearEdgeWaterObjects();  }  void LLWorld::updateParticles() @@ -923,7 +925,7 @@ void LLWorld::precullWaterObjects(LLCamera& camera, LLCullResult* cull, bool inc      }  	S32 dir; -	for (dir = 0; dir < 8; dir++) +	for (dir = 0; dir < EDGE_WATER_OBJECTS_COUNT; dir++)  	{  		LLVOWater* waterp = mEdgeWaterObjects[dir];  		if (waterp && waterp->mDrawable) @@ -934,6 +936,26 @@ void LLWorld::precullWaterObjects(LLCamera& camera, LLCullResult* cull, bool inc  	}  } +void LLWorld::clearHoleWaterObjects() +{ +    for (std::list<LLPointer<LLVOWater> >::iterator iter = mHoleWaterObjects.begin(); +        iter != mHoleWaterObjects.end(); ++iter) +    { +        LLVOWater* waterp = (*iter).get(); +        gObjectList.killObject(waterp); +    } +    mHoleWaterObjects.clear(); +} + +void LLWorld::clearEdgeWaterObjects() +{ +    for (S32 i = 0; i < EDGE_WATER_OBJECTS_COUNT; i++) +    { +        gObjectList.killObject(mEdgeWaterObjects[i]); +        mEdgeWaterObjects[i] = NULL; +    } +} +  void LLWorld::updateWaterObjects()  {  	if (!gAgent.getRegion()) @@ -977,13 +999,7 @@ void LLWorld::updateWaterObjects()  		}  	} -	for (std::list<LLPointer<LLVOWater> >::iterator iter = mHoleWaterObjects.begin(); -		 iter != mHoleWaterObjects.end(); ++ iter) -	{ -		LLVOWater* waterp = (*iter).get(); -		gObjectList.killObject(waterp); -	} -	mHoleWaterObjects.clear(); +    clearHoleWaterObjects();  	// Use the water height of the region we're on for areas where there is no region  	F32 water_height = gAgent.getRegion()->getWaterHeight(); @@ -1024,7 +1040,7 @@ void LLWorld::updateWaterObjects()  		(S32)(512 - (region_y - min_y)) };  	S32 dir; -	for (dir = 0; dir < 8; dir++) +	for (dir = 0; dir < EDGE_WATER_OBJECTS_COUNT; dir++)  	{  		S32 dim[2] = { 0 };  		switch (gDirAxes[dir][0]) diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index 5c43cdf4e2..b6d3fcf7b1 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -122,12 +122,9 @@ public:  	void					updateRegions(F32 max_update_time);  	void					updateVisibilities();  	void					updateParticles(); -	void					updateClouds(const F32 dt); -	LLCloudGroup *			findCloudGroup(const LLCloudPuff &puff);  	void					renderPropertyLines(); -	void resetStats();  	void updateNetStats(); // Update network statistics for all the regions...  	void printPacketsLost(); @@ -140,7 +137,7 @@ public:  	void setLandFarClip(const F32 far_clip);  	LLViewerTexture *getDefaultWaterTexture(); -	void updateWaterObjects(); +    void updateWaterObjects();      void precullWaterObjects(LLCamera& camera, LLCullResult* cull, bool include_void_water); @@ -175,6 +172,9 @@ public:  	bool isRegionListed(const LLViewerRegion* region) const;  private: +    void clearHoleWaterObjects(); +    void clearEdgeWaterObjects(); +  	region_list_t	mActiveRegionList;  	region_list_t	mRegionList;  	region_list_t	mVisibleRegionList; @@ -206,7 +206,8 @@ private:  	//  	std::list<LLPointer<LLVOWater> > mHoleWaterObjects; -	LLPointer<LLVOWater> mEdgeWaterObjects[8]; +    static const S32 EDGE_WATER_OBJECTS_COUNT = 8; +    LLPointer<LLVOWater> mEdgeWaterObjects[EDGE_WATER_OBJECTS_COUNT];  	LLPointer<LLViewerTexture> mDefaultWaterTexturep;  }; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index bc63c3ffe3..64ecb8b297 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -685,7 +685,9 @@ void LLPipeline::cleanup()  	mFaceSelectImagep = NULL; -	mMovedBridge.clear(); +    mMovedList.clear(); +    mMovedBridge.clear(); +    mShiftList.clear();  	mInitialized = false; @@ -2822,6 +2824,14 @@ void LLPipeline::clearRebuildDrawables()  		drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD);  	}  	mMovedList.clear(); + +    for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin(); +        iter != mShiftList.end(); ++iter) +    { +        LLDrawable *drawablep = *iter; +        drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD | LLDrawable::ON_SHIFT_LIST); +    } +    mShiftList.clear();  }  void LLPipeline::rebuildPriorityGroups()  | 
