diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llcontroldef.cpp | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llcontroldef.cpp')
-rw-r--r-- | linden/indra/newview/llcontroldef.cpp | 318 |
1 files changed, 229 insertions, 89 deletions
diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp index 124361b..22c5fac 100644 --- a/linden/indra/newview/llcontroldef.cpp +++ b/linden/indra/newview/llcontroldef.cpp | |||
@@ -54,7 +54,6 @@ | |||
54 | #include "llflexibleobject.h" | 54 | #include "llflexibleobject.h" |
55 | #include "llfeaturemanager.h" | 55 | #include "llfeaturemanager.h" |
56 | #include "llglslshader.h" | 56 | #include "llglslshader.h" |
57 | #include "llmediaengine.h" | ||
58 | #include "llpanelgeneral.h" | 57 | #include "llpanelgeneral.h" |
59 | #include "llpanelinput.h" | 58 | #include "llpanelinput.h" |
60 | #include "llsky.h" | 59 | #include "llsky.h" |
@@ -63,7 +62,9 @@ | |||
63 | #include "llviewerthrottle.h" | 62 | #include "llviewerthrottle.h" |
64 | #include "llviewerwindow.h" | 63 | #include "llviewerwindow.h" |
65 | #include "llvoavatar.h" | 64 | #include "llvoavatar.h" |
65 | #include "llvosurfacepatch.h" | ||
66 | #include "llvosky.h" | 66 | #include "llvosky.h" |
67 | #include "llvowlsky.h" | ||
67 | #include "llvotree.h" | 68 | #include "llvotree.h" |
68 | #include "llvovolume.h" | 69 | #include "llvovolume.h" |
69 | #include "llworld.h" | 70 | #include "llworld.h" |
@@ -73,6 +74,9 @@ | |||
73 | #include "llparcel.h" | 74 | #include "llparcel.h" |
74 | #include "llnotify.h" | 75 | #include "llnotify.h" |
75 | #include "llkeyboard.h" | 76 | #include "llkeyboard.h" |
77 | #include "llglimmediate.h" | ||
78 | |||
79 | extern BOOL gResizeScreenTexture; | ||
76 | 80 | ||
77 | void declare_settings() | 81 | void declare_settings() |
78 | { | 82 | { |
@@ -389,7 +393,7 @@ void declare_settings() | |||
389 | gSavedSettings.declareRect("BasicHelpRect", LLRect(0, 404, 467, 0), "Rectangle for help window" ); // Only width and height are used | 393 | gSavedSettings.declareRect("BasicHelpRect", LLRect(0, 404, 467, 0), "Rectangle for help window" ); // Only width and height are used |
390 | 394 | ||
391 | gSavedSettings.declareS32("LastPrefTab", 0, "Last selected tab in preferences window"); | 395 | gSavedSettings.declareS32("LastPrefTab", 0, "Last selected tab in preferences window"); |
392 | 396 | ||
393 | gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); | 397 | gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); |
394 | // link for editable wiki (https doesn't seem to work right now with our embedded browser) | 398 | // link for editable wiki (https doesn't seem to work right now with our embedded browser) |
395 | //gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); | 399 | //gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); |
@@ -699,8 +703,6 @@ void declare_settings() | |||
699 | gSavedSettings.declareBOOL("ShowCameraControls", FALSE, "Display camera controls on login"); | 703 | gSavedSettings.declareBOOL("ShowCameraControls", FALSE, "Display camera controls on login"); |
700 | gSavedSettings.declareBOOL("ShowMovementControls", FALSE, "Display movement controls on login"); | 704 | gSavedSettings.declareBOOL("ShowMovementControls", FALSE, "Display movement controls on login"); |
701 | 705 | ||
702 | gSavedSettings.declareBOOL("ShowWebBrowser", FALSE, "Show in-world web browser"); | ||
703 | |||
704 | gSavedSettings.declareBOOL("ShowLeaders", FALSE, "", NO_PERSIST); | 706 | gSavedSettings.declareBOOL("ShowLeaders", FALSE, "", NO_PERSIST); |
705 | gSavedSettings.declareBOOL("ShowDirectory", FALSE, "", NO_PERSIST); | 707 | gSavedSettings.declareBOOL("ShowDirectory", FALSE, "", NO_PERSIST); |
706 | 708 | ||
@@ -748,6 +750,7 @@ void declare_settings() | |||
748 | LLFirstUse::addConfigVariable("FirstStreamingVideo"); | 750 | LLFirstUse::addConfigVariable("FirstStreamingVideo"); |
749 | LLFirstUse::addConfigVariable("FirstSculptedPrim"); | 751 | LLFirstUse::addConfigVariable("FirstSculptedPrim"); |
750 | LLFirstUse::addConfigVariable("FirstVoice"); | 752 | LLFirstUse::addConfigVariable("FirstVoice"); |
753 | LLFirstUse::addConfigVariable("FirstMedia"); | ||
751 | 754 | ||
752 | gSavedSettings.declareBOOL("ShowDebugConsole", FALSE, "Show log in SL window"); | 755 | gSavedSettings.declareBOOL("ShowDebugConsole", FALSE, "Show log in SL window"); |
753 | gSavedSettings.declareBOOL("ShowDebugStats", FALSE, "Show performance stats display"); | 756 | gSavedSettings.declareBOOL("ShowDebugStats", FALSE, "Show performance stats display"); |
@@ -760,6 +763,7 @@ void declare_settings() | |||
760 | 763 | ||
761 | gSavedSettings.declareBOOL("DebugShowTime", FALSE, "Show depth buffer contents"); | 764 | gSavedSettings.declareBOOL("DebugShowTime", FALSE, "Show depth buffer contents"); |
762 | gSavedSettings.declareBOOL("DebugShowRenderInfo", FALSE, "Show depth buffer contents"); | 765 | gSavedSettings.declareBOOL("DebugShowRenderInfo", FALSE, "Show depth buffer contents"); |
766 | gSavedSettings.declareBOOL("DebugShowColor", FALSE, "Show color under cursor"); | ||
763 | 767 | ||
764 | // gSavedSettings.declareBOOL("ShowHUD", TRUE); | 768 | // gSavedSettings.declareBOOL("ShowHUD", TRUE); |
765 | //gSavedSettings.declareBOOL("ShowHUDText", TRUE, "[NOT USED]"); | 769 | //gSavedSettings.declareBOOL("ShowHUDText", TRUE, "[NOT USED]"); |
@@ -789,43 +793,78 @@ void declare_settings() | |||
789 | gSavedSettings.declareF32("PrecachingDelay", 6.f, "Delay when logging in to load world before showing it (seconds)"); // seconds | 793 | gSavedSettings.declareF32("PrecachingDelay", 6.f, "Delay when logging in to load world before showing it (seconds)"); // seconds |
790 | 794 | ||
791 | // Rendering stuff | 795 | // Rendering stuff |
796 | gSavedSettings.declareBOOL("RenderCubeMap", TRUE, "Whether we can render the cube map or not"); | ||
792 | gSavedSettings.declareF32("RenderGamma", 0.f, "Sets gamma exponent for renderer"); | 797 | gSavedSettings.declareF32("RenderGamma", 0.f, "Sets gamma exponent for renderer"); |
793 | gSavedSettings.declareF32( "RenderNightBrightness", 1.0f, "Brightness multiplier for moon during nighttime" ); | ||
794 | gSavedSettings.declareBOOL("RenderWater", TRUE, "Display water" ); | 798 | gSavedSettings.declareBOOL("RenderWater", TRUE, "Display water" ); |
795 | gSavedSettings.declareF32( "RenderFarClip", 256.f, "Distance of far clip plane from camera (meters)" ); | 799 | gSavedSettings.declareF32( "RenderFarClip", 256.f, "Distance of far clip plane from camera (meters)" ); |
796 | gSavedSettings.declareF32( "RenderFogRatio", 2.0f, "Distance from camera where fog reaches maximum density (fraction or multiple of far clip distance)"); | 800 | gSavedSettings.declareBOOL( "RenderUseFarClip", TRUE, "If false, frustum culling will ignore far clip plane."); |
801 | gSavedSettings.declareF32( "RenderFogRatio", 4.0f, "Distance from camera where fog reaches maximum density (fraction or multiple of far clip distance)"); | ||
797 | gSavedSettings.declareBOOL("RenderAnisotropic", FALSE, "Render textures using anisotropic filtering" ); | 802 | gSavedSettings.declareBOOL("RenderAnisotropic", FALSE, "Render textures using anisotropic filtering" ); |
798 | gSavedSettings.declareBOOL("ShowXUINames", FALSE, "Display XUI Names as Tooltips" ); | 803 | gSavedSettings.declareBOOL("ShowXUINames", FALSE, "Display XUI Names as Tooltips" ); |
799 | gSavedSettings.declareS32("RenderLightingDetail", 1, "Amount of detail for lighting objects/avatars/terrain (0=sun/moon only, 1=enable local lights)" ); | 804 | gSavedSettings.declareS32("RenderLightingDetail", 1, "Amount of detail for lighting objects/avatars/terrain (0=sun/moon only, 1=enable local lights)" ); |
800 | gSavedSettings.declareS32("RenderTerrainDetail", 2, "Detail applied to terrain texturing (0 = none, 1 or 2 = full)" ); | 805 | gSavedSettings.declareS32("RenderTerrainDetail", 2, "Detail applied to terrain texturing (0 = none, 1 or 2 = full)" ); |
806 | gSavedSettings.declareBOOL("RenderDynamicLOD", TRUE, "Dynamically adjust level of detail."); | ||
801 | gSavedSettings.declareF32( "RenderVolumeLODFactor", 1.f, "Controls level of detail of primitives (multiplier for current screen area when calculated level of detail)" ); | 807 | gSavedSettings.declareF32( "RenderVolumeLODFactor", 1.f, "Controls level of detail of primitives (multiplier for current screen area when calculated level of detail)" ); |
802 | gSavedSettings.declareF32( "RenderFlexTimeFactor", 1.f, "Controls level of detail of flexible objects (multiplier for amount of time spent processing flex objects)" ); | 808 | gSavedSettings.declareF32( "RenderFlexTimeFactor", 1.f, "Controls level of detail of flexible objects (multiplier for amount of time spent processing flex objects)" ); |
803 | gSavedSettings.declareF32( "RenderTreeLODFactor", 0.5f, "Controls level of detail of vegetatopm (multiplier for current screen area when calculated level of detail)" ); | 809 | gSavedSettings.declareF32( "RenderTreeLODFactor", 0.5f, "Controls level of detail of vegetation (multiplier for current screen area when calculated level of detail)" ); |
804 | gSavedSettings.declareF32( "RenderAvatarLODFactor", 0.5f, "Controls level of detail of avatars (multiplier for current screen area when calculated level of detail)" ); | 810 | gSavedSettings.declareF32( "RenderAvatarLODFactor", 0.5f, "Controls level of detail of avatars (multiplier for current screen area when calculated level of detail)" ); |
811 | gSavedSettings.declareF32( "RenderTerrainLODFactor", 1.0f, "Controls level of detail of terrain (multiplier for current screen area when calculated level of detail)" ); | ||
805 | gSavedSettings.declareF32( "RenderBumpmapMinDistanceSquared", 100.f, "Maximum distance at which to render bumpmapped primitives (distance in meters, squared)" ); | 812 | gSavedSettings.declareF32( "RenderBumpmapMinDistanceSquared", 100.f, "Maximum distance at which to render bumpmapped primitives (distance in meters, squared)" ); |
806 | gSavedSettings.declareS32( "RenderMaxPartCount", 4096, "Maximum number of particles to display on screen"); | 813 | gSavedSettings.declareS32( "RenderMaxPartCount", 4096, "Maximum number of particles to display on screen"); |
807 | gSavedSettings.declareBOOL("RenderVBOEnable", TRUE, "Use GL Vertex Buffer Objects" ); | 814 | gSavedSettings.declareBOOL("RenderVBOEnable", TRUE, "Use GL Vertex Buffer Objects" ); |
815 | gSavedSettings.declareS32("RenderMaxVBOSize", 32, "Maximum size of a vertex buffer (in KB)."); | ||
808 | gSavedSettings.declareS32("RenderReflectionRes", 64, "Reflection map resolution."); | 816 | gSavedSettings.declareS32("RenderReflectionRes", 64, "Reflection map resolution."); |
809 | //gSavedSettings.declareBOOL("RenderUseTriStrips", FALSE, "[NOT USED]"); | 817 | //gSavedSettings.declareBOOL("RenderUseTriStrips", FALSE, "[NOT USED]"); |
810 | //gSavedSettings.declareBOOL("RenderCullBySize", FALSE, "[NOT USED]" ); | 818 | //gSavedSettings.declareBOOL("RenderCullBySize", FALSE, "[NOT USED]" ); |
811 | gSavedSettings.declareF32("RenderTerrainScale", 12.f, "Terrain detail texture scale"); | 819 | gSavedSettings.declareF32("RenderTerrainScale", 12.f, "Terrain detail texture scale"); |
812 | gSavedSettings.declareBOOL("VertexShaderEnable", FALSE, "Enable/disable all GLSL shaders (debug)"); | 820 | gSavedSettings.declareBOOL("VertexShaderEnable", FALSE, "Enable/disable all GLSL shaders (debug)"); |
813 | gSavedSettings.declareBOOL("RenderInitError", FALSE, "Error occured while initializing GL"); | 821 | gSavedSettings.declareBOOL("RenderInitError", FALSE, "Error occured while initializing GL"); |
814 | gSavedSettings.declareBOOL("RenderRippleWater", FALSE, "Display more realistic water, with refraction (requires pixel shader support on your video card)"); | 822 | |
823 | gSavedSettings.declareBOOL("RenderWaterMipNormal", TRUE, "Use mip maps for water normal map."); | ||
815 | gSavedSettings.declareBOOL("RenderDynamicReflections", FALSE, "Generate a dynamic cube map for reflections (objects reflect their environment, experimental)."); | 824 | gSavedSettings.declareBOOL("RenderDynamicReflections", FALSE, "Generate a dynamic cube map for reflections (objects reflect their environment, experimental)."); |
816 | gSavedSettings.declareBOOL("RenderGlow", FALSE, "Make light sources glow."); | 825 | gSavedSettings.declareBOOL("RenderWaterReflections", FALSE, "Reflect the environment in the water."); |
817 | gSavedSettings.declareF32("RenderGlowStrength", 1.25f, "Strength of glow"); | 826 | gSavedSettings.declareS32("RenderReflectionDetail", 2, "Detail of reflection render pass."); |
818 | gSavedSettings.declareS32("RenderGlowSize", 5, "Size of glow (in pixels)"); | 827 | gSavedSettings.declareBOOL("RenderGammaFull", TRUE, "Use fully controllable gamma correction, instead of faster, hard-coded gamma correction of 2."); |
819 | gSavedSettings.declareS32("RenderGlowResolution", 256, "Glow map resolution."); | 828 | |
829 | gSavedSettings.declareBOOL("RenderGlow", TRUE, "Render bloom post effect."); | ||
830 | gSavedSettings.declareF32("RenderGlowStrength", 0.35f, "Additive strength of glow"); | ||
831 | gSavedSettings.declareF32("RenderGlowWidth", 1.3f, "Glow sample size (higher = wider and softer but eventually more pixelated"); | ||
832 | gSavedSettings.declareS32("RenderGlowIterations", 2, "Number of times to iterate the glow (higher = wider and smoother but slower)"); | ||
833 | gSavedSettings.declareS32("RenderGlowResolutionPow", 9, "Glow map resolution power of two."); | ||
834 | gSavedSettings.declareF32("RenderGlowMinLuminance", 1.0f, "Min luminance intensity necessary to consider an object bright enough to automatically glow. (Gets clamped to 0 - 1.0 range)"); | ||
835 | gSavedSettings.declareF32("RenderGlowMaxExtractAlpha", 0.065f, "Max glow alpha value for brightness extraction to auto-glow."); | ||
836 | |||
837 | gSavedSettings.declareVec3("RenderGlowLumWeights", LLVector3(0.299f, 0.587f, 0.114f), "Weights for each color channel to be used in calculating luminance (should add up to 1.0)"); | ||
838 | |||
839 | gSavedSettings.declareVec3("RenderGlowWarmthWeights", LLVector3(1.0f, 0.5f, 0.7f), "Weight of each color channel used before finding the max warmth"); | ||
840 | |||
841 | gSavedSettings.declareF32("RenderGlowWarmthAmount", 0.f, "Amount of warmth extraction to use (versus luminance extraction). 0 = lum, 1.0 = warmth"); | ||
842 | |||
843 | gSavedSettings.declareS32("RenderWaterRefResolution", 512, "Water planar reflection resolution."); | ||
820 | gSavedSettings.declareBOOL("RenderObjectBump", TRUE, "Show bumpmapping on primitives"); | 844 | gSavedSettings.declareBOOL("RenderObjectBump", TRUE, "Show bumpmapping on primitives"); |
821 | gSavedSettings.declareS32("RenderAvatarMode", 1, "Controls how avatars are rendered (0 = normal, 1 = bump mapped, 2 = bump mapped and wavy cloth)"); | 845 | gSavedSettings.declareBOOL("RenderAvatarCloth", 1, "Controls if avatars use wavy cloth"); |
822 | gSavedSettings.declareBOOL("RenderAvatarVP", TRUE, "Use vertex programs to perform hardware skinning of avatar"); | 846 | gSavedSettings.declareBOOL("RenderAvatarVP", TRUE, "Use vertex programs to perform hardware skinning of avatar"); |
823 | gSavedSettings.declareS32("RenderAvatarMaxVisible", 35, "Maximum number of avatars to display at any one time"); | 847 | gSavedSettings.declareS32("RenderAvatarMaxVisible", 35, "Maximum number of avatars to display at any one time"); |
824 | //gSavedSettings.declareBOOL("RenderForceGetTexImage", FALSE, "[NOT USED]"); | 848 | //gSavedSettings.declareBOOL("RenderForceGetTexImage", FALSE, "[NOT USED]"); |
825 | gSavedSettings.declareBOOL("RenderFastUI", FALSE, "[NOT USED]"); | 849 | gSavedSettings.declareBOOL("RenderFastUI", FALSE, "[NOT USED]"); |
826 | gSavedSettings.declareBOOL("RenderUseSharedDrawables", TRUE, "Collapse transforms on moving linked objects for faster updates"); | ||
827 | gSavedSettings.declareS32("DebugBeaconLineWidth", 1, "Size of lines for Debug Beacons"); | 850 | gSavedSettings.declareS32("DebugBeaconLineWidth", 1, "Size of lines for Debug Beacons"); |
828 | 851 | ||
852 | gSavedSettings.declareBOOL("RenderCustomSettings", 0, "Do you want to set the graphics settings yourself"); | ||
853 | gSavedSettings.declareU32("RenderQualityPerformance", 1, "Which graphics settings you've chosen"); | ||
854 | |||
855 | gSavedSettings.declareBOOL("RenderUseShaderLOD", TRUE, "Whether we want to have different shaders for LOD" ); | ||
856 | gSavedSettings.declareF32("RenderShaderLODThreshold", 1.0f, "Fraction of draw distance defining the switch to a different shader LOD"); | ||
857 | gSavedSettings.declareBOOL("RenderUseShaderNearParticles", FALSE, "Whether we want to use shaders on near particles" ); | ||
858 | gSavedSettings.declareF32("RenderShaderParticleThreshold", 0.25f, "Fraction of draw distance to not use shader on particles"); | ||
859 | gSavedSettings.declareBOOL("RenderUseFBO", FALSE, "Whether we want to use GL_EXT_framebuffer_objects."); | ||
860 | gSavedSettings.declareBOOL("RenderUseImpostors", TRUE, "Whether we want to use impostors for far away avatars."); | ||
861 | gSavedSettings.declareBOOL("RenderAppleUseMultGL", FALSE, "Whether we want to use multi-threaded OpenGL on Apple hardware (requires restart of SL)."); | ||
862 | gSavedSettings.declareF32("RenderSunDynamicRange", 1.0f, "Defines what percent brighter the sun is than local point lights (1.0 = 100% brighter. Value should not be less than 0. )."); | ||
863 | gSavedSettings.declareBOOL("RenderUseCleverUI", FALSE, "Turns on the \"clever\" UI rendering optimization. It's a known performace gain (and enabled by default) on apple."); | ||
864 | |||
865 | //debug render stuff | ||
866 | gSavedSettings.declareBOOL("RenderDebugTextureBind", FALSE, "Enable texture bind performance test."); | ||
867 | |||
829 | // Snapshot params | 868 | // Snapshot params |
830 | gSavedSettings.declareBOOL("RenderUIInSnapshot", FALSE, "Display user interface in snapshot" ); | 869 | gSavedSettings.declareBOOL("RenderUIInSnapshot", FALSE, "Display user interface in snapshot" ); |
831 | gSavedSettings.declareBOOL("RenderHUDInSnapshot", FALSE, "Display HUD attachments in snapshot" ); | 870 | gSavedSettings.declareBOOL("RenderHUDInSnapshot", FALSE, "Display HUD attachments in snapshot" ); |
@@ -834,8 +873,9 @@ void declare_settings() | |||
834 | gSavedSettings.declareBOOL("FreezeTime", FALSE, "", FALSE ); | 873 | gSavedSettings.declareBOOL("FreezeTime", FALSE, "", FALSE ); |
835 | gSavedSettings.declareBOOL("UseFreezeFrame", FALSE, "Freeze time when taking snapshots."); | 874 | gSavedSettings.declareBOOL("UseFreezeFrame", FALSE, "Freeze time when taking snapshots."); |
836 | gSavedSettings.declareBOOL("CloseSnapshotOnKeep", TRUE, "Close snapshot window after saving snapshot" ); | 875 | gSavedSettings.declareBOOL("CloseSnapshotOnKeep", TRUE, "Close snapshot window after saving snapshot" ); |
837 | gSavedSettings.declareBOOL("KeepAspectForSnapshot", FALSE, "Use full window when taking snapshot, regardless of requested image size" ); | 876 | gSavedSettings.declareBOOL("KeepAspectForSnapshot", TRUE, "Use full window when taking snapshot, regardless of requested image size" ); |
838 | gSavedSettings.declareBOOL("AutoSnapshot", TRUE, "Update snapshot when camera stops moving, or any parameter changes" ); | 877 | gSavedSettings.declareBOOL("AutoSnapshot", FALSE, "Update snapshot when camera stops moving, or any parameter changes" ); |
878 | gSavedSettings.declareBOOL("AdvanceSnapshot", FALSE, "Display advanced parameter settings in snaphot interface" ); | ||
839 | gSavedSettings.declareS32("LastSnapshotType", 0, "Select this as next type of snapshot to take (0 = postcard, 1 = texture, 2 = local image)" ); | 879 | gSavedSettings.declareS32("LastSnapshotType", 0, "Select this as next type of snapshot to take (0 = postcard, 1 = texture, 2 = local image)" ); |
840 | gSavedSettings.declareS32("LastSnapshotWidth", 1024, "The width of the last snapshot, in px" ); | 880 | gSavedSettings.declareS32("LastSnapshotWidth", 1024, "The width of the last snapshot, in px" ); |
841 | gSavedSettings.declareS32("LastSnapshotHeight", 768, "The height of the last snapshot, in px" ); | 881 | gSavedSettings.declareS32("LastSnapshotHeight", 768, "The height of the last snapshot, in px" ); |
@@ -858,7 +898,7 @@ void declare_settings() | |||
858 | gSavedSettings.declareString("StatsFile", "fs.txt", "Filename for stats logging output"); | 898 | gSavedSettings.declareString("StatsFile", "fs.txt", "Filename for stats logging output"); |
859 | 899 | ||
860 | // Image pipeline stuff | 900 | // Image pipeline stuff |
861 | gSavedSettings.declareS32("GraphicsCardMemorySetting", -1, "Amount of memory on your video card (-1 = autodetect, 0 = 16MB, 1 = 32MB, 2 = 64MB, 3 = 128MB, 4 = 256MB, 5 = 512MB)"); // default to auto-detect | 901 | gSavedSettings.declareS32("TextureMemory", 0, "Amount of memory to use for textures in MB (0 = autodetect)"); // default to auto-detect |
862 | //gSavedSettings.declareS32("ImageRadioTexMem", 0, "Texture memory allocation (0 = <512 megabytes system RAM, 1 = >512 megabytes system RAM)"); | 902 | //gSavedSettings.declareS32("ImageRadioTexMem", 0, "Texture memory allocation (0 = <512 megabytes system RAM, 1 = >512 megabytes system RAM)"); |
863 | //gSavedSettings.declareS32("ImageRadioVidCardMem", 1, "Video card onboard memory (0 = 16MB, 1 = 32MB, 2 = 64MB, 3 = 128MB, 4 = 256MB, 5 = 512MB)"); | 903 | //gSavedSettings.declareS32("ImageRadioVidCardMem", 1, "Video card onboard memory (0 = 16MB, 1 = 32MB, 2 = 64MB, 3 = 128MB, 4 = 256MB, 5 = 512MB)"); |
864 | //gSavedSettings.declareU32("LastRAMDetected", 0, "[DO NOT MODIFY] Detected system memory (bytes)"); // used to detect RAM changes | 904 | //gSavedSettings.declareU32("LastRAMDetected", 0, "[DO NOT MODIFY] Detected system memory (bytes)"); // used to detect RAM changes |
@@ -928,7 +968,7 @@ void declare_settings() | |||
928 | gSavedSettings.declareRect("FloaterJoystickRect", LLRect(0,0,0,0), "Rectangle for joystick controls window."); | 968 | gSavedSettings.declareRect("FloaterJoystickRect", LLRect(0,0,0,0), "Rectangle for joystick controls window."); |
929 | 969 | ||
930 | // Map floater | 970 | // Map floater |
931 | gSavedSettings.declareRect("FloaterMapRect", LLRect(0, 225, 200, 0), "Rectangle for world map"); | 971 | gSavedSettings.declareRect("FloaterMiniMapRect", LLRect(0, 225, 200, 0), "Rectangle for world map"); |
932 | 972 | ||
933 | //Lag-o-Meter floater | 973 | //Lag-o-Meter floater |
934 | gSavedSettings.declareRect("FloaterLagMeter", LLRect(0, 142, 350, 0), "Rectangle for lag meter"); | 974 | gSavedSettings.declareRect("FloaterLagMeter", LLRect(0, 142, 350, 0), "Rectangle for lag meter"); |
@@ -1028,6 +1068,9 @@ void declare_settings() | |||
1028 | gSavedSettings.declareRect("FloaterOpenObjectRect", LLRect(0, 350, 300, 0), "Rectangle for Open Object window"); | 1068 | gSavedSettings.declareRect("FloaterOpenObjectRect", LLRect(0, 350, 300, 0), "Rectangle for Open Object window"); |
1029 | 1069 | ||
1030 | // the about box | 1070 | // the about box |
1071 | gSavedSettings.declareRect("FloaterMediaRect", LLRect(0, 400, 400, 0), "Rectangle for media browser window"); | ||
1072 | |||
1073 | // the about box | ||
1031 | gSavedSettings.declareRect("FloaterAboutRect", LLRect(0, 440, 470, 0), "Rectangle for About window"); | 1074 | gSavedSettings.declareRect("FloaterAboutRect", LLRect(0, 440, 470, 0), "Rectangle for About window"); |
1032 | 1075 | ||
1033 | // the mean box | 1076 | // the mean box |
@@ -1036,8 +1079,8 @@ void declare_settings() | |||
1036 | // the inspect box | 1079 | // the inspect box |
1037 | gSavedSettings.declareRect("FloaterInspectRect", LLRect(0, 400, 400, 0), "Rectangle for Object Inspect window"); | 1080 | gSavedSettings.declareRect("FloaterInspectRect", LLRect(0, 400, 400, 0), "Rectangle for Object Inspect window"); |
1038 | 1081 | ||
1039 | // World map. If 0,0,0,0, will attempt to size to fullscreen. | 1082 | // World map. If 0,0,0,0, will attempt to size to 80% of fullscreen. |
1040 | gSavedSettings.declareRect("FloaterWorldMapRect", | 1083 | gSavedSettings.declareRect("FloaterWorldMapRect2", |
1041 | LLRect(0,0,0,0), "Rectangle for world map window"); | 1084 | LLRect(0,0,0,0), "Rectangle for world map window"); |
1042 | 1085 | ||
1043 | // Find dialog. | 1086 | // Find dialog. |
@@ -1101,6 +1144,9 @@ void declare_settings() | |||
1101 | gSavedSettings.declareF32("FullScreenAspectRatio", 1.3333f, "Aspect ratio of fullscreen display (width / height)"); | 1144 | gSavedSettings.declareF32("FullScreenAspectRatio", 1.3333f, "Aspect ratio of fullscreen display (width / height)"); |
1102 | gSavedSettings.declareBOOL("FullScreenAutoDetectAspectRatio", TRUE, "Automatically detect proper aspect ratio for fullscreen display"); | 1145 | gSavedSettings.declareBOOL("FullScreenAutoDetectAspectRatio", TRUE, "Automatically detect proper aspect ratio for fullscreen display"); |
1103 | 1146 | ||
1147 | //resolution divisor | ||
1148 | gSavedSettings.declareU32("RenderResolutionDivisor", 1, "Divisor for rendering 3D scene at reduced resolution."); | ||
1149 | |||
1104 | // UI general settigns | 1150 | // UI general settigns |
1105 | gSavedSettings.declareBOOL("TabToTextFieldsOnly", FALSE, "TAB key takes you to next text entry field, instead of next widget"); | 1151 | gSavedSettings.declareBOOL("TabToTextFieldsOnly", FALSE, "TAB key takes you to next text entry field, instead of next widget"); |
1106 | gSavedSettings.declareF32("UIScaleFactor", 1.f, "Size of UI relative to default layout on 1024x768 screen"); | 1152 | gSavedSettings.declareF32("UIScaleFactor", 1.f, "Size of UI relative to default layout on 1024x768 screen"); |
@@ -1159,7 +1205,7 @@ void declare_settings() | |||
1159 | gSavedSettings.declareF32("AudioLevelAmbient",0.5f, "Audio level of environment sounds"); | 1205 | gSavedSettings.declareF32("AudioLevelAmbient",0.5f, "Audio level of environment sounds"); |
1160 | gSavedSettings.declareF32("AudioLevelUI", 0.5f, "Audio level of UI sound effects"); | 1206 | gSavedSettings.declareF32("AudioLevelUI", 0.5f, "Audio level of UI sound effects"); |
1161 | gSavedSettings.declareF32("AudioLevelMusic", 1.0f, "Audio level of streaming music"); | 1207 | gSavedSettings.declareF32("AudioLevelMusic", 1.0f, "Audio level of streaming music"); |
1162 | gSavedSettings.declareF32("AudioLevelVoice", 1.0f, "Audio level of voice chat"); | 1208 | gSavedSettings.declareF32("AudioLevelVoice", 0.5f, "Audio level of voice chat"); |
1163 | gSavedSettings.declareF32("AudioLevelMedia", 1.0f, "Audio level of Quicktime movies"); | 1209 | gSavedSettings.declareF32("AudioLevelMedia", 1.0f, "Audio level of Quicktime movies"); |
1164 | gSavedSettings.declareF32("AudioLevelMic", 1.0f, "Audio level of microphone input"); | 1210 | gSavedSettings.declareF32("AudioLevelMic", 1.0f, "Audio level of microphone input"); |
1165 | 1211 | ||
@@ -1171,6 +1217,10 @@ void declare_settings() | |||
1171 | 1217 | ||
1172 | gSavedSettings.declareBOOL("AudioStreamingMusic", FALSE, "Enable streaming audio"); | 1218 | gSavedSettings.declareBOOL("AudioStreamingMusic", FALSE, "Enable streaming audio"); |
1173 | gSavedSettings.declareBOOL("AudioStreamingVideo", FALSE, "Enable streaming video"); | 1219 | gSavedSettings.declareBOOL("AudioStreamingVideo", FALSE, "Enable streaming video"); |
1220 | gSavedSettings.declareBOOL("AutoMimeDiscovery", FALSE, "Enable viewer mime type discovery of media URLs"); | ||
1221 | |||
1222 | // Media | ||
1223 | gSavedSettings.declareBOOL("ParcelMediaAutoPlayEnable", FALSE, "Auto play parcel media when available"); | ||
1174 | 1224 | ||
1175 | //UI Sounds | 1225 | //UI Sounds |
1176 | 1226 | ||
@@ -1230,6 +1280,27 @@ void declare_settings() | |||
1230 | gSavedSettings.declareF32("SkyAmbientScale", 0.3f, "Controls strength of ambient, or non-directional light from the sun and moon (fraction or multiple of default ambient level)"); | 1280 | gSavedSettings.declareF32("SkyAmbientScale", 0.3f, "Controls strength of ambient, or non-directional light from the sun and moon (fraction or multiple of default ambient level)"); |
1231 | gSavedSettings.declareColor3("SkyNightColorShift", LLColor3(0.7f, 0.7f, 1.0f), "Controls moonlight color (base color applied to moon as light source)"); | 1281 | gSavedSettings.declareColor3("SkyNightColorShift", LLColor3(0.7f, 0.7f, 1.0f), "Controls moonlight color (base color applied to moon as light source)"); |
1232 | gSavedSettings.declareBOOL("FixedWeather", FALSE, "Weather effects do not change over time"); | 1282 | gSavedSettings.declareBOOL("FixedWeather", FALSE, "Weather effects do not change over time"); |
1283 | gSavedSettings.declareU32("WLSkyDetail", 64, "Controls vertex detail on the WindLight sky. Lower numbers will give better performance and uglier skies."); | ||
1284 | gSavedSettings.declareBOOL("SkyUseClassicClouds", TRUE, "Whether to use the old Second Life particle clouds or not"); | ||
1285 | gSavedSettings.declareBOOL("WindLightUseAtmosShaders", TRUE, "Whether to enable or disable WindLight atmospheric shaders."); | ||
1286 | gSavedSettings.declareBOOL("SkyEditPresets", FALSE, "Whether to be able to edit the sky defaults or not"); | ||
1287 | |||
1288 | // Water params | ||
1289 | gSavedSettings.declareF32("WaterGLFogDepthFloor", 0.25f, "Controls how dark water gl fog can get"); | ||
1290 | gSavedSettings.declareF32("WaterGLFogDepthScale", 50.0f, "Controls how quickly gl fog gets dark under water"); | ||
1291 | gSavedSettings.declareF32("WaterGLFogDensityScale", 0.02f, "Maps shader water fog density to gl fog density"); | ||
1292 | gSavedSettings.declareBOOL("EnableRippleWater", TRUE, "Whether to use ripple water shader or not"); | ||
1293 | gSavedSettings.declareBOOL("WaterEditPresets", FALSE, "Whether to be able to edit the water defaults or not"); | ||
1294 | |||
1295 | // Windlight window params | ||
1296 | gSavedSettings.declareRect("FloaterEnvRect", LLRect(50, 150, 650, 0), "Rectangle for Environment Editor" ); | ||
1297 | gSavedSettings.declareRect("FloaterAdvancedSkyRect", LLRect(50, 220, 450, 0), "Rectangle for Advanced Sky Editor" ); | ||
1298 | gSavedSettings.declareRect("FloaterDayCycleRect", LLRect(50, 450, 300, 0), "Rectangle for Day Cycle Editor" ); | ||
1299 | gSavedSettings.declareRect("FloaterAdvancedWaterRect", LLRect(50, 220, 450, 0), "Rectangle for Advanced Water Editor" ); | ||
1300 | |||
1301 | // Tweaked draw distance default settings | ||
1302 | gSavedSettings.declareBOOL("Disregard128DefaultDrawDistance", TRUE, "Whether to use the auto default to 128 draw distance"); | ||
1303 | gSavedSettings.declareBOOL("Disregard96DefaultDrawDistance", TRUE, "Whether to use the auto default to 96 draw distance"); | ||
1233 | 1304 | ||
1234 | // Cache Stuff | 1305 | // Cache Stuff |
1235 | gSavedSettings.declareU32("VFSSalt", 1, "[DO NOT MODIFY] Controls local file caching behavior"); | 1306 | gSavedSettings.declareU32("VFSSalt", 1, "[DO NOT MODIFY] Controls local file caching behavior"); |
@@ -1403,6 +1474,9 @@ void declare_settings() | |||
1403 | "m=[MATURE]&t=[TEEN]®ion=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]", | 1474 | "m=[MATURE]&t=[TEEN]®ion=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]", |
1404 | "Parameters added to end of search queries"); | 1475 | "Parameters added to end of search queries"); |
1405 | 1476 | ||
1477 | // Hide/Show search bar | ||
1478 | gSavedSettings.declareBOOL("ShowSearchBar", TRUE, "Show the Search Bar in the Status Overlay"); | ||
1479 | |||
1406 | // Arrow keys move avatar while in chat? | 1480 | // Arrow keys move avatar while in chat? |
1407 | gSavedSettings.declareBOOL("ArrowKeysMoveAvatar", TRUE, "While cursor is in chat entry box, arrow keys still control your avatar"); | 1481 | gSavedSettings.declareBOOL("ArrowKeysMoveAvatar", TRUE, "While cursor is in chat entry box, arrow keys still control your avatar"); |
1408 | gSavedSettings.declareBOOL("ChatBarStealsFocus", TRUE, "Whenever keyboard focus is removed from the UI, and the chat bar is visible, the chat bar takes focus"); | 1482 | gSavedSettings.declareBOOL("ChatBarStealsFocus", TRUE, "Whenever keyboard focus is removed from the UI, and the chat bar is visible, the chat bar takes focus"); |
@@ -1413,6 +1487,9 @@ void declare_settings() | |||
1413 | // Use DX9 to probe hardware on startup. Only do this once, | 1487 | // Use DX9 to probe hardware on startup. Only do this once, |
1414 | // because it's slow. | 1488 | // because it's slow. |
1415 | gSavedSettings.declareBOOL("ProbeHardwareOnStartup", TRUE, "Query current hardware configuration on application startup"); | 1489 | gSavedSettings.declareBOOL("ProbeHardwareOnStartup", TRUE, "Query current hardware configuration on application startup"); |
1490 | |||
1491 | // have we told the user his hardware sucks? Let him know just once | ||
1492 | gSavedSettings.declareBOOL("AlertedUnsupportedHardware", FALSE, "Toggle that lets us tell the user he's on old hardware only once"); | ||
1416 | 1493 | ||
1417 | // enable/disable system color picker | 1494 | // enable/disable system color picker |
1418 | gSavedSettings.declareBOOL("UseDefaultColorPicker", FALSE, "Use color picker supplied by operating system"); | 1495 | gSavedSettings.declareBOOL("UseDefaultColorPicker", FALSE, "Use color picker supplied by operating system"); |
@@ -1429,9 +1506,7 @@ void declare_settings() | |||
1429 | gSavedSettings.declareBOOL("ShowAllObjectHoverTip", FALSE, "Show descriptive tooltip when mouse hovers over non-interactive and interactive objects."); | 1506 | gSavedSettings.declareBOOL("ShowAllObjectHoverTip", FALSE, "Show descriptive tooltip when mouse hovers over non-interactive and interactive objects."); |
1430 | 1507 | ||
1431 | // Use an external web browser (Firefox, Internet Explorer) | 1508 | // Use an external web browser (Firefox, Internet Explorer) |
1432 | // CP: making this TRUE by default since there is no internal Web browser | 1509 | gSavedSettings.declareBOOL("UseExternalBrowser", FALSE, "Use default browser when opening web pages instead of in-world browser."); |
1433 | // now and other components may interrogate this setting | ||
1434 | gSavedSettings.declareBOOL("UseExternalBrowser", TRUE, "[NOT USED]"); | ||
1435 | gSavedSettings.declareBOOL("CookiesEnabled", TRUE, "Accept cookies from Web sites?"); | 1510 | gSavedSettings.declareBOOL("CookiesEnabled", TRUE, "Accept cookies from Web sites?"); |
1436 | 1511 | ||
1437 | // browser home page | 1512 | // browser home page |
@@ -1449,6 +1524,7 @@ void declare_settings() | |||
1449 | 1524 | ||
1450 | // use object-object occlusion culling | 1525 | // use object-object occlusion culling |
1451 | gSavedSettings.declareBOOL("UseOcclusion", TRUE, "Enable object culling based on occlusion (coverage) by other objects"); | 1526 | gSavedSettings.declareBOOL("UseOcclusion", TRUE, "Enable object culling based on occlusion (coverage) by other objects"); |
1527 | gSavedSettings.declareBOOL("RenderFastAlpha", TRUE, "Use lossy alpha rendering optimization (opaque/nonexistent small alpha faces)."); | ||
1452 | 1528 | ||
1453 | gSavedSettings.declareBOOL("DoubleClickAutoPilot", FALSE, "Enable double-click auto pilot"); | 1529 | gSavedSettings.declareBOOL("DoubleClickAutoPilot", FALSE, "Enable double-click auto pilot"); |
1454 | 1530 | ||
@@ -1634,8 +1710,11 @@ class LLReleaseGLBufferListener: public LLSimpleListener | |||
1634 | { | 1710 | { |
1635 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 1711 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
1636 | { | 1712 | { |
1637 | gPipeline.releaseGLBuffers(); | 1713 | if (gPipeline.isInit()) |
1638 | LLShaderMgr::setShaders(); | 1714 | { |
1715 | gPipeline.releaseGLBuffers(); | ||
1716 | gPipeline.createGLBuffers(); | ||
1717 | } | ||
1639 | return true; | 1718 | return true; |
1640 | } | 1719 | } |
1641 | }; | 1720 | }; |
@@ -1662,6 +1741,20 @@ class LLAvatarLODListener: public LLSimpleListener | |||
1662 | }; | 1741 | }; |
1663 | static LLAvatarLODListener avatar_lod_listener; | 1742 | static LLAvatarLODListener avatar_lod_listener; |
1664 | 1743 | ||
1744 | class LLTerrainLODListener: public LLSimpleListener | ||
1745 | { | ||
1746 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
1747 | { | ||
1748 | LLVOSurfacePatch::sLODFactor = (F32) event->getValue().asReal(); | ||
1749 | //sqaure lod factor to get exponential range of [0,4] and keep | ||
1750 | //a value of 1 in the middle of the detail slider for consistency | ||
1751 | //with other detail sliders (see panel_preferences_graphics1.xml) | ||
1752 | LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; | ||
1753 | return true; | ||
1754 | } | ||
1755 | }; | ||
1756 | static LLTerrainLODListener terrain_lod_listener; | ||
1757 | |||
1665 | class LLTreeLODListener: public LLSimpleListener | 1758 | class LLTreeLODListener: public LLSimpleListener |
1666 | { | 1759 | { |
1667 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 1760 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -1691,7 +1784,7 @@ class LLGammaListener: public LLSimpleListener | |||
1691 | { | 1784 | { |
1692 | gamma = 1.0f; // restore normal gamma | 1785 | gamma = 1.0f; // restore normal gamma |
1693 | } | 1786 | } |
1694 | if (gamma != gViewerWindow->getWindow()->getGamma()) | 1787 | if (gViewerWindow && gViewerWindow->getWindow() && gamma != gViewerWindow->getWindow()->getGamma()) |
1695 | { | 1788 | { |
1696 | // Only save it if it's changed | 1789 | // Only save it if it's changed |
1697 | if (!gViewerWindow->getWindow()->setGamma(gamma)) | 1790 | if (!gViewerWindow->getWindow()->setGamma(gamma)) |
@@ -1705,17 +1798,7 @@ class LLGammaListener: public LLSimpleListener | |||
1705 | }; | 1798 | }; |
1706 | static LLGammaListener gamma_listener; | 1799 | static LLGammaListener gamma_listener; |
1707 | 1800 | ||
1708 | class LLNightBrightnessListener: public LLSimpleListener | 1801 | const F32 MAX_USER_FOG_RATIO = 10.f; |
1709 | { | ||
1710 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
1711 | { | ||
1712 | LLVOSky::sNighttimeBrightness = (F32) event->getValue().asReal(); | ||
1713 | return true; | ||
1714 | } | ||
1715 | }; | ||
1716 | static LLNightBrightnessListener night_brightness_listener; | ||
1717 | |||
1718 | const F32 MAX_USER_FOG_RATIO = 4.f; | ||
1719 | const F32 MIN_USER_FOG_RATIO = 0.5f; | 1802 | const F32 MIN_USER_FOG_RATIO = 0.5f; |
1720 | 1803 | ||
1721 | class LLFogRatioListener: public LLSimpleListener | 1804 | class LLFogRatioListener: public LLSimpleListener |
@@ -1828,8 +1911,7 @@ class LLJoystickListener : public LLSimpleListener | |||
1828 | }; | 1911 | }; |
1829 | static LLJoystickListener joystick_listener; | 1912 | static LLJoystickListener joystick_listener; |
1830 | 1913 | ||
1831 | void stop_video(); | 1914 | |
1832 | void prepare_video(const LLParcel *parcel); | ||
1833 | 1915 | ||
1834 | class LLAudioStreamMusicListener: public LLSimpleListener | 1916 | class LLAudioStreamMusicListener: public LLSimpleListener |
1835 | { | 1917 | { |
@@ -1864,92 +1946,137 @@ static LLAudioStreamMusicListener audio_stream_music_listener; | |||
1864 | 1946 | ||
1865 | 1947 | ||
1866 | 1948 | ||
1867 | class LLAudioStreamMediaListener: public LLSimpleListener | 1949 | class LLUseOcclusionListener: public LLSimpleListener |
1950 | { | ||
1951 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
1952 | { | ||
1953 | LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery | ||
1954 | && gFeatureManagerp->isFeatureAvailable("UseOcclusion") && !gUseWireframe) ? 2 : 0; | ||
1955 | return true; | ||
1956 | } | ||
1957 | }; | ||
1958 | static LLUseOcclusionListener use_occlusion_listener; | ||
1959 | |||
1960 | class LLNumpadControlListener: public LLSimpleListener | ||
1868 | { | 1961 | { |
1869 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 1962 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
1870 | { | 1963 | { |
1871 | if (LLMediaEngine::getInstance() && LLMediaEngine::getInstance()->isAvailable()) | 1964 | if (gKeyboard) |
1872 | { | 1965 | { |
1873 | if (event->getValue().asBoolean()) | 1966 | gKeyboard->setNumpadDistinct(static_cast<LLKeyboard::e_numpad_distinct>(event->getValue().asInteger())); |
1874 | { | ||
1875 | gMessageSystem->setHandlerFunc ( "ParcelMediaCommandMessage", LLMediaEngine::process_parcel_media ); | ||
1876 | gMessageSystem->setHandlerFunc ( "ParcelMediaUpdate", LLMediaEngine::process_parcel_media_update ); | ||
1877 | if ( ( gParcelMgr ) && | ||
1878 | ( gParcelMgr->getAgentParcel () ) && | ||
1879 | ( !gParcelMgr->getAgentParcel()->getMediaURL().empty() ) ) | ||
1880 | { | ||
1881 | prepare_video ( gParcelMgr->getAgentParcel () ); | ||
1882 | } | ||
1883 | } | ||
1884 | else | ||
1885 | { | ||
1886 | gMessageSystem->setHandlerFunc("ParcelMediaCommandMessage", null_message_callback); | ||
1887 | gMessageSystem->setHandlerFunc ( "ParcelMediaUpdate", null_message_callback ); | ||
1888 | stop_video(); | ||
1889 | } | ||
1890 | } | 1967 | } |
1891 | else | 1968 | return true; |
1892 | { | 1969 | } |
1893 | if (gSavedSettings.getWarning("QuickTimeInstalled")) | 1970 | }; |
1894 | { | ||
1895 | gSavedSettings.setWarning("QuickTimeInstalled", FALSE); | ||
1896 | 1971 | ||
1897 | LLNotifyBox::showXml("NoQuickTime" ); | 1972 | static LLNumpadControlListener numpad_control_listener; |
1898 | } | 1973 | |
1974 | class LLRenderUseVBOListener: public LLSimpleListener | ||
1975 | { | ||
1976 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
1977 | { | ||
1978 | if (gPipeline.isInit()) | ||
1979 | { | ||
1980 | gPipeline.setUseVBO(event->getValue().asBoolean()); | ||
1899 | } | 1981 | } |
1982 | return true; | ||
1983 | } | ||
1984 | }; | ||
1985 | static LLRenderUseVBOListener render_use_vbo_listener; | ||
1900 | 1986 | ||
1987 | class LLWLSkyDetailListener: public LLSimpleListener | ||
1988 | { | ||
1989 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
1990 | { | ||
1991 | if (gSky.mVOWLSkyp.notNull()) | ||
1992 | { | ||
1993 | gSky.mVOWLSkyp->updateGeometry(gSky.mVOWLSkyp->mDrawable); | ||
1994 | } | ||
1901 | return true; | 1995 | return true; |
1902 | } | 1996 | } |
1903 | }; | 1997 | }; |
1998 | static LLWLSkyDetailListener wl_sky_detail_listener; | ||
1904 | 1999 | ||
1905 | static LLAudioStreamMediaListener audio_stream_media_listener; | 2000 | class LLRenderLightingDetailListener: public LLSimpleListener |
2001 | { | ||
2002 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2003 | { | ||
2004 | if (gPipeline.isInit()) | ||
2005 | { | ||
2006 | gPipeline.setLightingDetail(event->getValue().asInteger()); | ||
2007 | } | ||
2008 | return true; | ||
2009 | } | ||
2010 | }; | ||
2011 | static LLRenderLightingDetailListener render_lighting_detail_listener; | ||
1906 | 2012 | ||
2013 | class LLResetVertexBuffersListener: public LLSimpleListener | ||
2014 | { | ||
2015 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2016 | { | ||
2017 | if (gPipeline.isInit()) | ||
2018 | { | ||
2019 | gPipeline.resetVertexBuffers(); | ||
2020 | } | ||
2021 | return true; | ||
2022 | } | ||
2023 | }; | ||
2024 | static LLResetVertexBuffersListener reset_vbo_listener; | ||
1907 | 2025 | ||
1908 | class LLUseOcclusionListener: public LLSimpleListener | 2026 | class LLRenderDynamicLODListener: public LLSimpleListener |
1909 | { | 2027 | { |
1910 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2028 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
1911 | { | 2029 | { |
1912 | LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery | 2030 | LLPipeline::sDynamicLOD = event->getValue().asBoolean(); |
1913 | && gFeatureManagerp->isFeatureAvailable("UseOcclusion") && !gUseWireframe); | ||
1914 | return true; | 2031 | return true; |
1915 | } | 2032 | } |
1916 | }; | 2033 | }; |
1917 | static LLUseOcclusionListener use_occlusion_listener; | 2034 | static LLRenderDynamicLODListener render_dynamic_lod_listener; |
1918 | 2035 | ||
1919 | class LLNumpadControlListener: public LLSimpleListener | 2036 | class LLRenderUseFBOListener: public LLSimpleListener |
1920 | { | 2037 | { |
1921 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2038 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
1922 | { | 2039 | { |
1923 | if (gKeyboard) | 2040 | LLRenderTarget::sUseFBO = event->getValue().asBoolean(); |
2041 | if (gPipeline.isInit()) | ||
1924 | { | 2042 | { |
1925 | gKeyboard->setNumpadDistinct(static_cast<LLKeyboard::e_numpad_distinct>(event->getValue().asInteger())); | 2043 | gPipeline.releaseGLBuffers(); |
2044 | gPipeline.createGLBuffers(); | ||
1926 | } | 2045 | } |
1927 | return true; | 2046 | return true; |
1928 | } | 2047 | } |
1929 | }; | 2048 | }; |
2049 | static LLRenderUseFBOListener render_use_fbo_listener; | ||
1930 | 2050 | ||
1931 | static LLNumpadControlListener numpad_control_listener; | 2051 | class LLRenderUseImpostorsListener : public LLSimpleListener |
1932 | |||
1933 | class LLRenderUseVBOListener: public LLSimpleListener | ||
1934 | { | 2052 | { |
1935 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2053 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
1936 | { | 2054 | { |
1937 | gPipeline.setUseVBO(event->getValue().asBoolean()); | 2055 | LLVOAvatar::sUseImpostors = event->getValue().asBoolean(); |
1938 | return true; | 2056 | return true; |
1939 | } | 2057 | } |
1940 | }; | 2058 | }; |
1941 | static LLRenderUseVBOListener render_use_vbo_listener; | 2059 | static LLRenderUseImpostorsListener render_use_impostors_listener; |
1942 | 2060 | ||
1943 | class LLRenderLightingDetailListener: public LLSimpleListener | 2061 | class LLRenderUseCleverUIListener : public LLSimpleListener |
1944 | { | 2062 | { |
1945 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2063 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
1946 | { | 2064 | { |
1947 | gPipeline.setLightingDetail(event->getValue().asInteger()); | 2065 | gGL.setClever(event->getValue().asBoolean()); |
1948 | return true; | 2066 | return true; |
1949 | } | 2067 | } |
1950 | }; | 2068 | }; |
1951 | static LLRenderLightingDetailListener render_lighting_detail_listener; | 2069 | static LLRenderUseCleverUIListener render_use_clever_ui_listener; |
1952 | 2070 | ||
2071 | class LLRenderResolutionDivisorListener : public LLSimpleListener | ||
2072 | { | ||
2073 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2074 | { | ||
2075 | gResizeScreenTexture = TRUE; | ||
2076 | return true; | ||
2077 | } | ||
2078 | }; | ||
2079 | static LLRenderResolutionDivisorListener render_resolution_divisor_listener; | ||
1953 | //////////////////////////////////////////////////////////////////////////// | 2080 | //////////////////////////////////////////////////////////////////////////// |
1954 | 2081 | ||
1955 | void settings_setup_listeners() | 2082 | void settings_setup_listeners() |
@@ -1960,24 +2087,36 @@ void settings_setup_listeners() | |||
1960 | gSavedSettings.getControl("AFKTimeout")->addListener(&afk_timeout_listener); | 2087 | gSavedSettings.getControl("AFKTimeout")->addListener(&afk_timeout_listener); |
1961 | gSavedSettings.getControl("RenderFarClip")->addListener(&render_far_clip_listener); | 2088 | gSavedSettings.getControl("RenderFarClip")->addListener(&render_far_clip_listener); |
1962 | gSavedSettings.getControl("RenderTerrainDetail")->addListener(&terrain_detail_listener); | 2089 | gSavedSettings.getControl("RenderTerrainDetail")->addListener(&terrain_detail_listener); |
1963 | gSavedSettings.getControl("RenderRippleWater")->addListener(&set_shader_listener); | ||
1964 | gSavedSettings.getControl("RenderAvatarVP")->addListener(&set_shader_listener); | 2090 | gSavedSettings.getControl("RenderAvatarVP")->addListener(&set_shader_listener); |
1965 | gSavedSettings.getControl("VertexShaderEnable")->addListener(&set_shader_listener); | 2091 | gSavedSettings.getControl("VertexShaderEnable")->addListener(&set_shader_listener); |
1966 | gSavedSettings.getControl("RenderDynamicReflections")->addListener(&set_shader_listener); | 2092 | gSavedSettings.getControl("RenderDynamicReflections")->addListener(&set_shader_listener); |
1967 | gSavedSettings.getControl("RenderGlow")->addListener(&release_gl_buffer_listener); | 2093 | gSavedSettings.getControl("RenderGlow")->addListener(&release_gl_buffer_listener); |
1968 | gSavedSettings.getControl("RenderGlowResolution")->addListener(&release_gl_buffer_listener); | 2094 | gSavedSettings.getControl("RenderGlow")->addListener(&set_shader_listener); |
1969 | gSavedSettings.getControl("RenderAvatarMode")->addListener(&set_shader_listener); | 2095 | gSavedSettings.getControl("EnableRippleWater")->addListener(&set_shader_listener); |
2096 | gSavedSettings.getControl("RenderGlowResolutionPow")->addListener(&release_gl_buffer_listener); | ||
2097 | gSavedSettings.getControl("RenderAvatarCloth")->addListener(&set_shader_listener); | ||
2098 | gSavedSettings.getControl("WindLightUseAtmosShaders")->addListener(&set_shader_listener); | ||
2099 | gSavedSettings.getControl("RenderGammaFull")->addListener(&set_shader_listener); | ||
1970 | gSavedSettings.getControl("RenderVolumeLODFactor")->addListener(&volume_lod_listener); | 2100 | gSavedSettings.getControl("RenderVolumeLODFactor")->addListener(&volume_lod_listener); |
1971 | gSavedSettings.getControl("RenderAvatarLODFactor")->addListener(&avatar_lod_listener); | 2101 | gSavedSettings.getControl("RenderAvatarLODFactor")->addListener(&avatar_lod_listener); |
2102 | gSavedSettings.getControl("RenderTerrainLODFactor")->addListener(&terrain_lod_listener); | ||
1972 | gSavedSettings.getControl("RenderTreeLODFactor")->addListener(&tree_lod_listener); | 2103 | gSavedSettings.getControl("RenderTreeLODFactor")->addListener(&tree_lod_listener); |
1973 | gSavedSettings.getControl("RenderFlexTimeFactor")->addListener(&flex_lod_listener); | 2104 | gSavedSettings.getControl("RenderFlexTimeFactor")->addListener(&flex_lod_listener); |
1974 | gSavedSettings.getControl("ThrottleBandwidthKBPS")->addListener(&bandwidth_listener); | 2105 | gSavedSettings.getControl("ThrottleBandwidthKBPS")->addListener(&bandwidth_listener); |
1975 | gSavedSettings.getControl("RenderGamma")->addListener(&gamma_listener); | 2106 | gSavedSettings.getControl("RenderGamma")->addListener(&gamma_listener); |
1976 | gSavedSettings.getControl("RenderNightBrightness")->addListener(&night_brightness_listener); | ||
1977 | gSavedSettings.getControl("RenderFogRatio")->addListener(&fog_ratio_listener); | 2107 | gSavedSettings.getControl("RenderFogRatio")->addListener(&fog_ratio_listener); |
1978 | gSavedSettings.getControl("RenderMaxPartCount")->addListener(&max_partCount_listener); | 2108 | gSavedSettings.getControl("RenderMaxPartCount")->addListener(&max_partCount_listener); |
2109 | gSavedSettings.getControl("RenderDynamicLOD")->addListener(&render_dynamic_lod_listener); | ||
2110 | gSavedSettings.getControl("RenderDebugTextureBind")->addListener(&reset_vbo_listener); | ||
2111 | gSavedSettings.getControl("RenderFastAlpha")->addListener(&reset_vbo_listener); | ||
2112 | gSavedSettings.getControl("RenderObjectBump")->addListener(&reset_vbo_listener); | ||
2113 | gSavedSettings.getControl("RenderMaxVBOSize")->addListener(&reset_vbo_listener); | ||
2114 | gSavedSettings.getControl("RenderUseFBO")->addListener(&render_use_fbo_listener); | ||
2115 | gSavedSettings.getControl("RenderUseImpostors")->addListener(&render_use_impostors_listener); | ||
2116 | gSavedSettings.getControl("RenderUseCleverUI")->addListener(&render_use_clever_ui_listener); | ||
2117 | gSavedSettings.getControl("RenderResolutionDivisor")->addListener(&render_resolution_divisor_listener); | ||
1979 | gSavedSettings.getControl("AvatarCompositeLimit")->addListener(&composite_limit_listener); | 2118 | gSavedSettings.getControl("AvatarCompositeLimit")->addListener(&composite_limit_listener); |
1980 | gSavedSettings.getControl("GraphicsCardMemorySetting")->addListener(&video_memory_listener); | 2119 | gSavedSettings.getControl("TextureMemory")->addListener(&video_memory_listener); |
1981 | gSavedSettings.getControl("ChatFontSize")->addListener(&chat_font_size_listener); | 2120 | gSavedSettings.getControl("ChatFontSize")->addListener(&chat_font_size_listener); |
1982 | gSavedSettings.getControl("ChatPersistTime")->addListener(&chat_persist_time_listener); | 2121 | gSavedSettings.getControl("ChatPersistTime")->addListener(&chat_persist_time_listener); |
1983 | gSavedSettings.getControl("ConsoleMaxLines")->addListener(&console_max_lines_listener); | 2122 | gSavedSettings.getControl("ConsoleMaxLines")->addListener(&console_max_lines_listener); |
@@ -1993,7 +2132,7 @@ void settings_setup_listeners() | |||
1993 | gSavedSettings.getControl("AudioLevelDoppler")->addListener(&audio_listener); | 2132 | gSavedSettings.getControl("AudioLevelDoppler")->addListener(&audio_listener); |
1994 | gSavedSettings.getControl("AudioLevelRolloff")->addListener(&audio_listener); | 2133 | gSavedSettings.getControl("AudioLevelRolloff")->addListener(&audio_listener); |
1995 | gSavedSettings.getControl("AudioStreamingMusic")->addListener(&audio_stream_music_listener); | 2134 | gSavedSettings.getControl("AudioStreamingMusic")->addListener(&audio_stream_music_listener); |
1996 | gSavedSettings.getControl("AudioStreamingVideo")->addListener(&audio_stream_media_listener); | 2135 | // AudioStreamingVideo initialized in llviewermedia.cpp |
1997 | gSavedSettings.getControl("MuteAudio")->addListener(&audio_listener); | 2136 | gSavedSettings.getControl("MuteAudio")->addListener(&audio_listener); |
1998 | gSavedSettings.getControl("MuteMusic")->addListener(&audio_listener); | 2137 | gSavedSettings.getControl("MuteMusic")->addListener(&audio_listener); |
1999 | gSavedSettings.getControl("MuteMedia")->addListener(&audio_listener); | 2138 | gSavedSettings.getControl("MuteMedia")->addListener(&audio_listener); |
@@ -2001,6 +2140,7 @@ void settings_setup_listeners() | |||
2001 | gSavedSettings.getControl("MuteAmbient")->addListener(&audio_listener); | 2140 | gSavedSettings.getControl("MuteAmbient")->addListener(&audio_listener); |
2002 | gSavedSettings.getControl("MuteUI")->addListener(&audio_listener); | 2141 | gSavedSettings.getControl("MuteUI")->addListener(&audio_listener); |
2003 | gSavedSettings.getControl("RenderVBOEnable")->addListener(&render_use_vbo_listener); | 2142 | gSavedSettings.getControl("RenderVBOEnable")->addListener(&render_use_vbo_listener); |
2143 | gSavedSettings.getControl("WLSkyDetail")->addListener(&wl_sky_detail_listener); | ||
2004 | gSavedSettings.getControl("RenderLightingDetail")->addListener(&render_lighting_detail_listener); | 2144 | gSavedSettings.getControl("RenderLightingDetail")->addListener(&render_lighting_detail_listener); |
2005 | gSavedSettings.getControl("NumpadControl")->addListener(&numpad_control_listener); | 2145 | gSavedSettings.getControl("NumpadControl")->addListener(&numpad_control_listener); |
2006 | gSavedSettings.getControl("FlycamAxis0")->addListener(&joystick_listener); | 2146 | gSavedSettings.getControl("FlycamAxis0")->addListener(&joystick_listener); |