summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/pipeline.cpp83
1 files changed, 57 insertions, 26 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 2051772d63..7eed9acb4b 100644..100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -71,6 +71,7 @@
#include "llhudtext.h"
#include "lllightconstants.h"
#include "llmeshrepository.h"
+#include "llpipelinelistener.h"
#include "llresmgr.h"
#include "llselectmgr.h"
#include "llsky.h"
@@ -377,6 +378,8 @@ BOOL LLPipeline::sMemAllocationThrottled = FALSE;
S32 LLPipeline::sVisibleLightCount = 0;
F32 LLPipeline::sMinRenderSize = 0.f;
+// EventHost API LLPipeline listener.
+static LLPipelineListener sPipelineListener;
static LLCullResult* sCull = NULL;
@@ -491,19 +494,29 @@ void LLPipeline::init()
LLViewerStats::getInstance()->mTrianglesDrawnStat.reset();
resetFrameStats();
- for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
+ if (gSavedSettings.getBOOL("DisableAllRenderFeatures"))
{
- mRenderTypeEnabled[i] = TRUE; //all rendering types start enabled
+ clearAllRenderDebugFeatures();
}
+ else
+ {
+ setAllRenderDebugFeatures(); // By default, all debugging features on
+ }
+ clearAllRenderDebugDisplays(); // All debug displays off
- mRenderDebugFeatureMask = 0xffffffff; // All debugging features on
- mRenderDebugMask = 0; // All debug starts off
-
- // Don't turn on ground when this is set
- // Mac Books with intel 950s need this
- if(!gSavedSettings.getBOOL("RenderGround"))
+ if (gSavedSettings.getBOOL("DisableAllRenderTypes"))
{
- toggleRenderType(RENDER_TYPE_GROUND);
+ clearAllRenderTypes();
+ }
+ else
+ {
+ setAllRenderTypes(); // By default, all rendering types start enabled
+ // Don't turn on ground when this is set
+ // Mac Books with intel 950s need this
+ if(!gSavedSettings.getBOOL("RenderGround"))
+ {
+ toggleRenderType(RENDER_TYPE_GROUND);
+ }
}
// make sure RenderPerformanceTest persists (hackity hack hack)
@@ -3293,11 +3306,6 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
{
drawablep->setVisible(camera, NULL, FALSE);
}
- else if (drawablep->isState(LLDrawable::CLEAR_INVISIBLE))
- {
- // clear invisible flag here to avoid single frame glitch
- drawablep->clearState(LLDrawable::FORCE_INVISIBLE|LLDrawable::CLEAR_INVISIBLE);
- }
}
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
@@ -5290,11 +5298,6 @@ void LLPipeline::rebuildPools()
}
max_count--;
}
-
- if (isAgentAvatarValid())
- {
- gAgentAvatarp->rebuildHUD();
- }
}
void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
@@ -5779,7 +5782,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
// crazy cast so that we can overwrite the fade value
// even though gcc enforces sets as const
// (fade value doesn't affect sort so this is safe)
- Light* farthest_light = ((Light*) (&(*(mNearbyLights.rbegin()))));
+ Light* farthest_light = (const_cast<Light*>(&(*(mNearbyLights.rbegin()))));
if (light->dist < farthest_light->dist)
{
if (farthest_light->fade >= 0.f)
@@ -5922,7 +5925,6 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
if (light->isLightSpotlight() // directional (spot-)light
&& (LLPipeline::sRenderDeferred || RenderSpotLightsInNondeferred)) // these are only rendered as GL spotlights if we're in deferred rendering mode *or* the setting forces them on
{
- LLVector3 spotparams = light->getSpotLightParams();
LLQuaternion quat = light->getRenderRotation();
LLVector3 at_axis(0,0,-1); // this matches deferred rendering's object light direction
at_axis *= quat;
@@ -6453,6 +6455,22 @@ void LLPipeline::setRenderDebugFeatureControl(U32 bit, bool value)
}
}
+void LLPipeline::pushRenderDebugFeatureMask()
+{
+ mRenderDebugFeatureStack.push(mRenderDebugFeatureMask);
+}
+
+void LLPipeline::popRenderDebugFeatureMask()
+{
+ if (mRenderDebugFeatureStack.empty())
+ {
+ llerrs << "Depleted render feature stack." << llendl;
+ }
+
+ mRenderDebugFeatureMask = mRenderDebugFeatureStack.top();
+ mRenderDebugFeatureStack.pop();
+}
+
// static
void LLPipeline::setRenderScriptedBeacons(BOOL val)
{
@@ -6810,7 +6828,7 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable)
}
void LLPipeline::resetVertexBuffers()
-{
+{
mResetVertexBuffers = true;
}
@@ -9086,9 +9104,6 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
3,7
};
- LLVector3 center = (max+min)*0.5f;
- LLVector3 size = (max-min)*0.5f;
-
for (U32 i = 0; i < 12; i++)
{
for (U32 j = 0; j < 6; ++j)
@@ -9314,7 +9329,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
mSunOrthoClipPlanes = LLVector4(clip, clip.mV[2]*clip.mV[2]/clip.mV[1]);
//currently used for amount to extrude frusta corners for constructing shadow frusta
- LLVector3 n = RenderShadowNearDist;
+ //LLVector3 n = RenderShadowNearDist;
//F32 nearDist[] = { n.mV[0], n.mV[1], n.mV[2], n.mV[2] };
//put together a universal "near clip" plane for shadow frusta
@@ -10419,6 +10434,22 @@ void LLPipeline::clearRenderTypeMask(U32 type, ...)
}
}
+void LLPipeline::setAllRenderTypes()
+{
+ for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
+ {
+ mRenderTypeEnabled[i] = TRUE;
+ }
+}
+
+void LLPipeline::clearAllRenderTypes()
+{
+ for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
+ {
+ mRenderTypeEnabled[i] = FALSE;
+ }
+}
+
void LLPipeline::addDebugBlip(const LLVector3& position, const LLColor4& color)
{
DebugBlip blip(position, color);