summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-02-08 11:56:18 -0600
committerDave Parks <davep@lindenlab.com>2010-02-08 11:56:18 -0600
commit9bd192d8b7ed5ea4a95bfa5cb6dd8163b8bcd298 (patch)
treef4d964eb140b8bc175ee5cde2b555f93de9b594b /indra/newview/pipeline.cpp
parentac59a7c130f3fcbbb8f228bdf69c44ffa09f07a2 (diff)
parent42df75bafeab49b408f23d79feb4f2213d2560eb (diff)
merge
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp79
1 files changed, 28 insertions, 51 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 4f4fc83819..91da9e39e0 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -116,7 +116,6 @@ const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f;
-const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40;
const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10;
const U32 REFLECTION_MAP_RES = 128;
@@ -271,6 +270,7 @@ BOOL LLPipeline::sDelayVBUpdate = TRUE;
BOOL LLPipeline::sFastAlpha = TRUE;
BOOL LLPipeline::sDisableShaders = FALSE;
BOOL LLPipeline::sRenderBump = TRUE;
+BOOL LLPipeline::sUseTriStrips = TRUE;
BOOL LLPipeline::sUseFarClip = TRUE;
BOOL LLPipeline::sShadowRender = FALSE;
BOOL LLPipeline::sWaterReflections = FALSE;
@@ -359,6 +359,7 @@ void LLPipeline::init()
sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
+ sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
@@ -1411,38 +1412,26 @@ void LLPipeline::updateMove()
assertInitialized();
- for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin();
- iter != mRetexturedList.end(); ++iter)
{
- LLDrawable* drawablep = *iter;
- if (drawablep && !drawablep->isDead())
- {
- drawablep->updateTexture();
- }
- }
- mRetexturedList.clear();
-
- updateMovedList(mMovedList);
+ static LLFastTimer::DeclareTimer ftm("Retexture");
+ LLFastTimer t(ftm);
- for (LLDrawable::drawable_set_t::iterator iter = mActiveQ.begin();
- iter != mActiveQ.end(); )
- {
- LLDrawable::drawable_set_t::iterator curiter = iter++;
- LLDrawable* drawablep = *curiter;
- if (drawablep && !drawablep->isDead())
+ for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin();
+ iter != mRetexturedList.end(); ++iter)
{
- if (drawablep->isRoot() &&
- drawablep->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES &&
- (!drawablep->getParent() || !drawablep->getParent()->isActive()))
+ LLDrawable* drawablep = *iter;
+ if (drawablep && !drawablep->isDead())
{
- drawablep->makeStatic(); // removes drawable and its children from mActiveQ
- iter = mActiveQ.upper_bound(drawablep); // next valid entry
+ drawablep->updateTexture();
}
}
- else
- {
- mActiveQ.erase(curiter);
- }
+ mRetexturedList.clear();
+ }
+
+ {
+ static LLFastTimer::DeclareTimer ftm("Moved List");
+ LLFastTimer t(ftm);
+ updateMovedList(mMovedList);
}
//balance octrees
@@ -3058,12 +3047,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
}
}
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING))
- {
- LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect");
- gObjectList.renderObjectsForSelect(camera, gViewerWindow->getWindowRectScaled());
- }
- else
{
LLFastTimer t(FTM_POOLS);
@@ -3514,9 +3497,19 @@ void LLPipeline::renderGeomShadow(LLCamera& camera)
}
-void LLPipeline::addTrianglesDrawn(S32 count)
+void LLPipeline::addTrianglesDrawn(S32 index_count, U32 render_type)
{
assertInitialized();
+ S32 count = 0;
+ if (render_type == LLRender::TRIANGLE_STRIP)
+ {
+ count = index_count-2;
+ }
+ else
+ {
+ count = index_count/3;
+ }
+
mTrianglesDrawn += count;
mBatchCount++;
mMaxBatchSize = llmax(mMaxBatchSize, count);
@@ -4797,10 +4790,6 @@ void LLPipeline::findReferences(LLDrawable *drawablep)
llinfos << "In mRetexturedList" << llendl;
}
- if (mActiveQ.find(drawablep) != mActiveQ.end())
- {
- llinfos << "In mActiveQ" << llendl;
- }
if (std::find(mBuildQ1.begin(), mBuildQ1.end(), drawablep) != mBuildQ1.end())
{
llinfos << "In mBuildQ1" << llendl;
@@ -4957,19 +4946,6 @@ void LLPipeline::setLight(LLDrawable *drawablep, BOOL is_light)
}
}
-void LLPipeline::setActive(LLDrawable *drawablep, BOOL active)
-{
- assertInitialized();
- if (active)
- {
- mActiveQ.insert(drawablep);
- }
- else
- {
- mActiveQ.erase(drawablep);
- }
-}
-
//static
void LLPipeline::toggleRenderType(U32 type)
{
@@ -5385,6 +5361,7 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable)
void LLPipeline::resetVertexBuffers()
{
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
+ sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)