SL-17473 Viewer not clearing all Vertex Buffers #2
parent
c5433f1836
commit
841ca2f522
|
|
@ -39,7 +39,6 @@
|
|||
class LLViewerCamera;
|
||||
|
||||
class LLVOWLSky;
|
||||
class LLVOWLClouds;
|
||||
|
||||
|
||||
class LLSky
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ public:
|
|||
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
|
||||
/*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
|
||||
|
||||
void cleanupGL();
|
||||
};
|
||||
|
||||
#endif // LL_LLVOGROUND_H
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ LLWorld::LLWorld() :
|
|||
mSpaceTimeUSec(0),
|
||||
mLimitsNeedRefresh(true)// <AW: opensim-limits>
|
||||
{
|
||||
for (S32 i = 0; i < 8; i++)
|
||||
for (S32 i = 0; i < EDGE_WATER_OBJECTS_COUNT; i++)
|
||||
{
|
||||
mEdgeWaterObjects[i] = NULL;
|
||||
}
|
||||
|
|
@ -140,7 +140,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;
|
||||
}
|
||||
|
|
@ -1195,6 +1195,8 @@ void LLWorld::clearAllVisibleObjects()
|
|||
//clear all cached visible objects.
|
||||
(*iter)->clearCachedVisibleObjects();
|
||||
}
|
||||
clearHoleWaterObjects();
|
||||
clearEdgeWaterObjects();
|
||||
}
|
||||
|
||||
void LLWorld::updateParticles()
|
||||
|
|
@ -1368,7 +1370,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)
|
||||
|
|
@ -1379,6 +1381,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())
|
||||
|
|
@ -1431,13 +1453,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();
|
||||
|
|
@ -1496,7 +1512,7 @@ void LLWorld::updateWaterObjects()
|
|||
// </FS:CR> Fix water height on regions larger than 2048x2048
|
||||
|
||||
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])
|
||||
|
|
|
|||
|
|
@ -193,12 +193,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();
|
||||
|
|
@ -211,7 +208,7 @@ public:
|
|||
void setLandFarClip(const F32 far_clip);
|
||||
|
||||
LLViewerTexture *getDefaultWaterTexture();
|
||||
void updateWaterObjects();
|
||||
void updateWaterObjects();
|
||||
|
||||
void precullWaterObjects(LLCamera& camera, LLCullResult* cull, bool include_void_water);
|
||||
|
||||
|
|
@ -249,6 +246,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;
|
||||
|
|
@ -319,7 +319,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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -749,7 +749,9 @@ void LLPipeline::cleanup()
|
|||
|
||||
mFaceSelectImagep = NULL;
|
||||
|
||||
mMovedBridge.clear();
|
||||
mMovedList.clear();
|
||||
mMovedBridge.clear();
|
||||
mShiftList.clear();
|
||||
|
||||
mInitialized = false;
|
||||
|
||||
|
|
@ -2984,6 +2986,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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue