diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llviewercontrol.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/newview/llviewercontrol.cpp')
-rw-r--r-- | linden/indra/newview/llviewercontrol.cpp | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index df39ee7..2c48766 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp | |||
@@ -18,7 +18,8 @@ | |||
18 | * There are special exceptions to the terms and conditions of the GPL as | 18 | * There are special exceptions to the terms and conditions of the GPL as |
19 | * it is applied to this Source Code. View the full text of the exception | 19 | * it is applied to this Source Code. View the full text of the exception |
20 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 20 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
21 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 21 | * online at |
22 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
22 | * | 23 | * |
23 | * By copying, modifying or distributing this software, you acknowledge | 24 | * By copying, modifying or distributing this software, you acknowledge |
24 | * that you have read and understood your obligations described above, | 25 | * that you have read and understood your obligations described above, |
@@ -44,7 +45,6 @@ | |||
44 | #include "llflexibleobject.h" | 45 | #include "llflexibleobject.h" |
45 | #include "llfeaturemanager.h" | 46 | #include "llfeaturemanager.h" |
46 | #include "llviewershadermgr.h" | 47 | #include "llviewershadermgr.h" |
47 | #include "llnetmap.h" | ||
48 | #include "llpanelgeneral.h" | 48 | #include "llpanelgeneral.h" |
49 | #include "llpanelinput.h" | 49 | #include "llpanelinput.h" |
50 | #include "llsky.h" | 50 | #include "llsky.h" |
@@ -118,6 +118,12 @@ static bool handleSetShaderChanged(const LLSD& newvalue) | |||
118 | return true; | 118 | return true; |
119 | } | 119 | } |
120 | 120 | ||
121 | static bool handleSetSelfInvisible( const LLSD& newvalue) | ||
122 | { | ||
123 | LLVOAvatar::onChangeSelfInvisible( newvalue.asBoolean() ); | ||
124 | return true; | ||
125 | } | ||
126 | |||
121 | static bool handleReleaseGLBufferChanged(const LLSD& newvalue) | 127 | static bool handleReleaseGLBufferChanged(const LLSD& newvalue) |
122 | { | 128 | { |
123 | if (gPipeline.isInit()) | 129 | if (gPipeline.isInit()) |
@@ -204,16 +210,6 @@ static bool handleMaxPartCountChanged(const LLSD& newvalue) | |||
204 | return true; | 210 | return true; |
205 | } | 211 | } |
206 | 212 | ||
207 | const S32 MAX_USER_COMPOSITE_LIMIT = 100; | ||
208 | const S32 MIN_USER_COMPOSITE_LIMIT = 0; | ||
209 | |||
210 | static bool handleCompositeLimitChanged(const LLSD& newvalue) | ||
211 | { | ||
212 | S32 composite_limit = llmax(MIN_USER_COMPOSITE_LIMIT, llmin((S32)newvalue.asInteger(), MAX_USER_COMPOSITE_LIMIT)); | ||
213 | LLVOAvatar::sMaxOtherAvatarsToComposite = composite_limit; | ||
214 | return true; | ||
215 | } | ||
216 | |||
217 | static bool handleVideoMemoryChanged(const LLSD& newvalue) | 213 | static bool handleVideoMemoryChanged(const LLSD& newvalue) |
218 | { | 214 | { |
219 | gImageList.updateMaxResidentTexMem(newvalue.asInteger()); | 215 | gImageList.updateMaxResidentTexMem(newvalue.asInteger()); |
@@ -296,6 +292,13 @@ static bool handleUseOcclusionChanged(const LLSD& newvalue) | |||
296 | return true; | 292 | return true; |
297 | } | 293 | } |
298 | 294 | ||
295 | static bool handleUploadBakedTexOldChanged(const LLSD& newvalue) | ||
296 | { | ||
297 | LLPipeline::sForceOldBakedUpload = newvalue.asBoolean(); | ||
298 | return true; | ||
299 | } | ||
300 | |||
301 | |||
299 | static bool handleNumpadControlChanged(const LLSD& newvalue) | 302 | static bool handleNumpadControlChanged(const LLSD& newvalue) |
300 | { | 303 | { |
301 | if (gKeyboard) | 304 | if (gKeyboard) |
@@ -354,19 +357,24 @@ static bool handleRenderUseFBOChanged(const LLSD& newvalue) | |||
354 | { | 357 | { |
355 | gPipeline.releaseGLBuffers(); | 358 | gPipeline.releaseGLBuffers(); |
356 | gPipeline.createGLBuffers(); | 359 | gPipeline.createGLBuffers(); |
360 | if (LLPipeline::sRenderDeferred && LLRenderTarget::sUseFBO) | ||
361 | { | ||
362 | LLViewerShaderMgr::instance()->setShaders(); | ||
363 | } | ||
357 | } | 364 | } |
358 | return true; | 365 | return true; |
359 | } | 366 | } |
360 | 367 | ||
361 | static bool handleRenderUseImpostorsChanged(const LLSD& newvalue) | 368 | static bool handleRenderUseImpostorsChanged(const LLSD& newvalue) |
362 | { | 369 | { |
363 | LLVOAvatar::sUseImpostors = FALSE; //newvalue.asBoolean(); | 370 | LLVOAvatar::sUseImpostors = newvalue.asBoolean(); |
364 | return true; | 371 | return true; |
365 | } | 372 | } |
366 | 373 | ||
367 | static bool handleRenderDebugGLChanged(const LLSD& newvalue) | 374 | static bool handleRenderDebugGLChanged(const LLSD& newvalue) |
368 | { | 375 | { |
369 | gDebugGL = newvalue.asBoolean(); | 376 | gDebugGL = newvalue.asBoolean(); |
377 | gGL.clearErrors(); | ||
370 | return true; | 378 | return true; |
371 | } | 379 | } |
372 | 380 | ||
@@ -408,12 +416,6 @@ bool handleEffectColorChanged(const LLSD& newvalue) | |||
408 | return true; | 416 | return true; |
409 | } | 417 | } |
410 | 418 | ||
411 | bool handleRotateNetMapChanged(const LLSD& newvalue) | ||
412 | { | ||
413 | LLNetMap::setRotateMap(newvalue.asBoolean()); | ||
414 | return true; | ||
415 | } | ||
416 | |||
417 | bool handleVectorizeChanged(const LLSD& newvalue) | 419 | bool handleVectorizeChanged(const LLSD& newvalue) |
418 | { | 420 | { |
419 | LLViewerJointMesh::updateVectorize(); | 421 | LLViewerJointMesh::updateVectorize(); |
@@ -436,6 +438,7 @@ void settings_setup_listeners() | |||
436 | gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _1)); | 438 | gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _1)); |
437 | gSavedSettings.getControl("RenderFarClip")->getSignal()->connect(boost::bind(&handleRenderFarClipChanged, _1)); | 439 | gSavedSettings.getControl("RenderFarClip")->getSignal()->connect(boost::bind(&handleRenderFarClipChanged, _1)); |
438 | gSavedSettings.getControl("RenderTerrainDetail")->getSignal()->connect(boost::bind(&handleTerrainDetailChanged, _1)); | 440 | gSavedSettings.getControl("RenderTerrainDetail")->getSignal()->connect(boost::bind(&handleTerrainDetailChanged, _1)); |
441 | gSavedSettings.getControl("RenderAnimateTrees")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1)); | ||
439 | gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); | 442 | gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); |
440 | gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); | 443 | gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); |
441 | gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _1)); | 444 | gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _1)); |
@@ -446,6 +449,7 @@ void settings_setup_listeners() | |||
446 | gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); | 449 | gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); |
447 | gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); | 450 | gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); |
448 | gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _1)); | 451 | gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _1)); |
452 | gSavedSettings.getControl("RenderAvatarInvisible")->getSignal()->connect(boost::bind(&handleSetSelfInvisible, _1)); | ||
449 | gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _1)); | 453 | gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _1)); |
450 | gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _1)); | 454 | gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _1)); |
451 | gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _1)); | 455 | gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _1)); |
@@ -461,20 +465,21 @@ void settings_setup_listeners() | |||
461 | gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1)); | 465 | gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1)); |
462 | gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1)); | 466 | gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1)); |
463 | gSavedSettings.getControl("RenderUseFBO")->getSignal()->connect(boost::bind(&handleRenderUseFBOChanged, _1)); | 467 | gSavedSettings.getControl("RenderUseFBO")->getSignal()->connect(boost::bind(&handleRenderUseFBOChanged, _1)); |
468 | gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _1)); | ||
464 | gSavedSettings.getControl("RenderUseImpostors")->getSignal()->connect(boost::bind(&handleRenderUseImpostorsChanged, _1)); | 469 | gSavedSettings.getControl("RenderUseImpostors")->getSignal()->connect(boost::bind(&handleRenderUseImpostorsChanged, _1)); |
465 | gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _1)); | 470 | gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _1)); |
466 | gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _1)); | 471 | gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _1)); |
467 | gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _1)); | 472 | gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _1)); |
468 | gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); | 473 | gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); |
469 | gSavedSettings.getControl("AvatarCompositeLimit")->getSignal()->connect(boost::bind(&handleCompositeLimitChanged, _1)); | ||
470 | gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _1)); | 474 | gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _1)); |
471 | gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&handleChatFontSizeChanged, _1)); | 475 | gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&handleChatFontSizeChanged, _1)); |
472 | gSavedSettings.getControl("ChatPersistTime")->getSignal()->connect(boost::bind(&handleChatPersistTimeChanged, _1)); | 476 | gSavedSettings.getControl("ChatPersistTime")->getSignal()->connect(boost::bind(&handleChatPersistTimeChanged, _1)); |
473 | gSavedSettings.getControl("ConsoleMaxLines")->getSignal()->connect(boost::bind(&handleConsoleMaxLinesChanged, _1)); | 477 | gSavedSettings.getControl("ConsoleMaxLines")->getSignal()->connect(boost::bind(&handleConsoleMaxLinesChanged, _1)); |
478 | gSavedSettings.getControl("UploadBakedTexOld")->getSignal()->connect(boost::bind(&handleUploadBakedTexOldChanged, _1)); | ||
474 | gSavedSettings.getControl("UseOcclusion")->getSignal()->connect(boost::bind(&handleUseOcclusionChanged, _1)); | 479 | gSavedSettings.getControl("UseOcclusion")->getSignal()->connect(boost::bind(&handleUseOcclusionChanged, _1)); |
475 | gSavedSettings.getControl("AudioLevelMaster")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); | 480 | gSavedSettings.getControl("AudioLevelMaster")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); |
476 | gSavedSettings.getControl("AudioLevelSFX")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); | 481 | gSavedSettings.getControl("AudioLevelSFX")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); |
477 | gSavedSettings.getControl("AudioLevelUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); | 482 | gSavedSettings.getControl("AudioLevelUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); |
478 | gSavedSettings.getControl("AudioLevelAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); | 483 | gSavedSettings.getControl("AudioLevelAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); |
479 | gSavedSettings.getControl("AudioLevelMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); | 484 | gSavedSettings.getControl("AudioLevelMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); |
480 | gSavedSettings.getControl("AudioLevelMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); | 485 | gSavedSettings.getControl("AudioLevelMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); |
@@ -538,11 +543,10 @@ void settings_setup_listeners() | |||
538 | gSavedSettings.getControl("BuildAxisDeadZone3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); | 543 | gSavedSettings.getControl("BuildAxisDeadZone3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); |
539 | gSavedSettings.getControl("BuildAxisDeadZone4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); | 544 | gSavedSettings.getControl("BuildAxisDeadZone4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); |
540 | gSavedSettings.getControl("BuildAxisDeadZone5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); | 545 | gSavedSettings.getControl("BuildAxisDeadZone5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); |
541 | gSavedSettings.getControl("DebugViews")->getSignal()->connect(boost::bind(&handleDebugViewsChanged, _1)); | 546 | gSavedSettings.getControl("DebugViews")->getSignal()->connect(boost::bind(&handleDebugViewsChanged, _1)); |
542 | gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _1)); | 547 | gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _1)); |
543 | gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _1)); | 548 | gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _1)); |
544 | gSavedSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _1)); | 549 | gSavedSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _1)); |
545 | gSavedSettings.getControl("MiniMapRotate")->getSignal()->connect(boost::bind(handleRotateNetMapChanged, _1)); | ||
546 | gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); | 550 | gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); |
547 | gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); | 551 | gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); |
548 | gSavedSettings.getControl("VectorizeProcessor")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); | 552 | gSavedSettings.getControl("VectorizeProcessor")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); |