Catch up with viewer-beta. Primarily sim transition alterations to reduce frame hitching, and some optimization in LLViewerObjectList (std::set -> std::vector and and some allocation tweakage).

This commit is contained in:
Shyotl
2012-10-20 17:02:43 -05:00
parent 43271f290e
commit b73f4dd8e4
20 changed files with 218 additions and 96 deletions

View File

@@ -49,6 +49,7 @@
#include "lldrawpool.h"
#include "noise.h"
extern bool gShiftFrame;
extern U64 gFrameTime;
extern LLPipeline gPipeline;
@@ -224,7 +225,7 @@ void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3
pos_agent.mV[VX] += x * mSurfacep->getMetersPerGrid();
pos_agent.mV[VY] += y * mSurfacep->getMetersPerGrid();
pos_agent.mV[VZ] = *(mDataZ + point_offset);
*vertex = pos_agent;
*vertex = pos_agent-mVObjp->getRegion()->getOriginAgent();
LLVector3 rel_pos = pos_agent - mSurfacep->getOriginAgent();
LLVector3 tex_pos = rel_pos * (1.f/surface_stride);
@@ -372,10 +373,13 @@ void LLSurfacePatch::updateCameraDistanceRegion(const LLVector3 &pos_region)
{
if (LLPipeline::sDynamicLOD)
{
LLVector3 dv = pos_region;
dv -= mCenterRegion;
mVisInfo.mDistance = llmax(0.f, (F32)(dv.magVec() - mRadius))/
llmax(LLVOSurfacePatch::sLODFactor, 0.1f);
if (!gShiftFrame)
{
LLVector3 dv = pos_region;
dv -= mCenterRegion;
mVisInfo.mDistance = llmax(0.f, (F32)(dv.magVec() - mRadius))/
llmax(LLVOSurfacePatch::sLODFactor, 0.1f);
}
}
else
{