aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/pipeline.cpp')
-rw-r--r--linden/indra/newview/pipeline.cpp76
1 files changed, 46 insertions, 30 deletions
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp
index f10aca5..0ca94dc 100644
--- a/linden/indra/newview/pipeline.cpp
+++ b/linden/indra/newview/pipeline.cpp
@@ -1014,8 +1014,8 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
1014 { 1014 {
1015 return 0; 1015 return 0;
1016 } 1016 }
1017 1017 static BOOL sRenderDelayCreation = gSavedSettings.getBOOL("RenderDelayCreation");
1018 if (gSavedSettings.getBOOL("RenderDelayCreation")) 1018 if (sRenderDelayCreation)
1019 { 1019 {
1020 mCreateQ.push_back(vobj); 1020 mCreateQ.push_back(vobj);
1021 } 1021 }
@@ -1078,7 +1078,9 @@ void LLPipeline::createObject(LLViewerObject* vobj)
1078 1078
1079 markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE); 1079 markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE);
1080 1080
1081 if (drawablep->getVOVolume() && gSavedSettings.getBOOL("RenderAnimateRes")) 1081 static BOOL sRenderAnimateRes = gSavedSettings.getBOOL("RenderAnimateRes");
1082
1083 if (drawablep->getVOVolume() && sRenderAnimateRes)
1082 { 1084 {
1083 // fun animated res 1085 // fun animated res
1084 drawablep->updateXform(TRUE); 1086 drawablep->updateXform(TRUE);
@@ -1117,7 +1119,8 @@ void LLPipeline::resetFrameStats()
1117//external functions for asynchronous updating 1119//external functions for asynchronous updating
1118void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) 1120void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
1119{ 1121{
1120 if (gSavedSettings.getBOOL("FreezeTime")) 1122 static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true);
1123 if ((*sFreezeTime))
1121 { 1124 {
1122 return; 1125 return;
1123 } 1126 }
@@ -1147,7 +1150,8 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
1147 1150
1148void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep) 1151void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep)
1149{ 1152{
1150 if (gSavedSettings.getBOOL("FreezeTime")) 1153 static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true);
1154 if ((*sFreezeTime))
1151 { 1155 {
1152 return; 1156 return;
1153 } 1157 }
@@ -1200,7 +1204,8 @@ void LLPipeline::updateMove()
1200 LLFastTimer t(LLFastTimer::FTM_UPDATE_MOVE); 1204 LLFastTimer t(LLFastTimer::FTM_UPDATE_MOVE);
1201 LLMemType mt(LLMemType::MTYPE_PIPELINE); 1205 LLMemType mt(LLMemType::MTYPE_PIPELINE);
1202 1206
1203 if (gSavedSettings.getBOOL("FreezeTime")) 1207 static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true);
1208 if ((*sFreezeTime))
1204 { 1209 {
1205 return; 1210 return;
1206 } 1211 }
@@ -1833,11 +1838,12 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f
1833void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) 1838void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
1834{ 1839{
1835 const U32 face_mask = (1 << LLPipeline::RENDER_TYPE_AVATAR) | 1840 const U32 face_mask = (1 << LLPipeline::RENDER_TYPE_AVATAR) |
1836 (1 << LLPipeline::RENDER_TYPE_GROUND) | 1841 (1 << LLPipeline::RENDER_TYPE_GROUND) |
1837 (1 << LLPipeline::RENDER_TYPE_TERRAIN) | 1842 (1 << LLPipeline::RENDER_TYPE_TERRAIN) |
1838 (1 << LLPipeline::RENDER_TYPE_TREE) | 1843 (1 << LLPipeline::RENDER_TYPE_TREE) |
1839 (1 << LLPipeline::RENDER_TYPE_SKY) | 1844 (1 << LLPipeline::RENDER_TYPE_SKY) |
1840 (1 << LLPipeline::RENDER_TYPE_WATER); 1845 (1 << LLPipeline::RENDER_TYPE_VOIDWATER) |
1846 (1 << LLPipeline::RENDER_TYPE_WATER);
1841 1847
1842 if (mRenderTypeMask & face_mask) 1848 if (mRenderTypeMask & face_mask)
1843 { 1849 {
@@ -2294,8 +2300,10 @@ void LLPipeline::postSort(LLCamera& camera)
2294 std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); 2300 std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
2295 } 2301 }
2296 2302
2303 static BOOL* sBeaconsEnabled = rebind_llcontrol<BOOL>("BeaconsEnabled", &gSavedSettings, true);
2304
2297 // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus 2305 // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
2298 if (gSavedSettings.getBOOL("BeaconsEnabled") && !sShadowRender) 2306 if (*sBeaconsEnabled && !sShadowRender)
2299 { 2307 {
2300 if (sRenderScriptedTouchBeacons) 2308 if (sRenderScriptedTouchBeacons)
2301 { 2309 {
@@ -4436,6 +4444,11 @@ void LLPipeline::toggleRenderType(U32 type)
4436{ 4444{
4437 U32 bit = (1<<type); 4445 U32 bit = (1<<type);
4438 gPipeline.mRenderTypeMask ^= bit; 4446 gPipeline.mRenderTypeMask ^= bit;
4447 if (type == RENDER_TYPE_WATER)
4448 {
4449 bit = (1 << RENDER_TYPE_VOIDWATER);
4450 gPipeline.mRenderTypeMask ^= bit;
4451 }
4439} 4452}
4440 4453
4441//static 4454//static
@@ -5744,18 +5757,19 @@ void LLPipeline::renderDeferredLighting()
5744 LLGLDisable stencil(GL_STENCIL_TEST); 5757 LLGLDisable stencil(GL_STENCIL_TEST);
5745 5758
5746 U32 render_mask = mRenderTypeMask; 5759 U32 render_mask = mRenderTypeMask;
5747 mRenderTypeMask = mRenderTypeMask & 5760 mRenderTypeMask = mRenderTypeMask &
5748 ((1 << LLPipeline::RENDER_TYPE_SKY) | 5761 ((1 << LLPipeline::RENDER_TYPE_SKY) |
5749 (1 << LLPipeline::RENDER_TYPE_CLOUDS) | 5762 (1 << LLPipeline::RENDER_TYPE_CLOUDS) |
5750 (1 << LLPipeline::RENDER_TYPE_WL_SKY) | 5763 (1 << LLPipeline::RENDER_TYPE_WL_SKY) |
5751 (1 << LLPipeline::RENDER_TYPE_ALPHA) | 5764 (1 << LLPipeline::RENDER_TYPE_ALPHA) |
5752 (1 << LLPipeline::RENDER_TYPE_AVATAR) | 5765 (1 << LLPipeline::RENDER_TYPE_AVATAR) |
5753 (1 << LLPipeline::RENDER_TYPE_WATER) | 5766 (1 << LLPipeline::RENDER_TYPE_VOIDWATER) |
5754 (1 << LLPipeline::RENDER_TYPE_FULLBRIGHT) | 5767 (1 << LLPipeline::RENDER_TYPE_WATER) |
5755 (1 << LLPipeline::RENDER_TYPE_VOLUME) | 5768 (1 << LLPipeline::RENDER_TYPE_FULLBRIGHT) |
5756 (1 << LLPipeline::RENDER_TYPE_GLOW) | 5769 (1 << LLPipeline::RENDER_TYPE_VOLUME) |
5757 (1 << LLPipeline::RENDER_TYPE_BUMP)); 5770 (1 << LLPipeline::RENDER_TYPE_GLOW) |
5758 5771 (1 << LLPipeline::RENDER_TYPE_BUMP));
5772
5759 renderGeomPostDeferred(*LLViewerCamera::getInstance()); 5773 renderGeomPostDeferred(*LLViewerCamera::getInstance());
5760 mRenderTypeMask = render_mask; 5774 mRenderTypeMask = render_mask;
5761 } 5775 }
@@ -5910,10 +5924,11 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
5910 5924
5911 if (LLDrawPoolWater::sNeedsDistortionUpdate) 5925 if (LLDrawPoolWater::sNeedsDistortionUpdate)
5912 { 5926 {
5913 mRenderTypeMask &= ~((1<<LLPipeline::RENDER_TYPE_WATER) | 5927 mRenderTypeMask &= ~((1<<LLPipeline::RENDER_TYPE_WATER) |
5914 (1<<LLPipeline::RENDER_TYPE_GROUND) | 5928 (1<<LLPipeline::RENDER_TYPE_VOIDWATER) |
5915 (1<<LLPipeline::RENDER_TYPE_SKY) | 5929 (1<<LLPipeline::RENDER_TYPE_GROUND) |
5916 (1<<LLPipeline::RENDER_TYPE_CLOUDS)); 5930 (1<<LLPipeline::RENDER_TYPE_SKY) |
5931 (1<<LLPipeline::RENDER_TYPE_CLOUDS));
5917 5932
5918 if (gSavedSettings.getBOOL("RenderWaterReflections")) 5933 if (gSavedSettings.getBOOL("RenderWaterReflections"))
5919 { //mask out selected geometry based on reflection detail 5934 { //mask out selected geometry based on reflection detail
@@ -5955,8 +5970,9 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
5955 if (last_update) 5970 if (last_update)
5956 { 5971 {
5957 camera.setFar(camera_in.getFar()); 5972 camera.setFar(camera_in.getFar());
5958 mRenderTypeMask = type_mask & (~(1<<LLPipeline::RENDER_TYPE_WATER) | 5973 mRenderTypeMask = type_mask & ~((1<<LLPipeline::RENDER_TYPE_WATER) |
5959 (1<<LLPipeline::RENDER_TYPE_GROUND)); 5974 (1<<LLPipeline::RENDER_TYPE_VOIDWATER) |
5975 (1<<LLPipeline::RENDER_TYPE_GROUND));
5960 stop_glerror(); 5976 stop_glerror();
5961 5977
5962 LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? FALSE : TRUE; 5978 LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? FALSE : TRUE;