diff options
Diffstat (limited to 'indra/newview/llviewercontrol.cpp')
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 125 |
1 files changed, 21 insertions, 104 deletions
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 50d48987ed..7738cb904e 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -51,7 +51,6 @@ #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llvoiceclient.h" -#include "llvosky.h" #include "llvotree.h" #include "llvovolume.h" #include "llworld.h" @@ -151,15 +150,7 @@ static bool handleSetShaderChanged(const LLSD& newvalue) if (gPipeline.isInit()) { // ALM depends onto atmospheric shaders, state might have changed - bool old_state = LLPipeline::sRenderDeferred; LLPipeline::refreshCachedSettings(); - gPipeline.updateRenderDeferred(); - if (old_state != LLPipeline::sRenderDeferred) - { - gPipeline.releaseGLBuffers(); - gPipeline.createGLBuffers(); - gPipeline.resetVertexBuffers(); - } } // else, leave terrain detail as is @@ -167,20 +158,13 @@ static bool handleSetShaderChanged(const LLSD& newvalue) return true; } -static bool handleShadowDetailChanged(const LLSD& newvalue) -{ - gPipeline.handleShadowDetailChanged(); - return true; -} - static bool handleRenderPerfTestChanged(const LLSD& newvalue) { bool status = !newvalue.asBoolean(); if (!status) { gPipeline.clearRenderTypeMask(LLPipeline::RENDER_TYPE_WL_SKY, - LLPipeline::RENDER_TYPE_GROUND, - LLPipeline::RENDER_TYPE_TERRAIN, + LLPipeline::RENDER_TYPE_TERRAIN, LLPipeline::RENDER_TYPE_GRASS, LLPipeline::RENDER_TYPE_TREE, LLPipeline::RENDER_TYPE_WATER, @@ -194,7 +178,6 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue) else { gPipeline.setRenderTypeMask(LLPipeline::RENDER_TYPE_WL_SKY, - LLPipeline::RENDER_TYPE_GROUND, LLPipeline::RENDER_TYPE_TERRAIN, LLPipeline::RENDER_TYPE_GRASS, LLPipeline::RENDER_TYPE_TREE, @@ -215,10 +198,8 @@ bool handleRenderTransparentWaterChanged(const LLSD& newvalue) if (gPipeline.isInit()) { gPipeline.updateRenderTransparentWater(); - gPipeline.updateRenderDeferred(); gPipeline.releaseGLBuffers(); gPipeline.createGLBuffers(); - gPipeline.resetVertexBuffers(); LLViewerShaderMgr::instance()->setShaders(); } LLWorld::getInstance()->updateWaterObjects(); @@ -355,12 +336,6 @@ static bool handleMaxPartCountChanged(const LLSD& newvalue) return true; } -static bool handleVideoMemoryChanged(const LLSD& newvalue) -{ - gTextureList.updateMaxResidentTexMem(S32Megabytes(newvalue.asInteger())); - return true; -} - static bool handleChatFontSizeChanged(const LLSD& newvalue) { if(gConsole) @@ -401,7 +376,7 @@ static bool handleJoystickChanged(const LLSD& newvalue) static bool handleUseOcclusionChanged(const LLSD& newvalue) { - LLPipeline::sUseOcclusion = (newvalue.asBoolean() && gGLManager.mHasOcclusionQuery + LLPipeline::sUseOcclusion = (newvalue.asBoolean() && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion") && !gUseWireframe) ? 2 : 0; return true; } @@ -422,15 +397,6 @@ static bool handleWLSkyDetailChanged(const LLSD&) return true; } -static bool handleResetVertexBuffersChanged(const LLSD&) -{ - if (gPipeline.isInit()) - { - gPipeline.resetVertexBuffers(); - } - return true; -} - static bool handleRepartition(const LLSD&) { if (gPipeline.isInit()) @@ -448,47 +414,17 @@ static bool handleRenderDynamicLODChanged(const LLSD& newvalue) return true; } -static bool handleRenderLocalLightsChanged(const LLSD& newvalue) -{ - gPipeline.setLightingDetail(-1); - return true; -} - -static bool handleRenderDeferredChanged(const LLSD& newvalue) +static bool handleReflectionProbeDetailChanged(const LLSD& newvalue) { - LLRenderTarget::sUseFBO = newvalue.asBoolean(); - if (gPipeline.isInit()) - { - LLPipeline::refreshCachedSettings(); - gPipeline.updateRenderDeferred(); - gPipeline.releaseGLBuffers(); - gPipeline.createGLBuffers(); - gPipeline.resetVertexBuffers(); - if (LLPipeline::sRenderDeferred == (BOOL)LLRenderTarget::sUseFBO) - { - LLViewerShaderMgr::instance()->setShaders(); - } - } - return true; -} - -// This looks a great deal like handleRenderDeferredChanged because -// Advanced Lighting (Materials) implies bumps and shiny so disabling -// bumps should further disable that feature. -// -static bool handleRenderBumpChanged(const LLSD& newval) -{ - LLRenderTarget::sUseFBO = newval.asBoolean() && gSavedSettings.getBOOL("RenderDeferred"); - if (gPipeline.isInit()) - { - gPipeline.updateRenderBump(); - gPipeline.updateRenderDeferred(); - gPipeline.releaseGLBuffers(); - gPipeline.createGLBuffers(); - gPipeline.resetVertexBuffers(); - LLViewerShaderMgr::instance()->setShaders(); - } - return true; + if (gPipeline.isInit()) + { + LLPipeline::refreshCachedSettings(); + gPipeline.releaseGLBuffers(); + gPipeline.createGLBuffers(); + LLViewerShaderMgr::instance()->setShaders(); + gPipeline.mReflectionMapManager.reset(); + } + return true; } static bool handleRenderDebugPipelineChanged(const LLSD& newvalue) @@ -650,8 +586,6 @@ bool toggle_show_object_render_cost(const LLSD& newvalue) return true; } -void handleRenderAutoMuteByteLimitChanged(const LLSD& new_value); - void handleTargetFPSChanged(const LLSD& newValue) { const auto targetFPS = gSavedSettings.getU32("TargetFPS"); @@ -696,12 +630,6 @@ void handleUserTargetDrawDistanceChanged(const LLSD& newValue) LLPerfStats::tunables.userTargetDrawDistance = newval; } -void handleUserTargetReflectionsChanged(const LLSD& newValue) -{ - const auto newval = gSavedSettings.getS32("UserTargetReflections"); - LLPerfStats::tunables.userTargetReflections = newval; -} - void handlePerformanceStatsEnabledChanged(const LLSD& newValue) { const auto newval = gSavedSettings.getBOOL("PerfStatsCaptureEnabled"); @@ -763,10 +691,10 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "OctreeAlphaDistanceFactor", handleRepartition); setting_setup_signal_listener(gSavedSettings, "OctreeAttachmentSizeFactor", handleRepartition); setting_setup_signal_listener(gSavedSettings, "RenderMaxTextureIndex", handleSetShaderChanged); - setting_setup_signal_listener(gSavedSettings, "RenderUseTriStrips", handleResetVertexBuffersChanged); setting_setup_signal_listener(gSavedSettings, "RenderUIBuffer", handleWindowResized); setting_setup_signal_listener(gSavedSettings, "RenderDepthOfField", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderFSAASamples", handleReleaseGLBufferChanged); + setting_setup_signal_listener(gSavedSettings, "RenderPostProcessingHDR", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularResX", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularResY", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularExponent", handleLUTBufferChanged); @@ -775,8 +703,8 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderGlowResolutionPow", handleReleaseGLBufferChanged); - setting_setup_signal_listener(gSavedSettings, "RenderAvatarCloth", handleSetShaderChanged); - setting_setup_signal_listener(gSavedSettings, "WindLightUseAtmosShaders", handleSetShaderChanged); + setting_setup_signal_listener(gSavedSettings, "RenderGlowHDR", handleReleaseGLBufferChanged); + setting_setup_signal_listener(gSavedSettings, "RenderGlowNoise", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderGammaFull", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderVolumeLODFactor", handleVolumeLODChanged); setting_setup_signal_listener(gSavedSettings, "RenderAvatarLODFactor", handleAvatarLODChanged); @@ -788,21 +716,17 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderFogRatio", handleFogRatioChanged); setting_setup_signal_listener(gSavedSettings, "RenderMaxPartCount", handleMaxPartCountChanged); setting_setup_signal_listener(gSavedSettings, "RenderDynamicLOD", handleRenderDynamicLODChanged); - setting_setup_signal_listener(gSavedSettings, "RenderLocalLights", handleRenderLocalLightsChanged); - setting_setup_signal_listener(gSavedSettings, "RenderDebugTextureBind", handleResetVertexBuffersChanged); - setting_setup_signal_listener(gSavedSettings, "RenderAutoMaskAlphaDeferred", handleResetVertexBuffersChanged); - setting_setup_signal_listener(gSavedSettings, "RenderAutoMaskAlphaNonDeferred", handleResetVertexBuffersChanged); - setting_setup_signal_listener(gSavedSettings, "RenderObjectBump", handleRenderBumpChanged); - setting_setup_signal_listener(gSavedSettings, "RenderMaxVBOSize", handleResetVertexBuffersChanged); - setting_setup_signal_listener(gSavedSettings, "RenderVSyncEnable", handleVSyncChanged); + setting_setup_signal_listener(gSavedSettings, "RenderVSyncEnable", handleVSyncChanged); setting_setup_signal_listener(gSavedSettings, "RenderDeferredNoise", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderDebugPipeline", handleRenderDebugPipelineChanged); setting_setup_signal_listener(gSavedSettings, "RenderResolutionDivisor", handleRenderResolutionDivisorChanged); - setting_setup_signal_listener(gSavedSettings, "RenderDeferred", handleRenderDeferredChanged); - setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleShadowDetailChanged); + setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeLevel", handleReflectionProbeDetailChanged); + setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeDetail", handleReflectionProbeDetailChanged); + setting_setup_signal_listener(gSavedSettings, "RenderReflectionsEnabled", handleReflectionProbeDetailChanged); + setting_setup_signal_listener(gSavedSettings, "RenderScreenSpaceReflections", handleReflectionProbeDetailChanged); + setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderDeferredSSAO", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderPerformanceTest", handleRenderPerfTestChanged); - setting_setup_signal_listener(gSavedSettings, "TextureMemory", handleVideoMemoryChanged); setting_setup_signal_listener(gSavedSettings, "ChatFontSize", handleChatFontSizeChanged); setting_setup_signal_listener(gSavedSettings, "ChatPersistTime", handleChatPersistTimeChanged); setting_setup_signal_listener(gSavedSettings, "ConsoleMaxLines", handleConsoleMaxLinesChanged); @@ -824,11 +748,6 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "MuteVoice", handleAudioVolumeChanged); setting_setup_signal_listener(gSavedSettings, "MuteAmbient", handleAudioVolumeChanged); setting_setup_signal_listener(gSavedSettings, "MuteUI", handleAudioVolumeChanged); - setting_setup_signal_listener(gSavedSettings, "RenderVBOEnable", handleResetVertexBuffersChanged); - setting_setup_signal_listener(gSavedSettings, "RenderUseVAO", handleResetVertexBuffersChanged); - setting_setup_signal_listener(gSavedSettings, "RenderVBOMappingDisable", handleResetVertexBuffersChanged); - setting_setup_signal_listener(gSavedSettings, "RenderUseStreamVBO", handleResetVertexBuffersChanged); - setting_setup_signal_listener(gSavedSettings, "RenderPreferStreamDraw", handleResetVertexBuffersChanged); setting_setup_signal_listener(gSavedSettings, "WLSkyDetail", handleWLSkyDetailChanged); setting_setup_signal_listener(gSavedSettings, "JoystickAxis0", handleJoystickChanged); setting_setup_signal_listener(gSavedSettings, "JoystickAxis1", handleJoystickChanged); @@ -901,14 +820,12 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "SpellCheckDictionary", handleSpellCheckChanged); setting_setup_signal_listener(gSavedSettings, "LoginLocation", handleLoginLocationChanged); setting_setup_signal_listener(gSavedSettings, "DebugAvatarJoints", handleDebugAvatarJointsChanged); - setting_setup_signal_listener(gSavedSettings, "RenderAutoMuteByteLimit", handleRenderAutoMuteByteLimitChanged); setting_setup_signal_listener(gSavedSettings, "TargetFPS", handleTargetFPSChanged); setting_setup_signal_listener(gSavedSettings, "AutoTuneFPS", handleAutoTuneFPSChanged); setting_setup_signal_listener(gSavedSettings, "AutoTuneLock", handleAutoTuneLockChanged); setting_setup_signal_listener(gSavedSettings, "RenderAvatarMaxART", handleRenderAvatarMaxARTChanged); setting_setup_signal_listener(gSavedSettings, "PerfStatsCaptureEnabled", handlePerformanceStatsEnabledChanged); - setting_setup_signal_listener(gSavedSettings, "UserTargetReflections", handleUserTargetReflectionsChanged); setting_setup_signal_listener(gSavedSettings, "AutoTuneRenderFarClipTarget", handleUserTargetDrawDistanceChanged); setting_setup_signal_listener(gSavedSettings, "AutoTuneImpostorFarAwayDistance", handleUserImpostorDistanceChanged); setting_setup_signal_listener(gSavedSettings, "AutoTuneImpostorByDistEnabled", handleUserImpostorByDistEnabledChanged); |