diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 337d005be..7f5c065ea 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -35,8 +35,8 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 5; -const S32 LL_VERSION_PATCH = 5; -const S32 LL_VERSION_BUILD = 0; +const S32 LL_VERSION_PATCH = 6; +const S32 LL_VERSION_BUILD = 1; const char * const LL_CHANNEL = "Singularity"; diff --git a/indra/llimage/llimagejpeg.h b/indra/llimage/llimagejpeg.h index 884d07116..abeaf84ce 100644 --- a/indra/llimage/llimagejpeg.h +++ b/indra/llimage/llimagejpeg.h @@ -35,8 +35,6 @@ #include -#include "llimage.h" - extern "C" { #ifdef LL_STANDALONE # include @@ -47,6 +45,8 @@ extern "C" { #endif } +#include "llimage.h" + class LLImageJPEG : public LLImageFormatted { protected: diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index b9d44c6cb..aceebf781 100644 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -171,7 +171,7 @@ void LLImageDecodeThread::ImageRequest::finishRequest(bool completed) { if (mResponder.notNull()) { - bool success = completed && mDecodedRaw && (!mNeedsAux || mDecodedAux); + bool success = completed && mDecodedRaw && mDecodedImageRaw->getDataSize() && (!mNeedsAux || mDecodedAux); mResponder->completed(success, mDecodedImageRaw, mDecodedImageAux); } // Will automatically be deleted diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 1962b91cd..0144ffa00 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -195,8 +195,6 @@ void LLParcel::init(const LLUUID &owner_id, mMediaID.setNull(); mMediaAutoScale = 0; mMediaLoop = TRUE; - mObscureMedia = 1; - mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); @@ -692,8 +690,8 @@ void LLParcel::packMessage(LLSD& msg) msg["auto_scale"] = getMediaAutoScale(); msg["media_loop"] = getMediaLoop(); msg["media_current_url"] = getMediaCurrentURL(); - msg["obscure_media"] = getObscureMedia(); - msg["obscure_music"] = getObscureMusic(); + msg["obscure_media"] = FALSE; // OBSOLETE - no longer used + msg["obscure_music"] = FALSE; // OBSOLETE - no longer used msg["media_id"] = getMediaID(); msg["media_allow_navigate"] = getMediaAllowNavigate(); msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom(); @@ -757,16 +755,12 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) msg->getS32("MediaData", "MediaWidth", mMediaWidth); msg->getS32("MediaData", "MediaHeight", mMediaHeight); msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop ); - msg->getU8 ( "MediaData", "ObscureMedia", mObscureMedia ); - msg->getU8 ( "MediaData", "ObscureMusic", mObscureMusic ); } else { setMediaType(std::string("video/vnd.secondlife.qt.legacy")); setMediaDesc(std::string("No Description available without Server Upgrade")); mMediaLoop = true; - mObscureMedia = true; - mObscureMusic = true; } if(msg->getNumberOfBlocks("MediaLinkSharing") > 0) @@ -1232,8 +1226,6 @@ void LLParcel::clearParcel() setMediaDesc(LLStringUtil::null); setMediaAutoScale(0); setMediaLoop(TRUE); - mObscureMedia = 1; - mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index 8faa673c3..fcbd01b9a 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -243,8 +243,6 @@ public: void setMediaID(const LLUUID& id) { mMediaID = id; } void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; } void setMediaLoop (U8 loop) { mMediaLoop = loop; } - void setObscureMedia( U8 flagIn ) { mObscureMedia = flagIn; } - void setObscureMusic( U8 flagIn ) { mObscureMusic = flagIn; } void setMediaWidth(S32 width); void setMediaHeight(S32 height); void setMediaCurrentURL(const std::string& url); @@ -351,8 +349,6 @@ public: U8 getMediaAutoScale() const { return mMediaAutoScale; } U8 getMediaLoop() const { return mMediaLoop; } const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; } - U8 getObscureMedia() const { return mObscureMedia; } - U8 getObscureMusic() const { return mObscureMusic; } U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; } LLSD getMediaURLFilterList() const { return mMediaURLFilterList; } U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; } @@ -644,8 +640,6 @@ protected: U8 mMediaAutoScale; U8 mMediaLoop; std::string mMediaCurrentURL; - U8 mObscureMedia; - U8 mObscureMusic; LLUUID mMediaID; U8 mMediaURLFilterEnable; LLSD mMediaURLFilterList; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 11ec38415..f597d7c70 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -788,9 +788,12 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch { return 0; } - - llassert(max_pixels >= 0.f); - llassert(max_chars >= 0); + + //llassert(max_pixels >= 0.f); + //llassert(max_chars >= 0); + if(max_pixels < 0.f || max_chars < 0) { + return 0; + } BOOL clip = FALSE; F32 cur_x = 0; diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 4ff31ed20..980d705af 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1599,7 +1599,7 @@ void LLLineEditor::draw() std::string text; for (S32 i = 0; i < mText.length(); i++) { - text += '*'; + text += "\xe2\x80\xa2"; } mText = text; } diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 3f8b48b64..d495176de 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -542,7 +542,7 @@ std::string LLDir::getForbiddenFileChars() return "\\/:*?\"<>|"; } -void LLDir::setLindenUserDir(const std::string &first, const std::string &last) +void LLDir::setLindenUserDir(const std::string &grid, const std::string &first, const std::string &last) { // if both first and last aren't set, assume we're grabbing the cached dir if (!first.empty() && !last.empty()) @@ -558,6 +558,14 @@ void LLDir::setLindenUserDir(const std::string &first, const std::string &last) mLindenUserDir += firstlower; mLindenUserDir += "_"; mLindenUserDir += lastlower; + + if (!grid.empty()) + { + std::string gridlower(grid); + LLStringUtil::toLower(gridlower); + mLindenUserDir += "@"; + mLindenUserDir += gridlower; + } } else { diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 99179567a..4111f4ffa 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -131,7 +131,7 @@ class LLDir virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir virtual void setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last); // Set the per user chat log directory. - virtual void setLindenUserDir(const std::string &first, const std::string &last); // Set the linden user dir to this user's dir + virtual void setLindenUserDir(const std::string& grid, const std::string& first, const std::string& last); // Set the linden user dir to this user's dir virtual void setSkinFolder(const std::string &skin_folder); virtual bool setCacheDir(const std::string &path); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3f7b7e5eb..bc9c130f8 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -64,6 +64,7 @@ include_directories( ) set(viewer_SOURCE_FILES + slfloatermediafilter.cpp floaterlocalassetbrowse.cpp aoremotectrl.cpp floaterao.cpp @@ -538,6 +539,7 @@ set(viewer_HEADER_FILES CMakeLists.txt ViewerInstall.cmake + slfloatermediafilter.h floaterlocalassetbrowse.h aoremotectrl.h floaterao.h diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index cd7b533e7..022017247 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -512,6 +512,43 @@ TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouc TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid. TOUCH_INVALID_FACE Value returned by llDetectedTouchFace() when the touch position is not valid. +WL_WATER_COLOR Windlight Water Colour +WL_WATER_FOG_DENSITY_EXPONENT Windlight Water Fog Density Exponent +WL_UNDERWATER_FOG_MODIFIER Windlight Underwater Fog Modifier +WL_REFLECTION_WAVELET_SCALE Windlight Reflection Wavelet Scale +WL_FRESNEL_SCALE Windlight Fresnel Scale +WL_FRESNEL_OFFSET Windlight Fresnel Offset +WL_REFRACT_SCALE_ABOVE Windlight Refract Scale Above +WL_REFRACT_SCALE_BELOW Windlight Refract Scale Below +WL_BLUR_MULTIPLIER Windlight Blur Multiplier +WL_BIG_WAVE_DIRECTION Windlight Big Wave Direction +WL_LITTLE_WAVE_DIRECTION Windlight Little Wave Direction +WL_NORMAL_MAP_TEXTURE Windlight Normal Map Texture +WL_HORIZON Windlight Horizon Colour +WL_HAZE_HORIZON Windlight Haze Horizon +WL_BLUE_DENSITY Windlight Blue Density +WL_HAZE_DENSITY Windlight Haze Density +WL_DENSITY_MULTIPLIER Windlight Density Multiplier +WL_DISTANCE_MULTIPLIER Windlight Distance Multiplier +WL_MAX_ALTITUDE Windlight Max Altitude +WL_SUN_MOON_COLOR Windlight Sun/Moon Colour +WL_AMBIENT Windlight Ambient Colour +WL_EAST_ANGLE Windlight Sun/Position East +WL_SUN_GLOW_FOCUS Windlight Sun Glow Focus +WL_SUN_GLOW_SIZE Windlight Sun Glow Size +WL_SCENE_GAMMA Windlight Scene Gamma +WL_STAR_BRIGHTNESS Windlight Star Brightness +WL_CLOUD_COLOR Windlight Cloud Colour +WL_CLOUD_XY_DENSITY Windlight Cloud X/Y/Density +WL_CLOUD_COVERAGE Windlight Cloud Coverage +WL_CLOUD_SCALE Windlight Cloud Scale +WL_CLOUD_DETAIL_XY_DENSITY Windlight Cloud Detail X/Y/Density +WL_CLOUD_SCROLL_X Windlight Cloud Scroll X +WL_CLOUD_SCROLL_Y Windlight Cloud Scroll Y +WL_CLOUD_SCROLL_Y_LOCK Windlight Cloud Scroll Y Lock +WL_CLOUD_SCROLL_X_LOCK Windlight Cloud Scroll X Lock +WL_DRAW_CLASSIC_CLOUDS Windlight Draw Classic Clouds + # string constants [word .1, .3, .5] NULL_KEY Indicates an empty key diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2057d827c..73555f64b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9,6 +9,47 @@ settings_rlv.xml + + MediaEnableFilter + + Comment + Enable media domain filtering + Persist + 1 + Type + Boolean + Value + 0 + + MediaFilterRect + + Comment + Rectangle for Media Filter floater + Persist + 1 + Type + Rect + Value + + 0 + 100 + 100 + 100 + + + + UseServersideWindlightSettings + + Comment + Whether or not to use Windlight settings presented by the server. + Persist + 1 + Type + Boolean + Value + 1 + + FloaterLocalbitmapbrowserRect Comment @@ -10891,7 +10932,7 @@ Type Boolean Value - 1 + 0 ShowStartLocation @@ -12942,7 +12983,7 @@ Type Boolean Value - 0 + 1 VectorizePerfTest diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index 337f8656c..5840e9de4 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -394,7 +394,7 @@ void LLPrefsAscentSysImpl::apply() //Missing the echo/log option. gSavedSettings.setBOOL("PlayTypingSound", childGetValue("play_typing_sound_check")); gSavedSettings.setBOOL("AscentHideTypingNotification", childGetValue("hide_typing_check")); - gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean()); gSavedSettings.setBOOL("AscentAllowMUpose", childGetValue("allow_mu_pose_check").asBoolean()); gSavedSettings.setBOOL("AscentAutoCloseOOC", childGetValue("close_ooc_check").asBoolean()); //gSavedSettings.setU32("LinksForChattingObjects", childGetValue("objects_link"). ); diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index d557df3d9..a587d10ac 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -53,9 +53,11 @@ WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 -RenderTextureMemoryMultiple 1 1.0 RenderShaderLightingMaxLevel 1 3 - +RenderTextureMemoryMultiple 1 1.0 +RenderUseFBO 1 1 +RenderDeferred 1 1 +RenderFastAlpha 1 1 // // Low Graphics Settings @@ -63,10 +65,10 @@ RenderShaderLightingMaxLevel 1 3 list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 -RenderAvatarLODFactor 1 0.5 +RenderAvatarLODFactor 1 0.25 RenderAvatarVP 1 0 RenderFarClip 1 64 -RenderFlexTimeFactor 1 0.5 +RenderFlexTimeFactor 1 0.1 RenderGlowResolutionPow 1 8 RenderLightingDetail 1 0 RenderMaxPartCount 1 1024 @@ -74,13 +76,16 @@ RenderObjectBump 1 0 RenderReflectionDetail 1 0 RenderTerrainDetail 1 0 RenderTerrainLODFactor 1 1 -RenderTreeLODFactor 1 0.5 +RenderTreeLODFactor 1 0.25 RenderUseImpostors 1 1 -RenderVolumeLODFactor 1 1.125 +RenderVolumeLODFactor 1 0.5 RenderWaterReflections 1 0 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 +RenderUseFBO 0 0 +RenderDeferred 0 0 +RenderFastAlpha 0 0 // // Mid Graphics Settings @@ -91,7 +96,7 @@ RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 RenderAvatarVP 1 1 RenderFarClip 1 96 -RenderFlexTimeFactor 1 1.0 +RenderFlexTimeFactor 1 0.5 RenderGlowResolutionPow 1 8 RenderLightingDetail 1 1 RenderMaxPartCount 1 2048 @@ -106,6 +111,10 @@ RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 +RenderUseFBO 1 0 +RenderDeferred 1 0 +RenderFastAlpha 1 0 + // // High Graphics Settings (purty) @@ -131,6 +140,10 @@ RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 48 +RenderUseFBO 1 0 +RenderDeferred 1 0 +RenderFastAlpha 1 0 + // // Ultra graphics (REALLY PURTY!) @@ -156,6 +169,9 @@ RenderWaterReflections 1 1 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 +RenderUseFBO 1 1 +RenderDeferred 1 1 +RenderFastAlpha 1 1 // // Class Unknown Hardware (unknown) diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 57d712ede..c8245ae93 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -53,7 +53,11 @@ WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 +RenderShaderLightingMaxLevel 1 3 RenderTextureMemoryMultiple 1 1.0 +RenderUseFBO 1 1 +RenderDeferred 1 1 +RenderFastAlpha 1 1 // // Low Graphics Settings @@ -61,10 +65,10 @@ RenderTextureMemoryMultiple 1 1.0 list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 -RenderAvatarLODFactor 1 0.5 +RenderAvatarLODFactor 1 0.25 RenderAvatarVP 1 0 RenderFarClip 1 64 -RenderFlexTimeFactor 1 0.5 +RenderFlexTimeFactor 1 0.1 RenderGlowResolutionPow 1 8 RenderLightingDetail 1 0 RenderMaxPartCount 1 1024 @@ -72,13 +76,16 @@ RenderObjectBump 1 0 RenderReflectionDetail 1 0 RenderTerrainDetail 1 0 RenderTerrainLODFactor 1 1 -RenderTreeLODFactor 1 0.5 +RenderTreeLODFactor 1 0.25 RenderUseImpostors 1 1 -RenderVolumeLODFactor 1 1.125 +RenderVolumeLODFactor 1 0.5 RenderWaterReflections 1 0 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 +RenderUseFBO 0 0 +RenderDeferred 0 0 +RenderFastAlpha 0 0 // // Mid Graphics Settings @@ -89,7 +96,7 @@ RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 RenderAvatarVP 1 1 RenderFarClip 1 96 -RenderFlexTimeFactor 1 1.0 +RenderFlexTimeFactor 1 0.5 RenderGlowResolutionPow 1 8 RenderLightingDetail 1 1 RenderMaxPartCount 1 2048 @@ -104,6 +111,10 @@ RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 +RenderUseFBO 1 0 +RenderDeferred 1 0 +RenderFastAlpha 1 0 + // // High Graphics Settings (purty) @@ -129,6 +140,10 @@ RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 48 +RenderUseFBO 1 0 +RenderDeferred 1 0 +RenderFastAlpha 1 0 + // // Ultra graphics (REALLY PURTY!) @@ -154,6 +169,10 @@ RenderWaterReflections 1 1 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 +RenderUseFBO 1 1 +RenderDeferred 1 1 +RenderFastAlpha 1 1 + // // Class Unknown Hardware (unknown) @@ -219,6 +238,9 @@ RenderUseImpostors 0 0 RenderVBOEnable 1 0 RenderWaterReflections 0 0 WindLightUseAtmosShaders 0 0 +RenderUseFBO 1 0 +RenderDeferred 1 0 + // // CPU based feature masks diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 15974c069..86df881f9 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -23,39 +23,41 @@ version 20 // NOTE: All settings are set to the MIN of applied values, including 'all'! // list all -RenderAnisotropic 1 0 -RenderAvatarCloth 0 0 -RenderAvatarLODFactor 1 1.0 -RenderAvatarVP 1 0 -RenderCubeMap 1 1 -RenderFarClip 1 256 -RenderFlexTimeFactor 1 1.0 -RenderFogRatio 1 4.0 -RenderGamma 1 0 -RenderGlowResolutionPow 1 9 -RenderGround 1 1 -RenderLightingDetail 1 1 -RenderMaxPartCount 1 8192 -RenderNightBrightness 1 1.0 -RenderObjectBump 1 1 -RenderReflectionDetail 1 3 -RenderTerrainDetail 1 1 -RenderTerrainLODFactor 1 2.0 -RenderTreeLODFactor 1 1.0 -RenderUseImpostors 1 1 -RenderVBOEnable 1 1 -RenderVolumeLODFactor 1 2.0 -RenderWaterReflections 1 1 -UseOcclusion 1 1 -VertexShaderEnable 1 1 -WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 128 -RenderUseCleverUI 1 1 -Disregard128DefaultDrawDistance 1 1 -Disregard96DefaultDrawDistance 1 1 -RenderTextureMemoryMultiple 1 0.5 +RenderAnisotropic 1 0 +RenderAvatarCloth 1 1 +RenderAvatarLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderCubeMap 1 1 +RenderFarClip 1 256 +RenderFlexTimeFactor 1 1.0 +RenderFogRatio 1 4.0 +RenderGamma 1 0 +RenderGlowResolutionPow 1 9 +RenderGround 1 1 +RenderLightingDetail 1 1 +RenderMaxPartCount 1 8192 +RenderNightBrightness 1 1.0 +RenderObjectBump 1 1 +RenderReflectionDetail 1 3 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTreeLODFactor 1 1.0 +RenderUseImpostors 1 1 +RenderVBOEnable 1 1 +RenderVolumeLODFactor 1 2.0 +RenderWaterReflections 1 1 +UseStartScreen 1 1 +UseOcclusion 1 1 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 +RenderShaderLightingMaxLevel 1 3 +RenderTextureMemoryMultiple 1 1.0 +RenderUseFBO 1 1 +RenderDeferred 1 1 +RenderFastAlpha 1 1 // // Low Graphics Settings @@ -63,10 +65,10 @@ Disregard96DefaultDrawDistance 1 1 list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 -RenderAvatarLODFactor 1 0.5 +RenderAvatarLODFactor 1 0.25 RenderAvatarVP 1 0 RenderFarClip 1 64 -RenderFlexTimeFactor 1 0.5 +RenderFlexTimeFactor 1 0.1 RenderGlowResolutionPow 1 8 RenderLightingDetail 1 0 RenderMaxPartCount 1 1024 @@ -74,13 +76,16 @@ RenderObjectBump 1 0 RenderReflectionDetail 1 0 RenderTerrainDetail 1 0 RenderTerrainLODFactor 1 1 -RenderTreeLODFactor 1 0.5 +RenderTreeLODFactor 1 0.25 RenderUseImpostors 1 1 -RenderVolumeLODFactor 1 1.125 +RenderVolumeLODFactor 1 0.5 RenderWaterReflections 1 0 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 +RenderUseFBO 0 0 +RenderDeferred 0 0 +RenderFastAlpha 0 0 // // Mid Graphics Settings @@ -91,7 +96,7 @@ RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 RenderAvatarVP 1 1 RenderFarClip 1 96 -RenderFlexTimeFactor 1 1.0 +RenderFlexTimeFactor 1 0.5 RenderGlowResolutionPow 1 8 RenderLightingDetail 1 1 RenderMaxPartCount 1 2048 @@ -106,6 +111,10 @@ RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 +RenderUseFBO 1 0 +RenderDeferred 1 0 +RenderFastAlpha 1 0 + // // High Graphics Settings (purty) @@ -131,6 +140,10 @@ RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 48 +RenderUseFBO 1 0 +RenderDeferred 1 0 +RenderFastAlpha 1 0 + // // Ultra graphics (REALLY PURTY!) @@ -156,6 +169,9 @@ RenderWaterReflections 1 1 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 +RenderUseFBO 1 1 +RenderDeferred 1 1 +RenderFastAlpha 1 1 // // Class Unknown Hardware (unknown) diff --git a/indra/newview/hippogridmanager.cpp b/indra/newview/hippogridmanager.cpp index 1cc6eca64..c2a9bb6c0 100644 --- a/indra/newview/hippogridmanager.cpp +++ b/indra/newview/hippogridmanager.cpp @@ -95,6 +95,15 @@ const std::string& HippoGridInfo::getGridName() const return mGridName; } +const std::string& HippoGridInfo::getGridOwner() const { + if(isSecondLife()) { + static const std::string ll = "Linden Lab"; + return ll; + } else { + return this->getGridName(); + } +} + const std::string& HippoGridInfo::getLoginUri() const { return mLoginUri; @@ -600,7 +609,14 @@ void HippoGridInfo::initFallback() FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/"); } - +bool HippoGridInfo::supportsInvLinks(){ + if(isSecondLife()) + return true; + else if(mLoginUri.find("avination.")!=std::string::npos) + return true; + else + return false; +} // ******************************************************************** // ******************************************************************** diff --git a/indra/newview/hippogridmanager.h b/indra/newview/hippogridmanager.h index 8429dbaf6..618623b17 100644 --- a/indra/newview/hippogridmanager.h +++ b/indra/newview/hippogridmanager.h @@ -40,6 +40,7 @@ public: bool isSecondLife() const; const std::string& getGridNick() const; const std::string& getGridName() const; + const std::string& getGridOwner() const; const std::string& getLoginUri() const; const std::string& getLoginPage() const; const std::string& getHelperUri() const; @@ -85,6 +86,7 @@ public: void setCurrencySymbol(const std::string& sym); void setRealCurrencySymbol(const std::string& sym); void setDirectoryFee(int fee); + bool supportsInvLinks(); bool retrieveGridInfo(); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index d8ff610fd..5917d402f 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -7367,9 +7367,10 @@ void LLAgent::makeNewOutfit( return; } - BOOL fUseLinks = !gSavedSettings.getBOOL("UseInventoryLinks") && - gHippoGridManager->getConnectedGrid()->isSecondLife(); - BOOL fUseOutfits = gSavedSettings.getBOOL("UseOutfitFolders"); + BOOL fUseLinks = !gSavedSettings.getBOOL("UseInventoryLinks") || + !gHippoGridManager->getConnectedGrid()->supportsInvLinks(); + BOOL fUseOutfits = gSavedSettings.getBOOL("UseOutfitFolders") && + gHippoGridManager->getConnectedGrid()->supportsInvLinks(); LLAssetType::EType typeDest = (fUseOutfits) ? LLAssetType::AT_MY_OUTFITS : LLAssetType::AT_CLOTHING; LLAssetType::EType typeFolder = (fUseOutfits) ? LLAssetType::AT_OUTFIT : LLAssetType::AT_NONE; @@ -8482,10 +8483,11 @@ void LLAgent::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_ } const LLInventoryItem* item = obj_item_array.get(i).get(); + bool replace = !gHippoGridManager->getConnectedGrid()->supportsInvLinks(); msg->nextBlockFast(_PREHASH_ObjectData ); msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID()); msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); - msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD); // Wear at the previous or default attachment point + msg->addU8Fast(_PREHASH_AttachmentPt, replace? 0 : ATTACHMENT_ADD); // Wear at the previous or default attachment point pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); msg->addStringFast(_PREHASH_Name, item->getName()); msg->addStringFast(_PREHASH_Description, item->getDescription()); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 93c7852c8..600f83881 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1004,6 +1004,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, BOOL rebuild_binormal = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_BINORMAL); const LLTextureEntry *tep = mVObjp->getTE(f); + if (!tep) rebuild_color = FALSE; // can't get color when tep is NULL U8 bump_code = tep ? tep->getBumpmap() : 0; if (rebuild_pos) @@ -1101,9 +1102,9 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } } - LLColor4U color = tep->getColor(); + LLColor4U color = (tep ? LLColor4U(tep->getColor()) : LLColor4U::white); - if (rebuild_color) + if (rebuild_color) // FALSE if tep == NULL { if (tep) { diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 2cf2d9a1f..3e7621ce6 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -32,6 +32,7 @@ #include "llviewerprecompiledheaders.h" +#include "llimagejpeg.h" #include "llfloatercustomize.h" #include "llfontgl.h" #include "llbutton.h" @@ -71,11 +72,11 @@ #include "llglheaders.h" #include "llui.h" #include "llviewermessage.h" -#include "llimagejpeg.h" #include "llviewercontrol.h" #include "lluictrlfactory.h" #include "llfilepicker.h" +#include "hippogridmanager.h" using namespace LLVOAvatarDefines; @@ -219,6 +220,13 @@ public: } } + if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { + childSetEnabled("checkbox_use_links", FALSE); + childSetValue("checkbox_use_links", FALSE); + childSetEnabled("checkbox_use_outfits", FALSE); + childSetValue("checkbox_use_outfits", FALSE); + } + childSetAction("Save", onSave, this ); childSetAction("Cancel", onCancel, this ); childSetAction("Check All", onCheckAll, this ); diff --git a/indra/newview/llfloaterdirectory.cpp b/indra/newview/llfloaterdirectory.cpp index 4e0edb763..7546370cc 100644 --- a/indra/newview/llfloaterdirectory.cpp +++ b/indra/newview/llfloaterdirectory.cpp @@ -94,7 +94,9 @@ LLFloaterDirectory::LLFloaterDirectory(const std::string& name) // Build the floater with our tab panel classes - bool isInSecondLife = gHippoGridManager->getConnectedGrid()->isSecondLife(); + bool enableWebSearch = gHippoGridManager->getConnectedGrid()->isSecondLife() || + !gHippoGridManager->getConnectedGrid()->getSearchUrl().empty(); + bool enableClassicAllSearch = !gHippoGridManager->getConnectedGrid()->isSecondLife(); LLCallbackMap::map_t factory_map; factory_map["classified_panel"] = LLCallbackMap(createClassified, this); @@ -103,15 +105,16 @@ LLFloaterDirectory::LLFloaterDirectory(const std::string& name) factory_map["land_sales_panel"] = LLCallbackMap(createLand, this); factory_map["people_panel"] = LLCallbackMap(createPeople, this); factory_map["groups_panel"] = LLCallbackMap(createGroups, this); - if (isInSecondLife) + if (enableWebSearch) { // web search and showcase only for SecondLife factory_map["find_all_panel"] = LLCallbackMap(createFindAll, this); - factory_map["showcase_panel"] = LLCallbackMap(createShowcase, this); + factory_map["showcase_panel"] = LLCallbackMap(createShowcase, this); } - else + + if (enableClassicAllSearch) { - factory_map["find_all_old_panel"] = LLCallbackMap(createFindAllOld, this); + factory_map["find_all_old_panel"] = LLCallbackMap(createFindAllOld, this); } factory_map["classified_details_panel"] = LLCallbackMap(createClassifiedDetail, this); @@ -123,9 +126,12 @@ LLFloaterDirectory::LLFloaterDirectory(const std::string& name) factory_map["Panel Avatar"] = LLCallbackMap(createPanelAvatar, this); - if (isInSecondLife) + if (enableWebSearch) { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_directory.xml", &factory_map); + if (enableClassicAllSearch) + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_directory3.xml", &factory_map); + else + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_directory.xml", &factory_map); } else { @@ -144,13 +150,14 @@ LLFloaterDirectory::LLFloaterDirectory(const std::string& name) childSetTabChangeCallback("Directory Tabs", "land_sales_panel", onTabChanged, this); childSetTabChangeCallback("Directory Tabs", "people_panel", onTabChanged, this); childSetTabChangeCallback("Directory Tabs", "groups_panel", onTabChanged, this); - if (isInSecondLife) + if (enableWebSearch) { // web search and showcase for SecondLife childSetTabChangeCallback("Directory Tabs", "find_all_panel", onTabChanged, this); childSetTabChangeCallback("Directory Tabs", "showcase_panel", onTabChanged, this); } - else + + if(enableClassicAllSearch) { childSetTabChangeCallback("Directory Tabs", "find_all_old_panel", onTabChanged, this); } @@ -421,10 +428,10 @@ void LLFloaterDirectory::toggleFind(void*) if (!sInstance) { std::string panel = gSavedSettings.getString("LastFindPanel"); - if (!gHippoGridManager->getConnectedGrid()->isSecondLife() - && (panel == "find_all_panel" || panel == "showcase_panel")) + bool hasWebSearch = gHippoGridManager->getConnectedGrid()->isSecondLife() || + !gHippoGridManager->getConnectedGrid()->getSearchUrl().empty(); + if (hasWebSearch && (panel == "find_all_panel" || panel == "showcase_panel")) { - // No web search neither showcase for OpenSim grids... panel = "find_all_old_panel"; } showPanel(panel); diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp index 661c3988c..6a55b8598 100644 --- a/indra/newview/llfloaterenvsettings.cpp +++ b/indra/newview/llfloaterenvsettings.cpp @@ -41,7 +41,8 @@ #include "llcombobox.h" #include "llcolorswatch.h" #include "llwlanimator.h" - +#include "llviewergenericmessage.h" +#include "meta7windlight.h" #include "llwlparamset.h" #include "llwlparammanager.h" #include "llwaterparammanager.h" @@ -87,6 +88,7 @@ void LLFloaterEnvSettings::initCallbacks(void) // WL Top childSetAction("EnvAdvancedSkyButton", onOpenAdvancedSky, NULL); childSetAction("EnvAdvancedWaterButton", onOpenAdvancedWater, NULL); + childSetAction("EnvSubmitWindlight", onSubmitWindlight, NULL); childSetAction("EnvUseEstateTimeButton", onUseEstateTime, NULL); childSetAction("EnvSettingsHelpButton", onClickHelp, this); } @@ -284,6 +286,20 @@ void LLFloaterEnvSettings::onOpenAdvancedWater(void* userData) LLFloaterWater::show(); } +void LLFloaterEnvSettings::onSubmitWindlight(void* userData) +{ + Meta7WindlightPacket * wl = new Meta7WindlightPacket(); + + LLWaterParamManager * param_mgr = LLWaterParamManager::instance(); + wl->reflectionWaveletScale.X = param_mgr->mNormalScale.mX; + wl->reflectionWaveletScale.Y = param_mgr->mNormalScale.mY; + wl->reflectionWaveletScale.Z = param_mgr->mNormalScale.mZ; + + + std::vector strings; + strings.push_back((char*)wl); + send_generic_message("Windlight", strings); +} void LLFloaterEnvSettings::onUseEstateTime(void* userData) { diff --git a/indra/newview/llfloaterenvsettings.h b/indra/newview/llfloaterenvsettings.h index 4cdf6036c..49bf4fd0d 100644 --- a/indra/newview/llfloaterenvsettings.h +++ b/indra/newview/llfloaterenvsettings.h @@ -78,6 +78,9 @@ public: /// open the advanced water settings menu static void onOpenAdvancedWater(void* userData); + /// submit windlight settings to the estate + static void onSubmitWindlight(void* userData); + /// sync time with the server static void onUseEstateTime(void* userData); diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h index 3a980d251..bce14609d 100644 --- a/indra/newview/llfloaterpostcard.h +++ b/indra/newview/llfloaterpostcard.h @@ -33,6 +33,8 @@ #ifndef LL_LLFLOATERPOSTCARD_H #define LL_LLFLOATERPOSTCARD_H +#include "llimagegl.h" +#include "llimagejpeg.h" #include "llfloater.h" #include "llcheckboxctrl.h" #include "llviewertexture.h" diff --git a/indra/newview/llhudeffect.cpp b/indra/newview/llhudeffect.cpp index c1d46f98d..bfd62805a 100644 --- a/indra/newview/llhudeffect.cpp +++ b/indra/newview/llhudeffect.cpp @@ -38,7 +38,6 @@ #include "llgl.h" #include "llagent.h" #include "llrendersphere.h" -#include "llimagegl.h" #include "llviewerobjectlist.h" #include "lldrawable.h" diff --git a/indra/newview/llhudeffect.h b/indra/newview/llhudeffect.h index 954cda7c8..781e57fa6 100644 --- a/indra/newview/llhudeffect.h +++ b/indra/newview/llhudeffect.h @@ -37,9 +37,6 @@ #include "lluuid.h" #include "v4coloru.h" -#include "llinterp.h" -#include "llframetimer.h" -#include "llmemory.h" const F32 LL_HUD_DUR_SHORT = 1.f; diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp index a7c121434..fc8fc3cd0 100644 --- a/indra/newview/llhudeffectbeam.cpp +++ b/indra/newview/llhudeffectbeam.cpp @@ -43,7 +43,6 @@ #include "llgl.h" #include "llglheaders.h" #include "llhudrender.h" -#include "llimagegl.h" #include "llrendersphere.h" #include "llviewercamera.h" #include "llvoavatar.h" diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp index d3c304b85..fbba2c354 100644 --- a/indra/newview/llhudeffecttrail.cpp +++ b/indra/newview/llhudeffecttrail.cpp @@ -35,7 +35,6 @@ #include "llhudeffecttrail.h" #include "llviewercontrol.h" -#include "llimagegl.h" #include "message.h" #include "llagent.h" diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 16e85c81b..5476db1e2 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -75,6 +75,8 @@ #include "llmutelist.h" #include "llstylemap.h" +#include "boost/algorithm/string.hpp" + // [RLVa:KB] #include "rlvhandler.h" // [/RLVa:KB] @@ -1106,6 +1108,11 @@ LLFloaterIMPanel::LLFloaterIMPanel( mFirstKeystrokeTimer(), mLastKeystrokeTimer() { + if(mOtherParticipantUUID.isNull()) + { + llwarns << "Other participant is NULL" << llendl; + } + // [Ansariel: Display name support] sFloaterIMPanels.insert(this); // [/Ansariel: Display name support] @@ -1142,6 +1149,11 @@ LLFloaterIMPanel::LLFloaterIMPanel( mFirstKeystrokeTimer(), mLastKeystrokeTimer() { + if(mOtherParticipantUUID.isNull()) + { + llwarns << "Other participant is NULL" << llendl; + } + // [Ansariel: Display name support] sFloaterIMPanels.insert(this); // [/Ansariel: Display name support] @@ -2499,11 +2511,13 @@ void LLFloaterIMPanel::showSessionEventError( const std::string& error_string) { LLSD args; - args["REASON"] = - LLFloaterIM::sErrorStringsMap[error_string]; - args["EVENT"] = - LLFloaterIM::sEventStringsMap[event_string]; - args["RECIPIENT"] = getTitle(); + std::string recipient = getTitle(); + std::string reason = LLFloaterIM::sErrorStringsMap[error_string]; + boost::replace_all(reason, "[RECIPIENT]", recipient); + std::string event = LLFloaterIM::sEventStringsMap[event_string]; + boost::replace_all(event, "[RECIPIENT]", recipient); + args["REASON"] = reason; + args["EVENT"] = event; LLNotifications::instance().add( "ChatterBoxSessionEventError", diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b1e7dd664..d96aa3bbc 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -578,13 +578,6 @@ void LLIMMgr::addMessage( other_participant_id = LLUUID::null; } - //This is for InWorldz glitch. - if( other_participant_id == session_id ) - { - other_participant_id = LLUUID::null; - } - - LLFloaterIMPanel* floater; LLUUID new_session_id = session_id; if (new_session_id.isNull()) @@ -679,7 +672,17 @@ void LLIMMgr::addMessage( } else { - floater->addHistoryLine(msg, color, true, other_participant_id, from); // Insert linked name to front of message + + if( other_participant_id == session_id ) + { + // The name can be bogus on InWorldz + floater->addHistoryLine(msg, color, true, LLUUID::null, from); + } + else + { + // Insert linked name to front of message + floater->addHistoryLine(msg, color, true, other_participant_id, from); + } } LLFloaterChatterBox* chat_floater = LLFloaterChatterBox::getInstance(LLSD()); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index dd268c29b..db305ad7c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -528,7 +528,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const BOOL LLInvFVBridge::isClipboardPasteableAsLink() const { - if (!gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { return FALSE; } @@ -1382,7 +1382,7 @@ BOOL LLItemBridge::isItemCopyable() const LLViewerInventoryItem* item = getItem(); if (item && !item->getIsLinkType()) { - if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) { + if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { return (item->getPermissions().allowCopyBy(gAgent.getID())); } else { // All items can be copied since you can @@ -2401,7 +2401,7 @@ void LLFolderBridge::folderOptionsMenu() if(!(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments)) { // - if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (gHippoGridManager->getConnectedGrid()->supportsInvLinks()) mItems.push_back(std::string("Add To Outfit")); mItems.push_back(std::string("Wear Items")); mItems.push_back(std::string("Replace Outfit")); @@ -4179,7 +4179,8 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { items.push_back(std::string("Attach Separator")); items.push_back(std::string("Object Wear")); - items.push_back(std::string("Object Add")); + if (gHippoGridManager->getConnectedGrid()->supportsInvLinks()) + items.push_back(std::string("Object Add")); if (!avatarp->canAttachMoreObjects()) { disabled_items.push_back(std::string("Object Add")); @@ -4667,7 +4668,7 @@ void wear_inventory_category(LLInventoryCategory* category, bool copy, bool appe // *NOTE: hack to get from avatar inventory to avatar void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append, BOOL replace) -{ +{ // Avoid unintentionally overwriting old wearables. We have to do // this up front to avoid having to deal with the case of multiple // wearables being dirty. diff --git a/indra/newview/llmediaremotectrl.cpp b/indra/newview/llmediaremotectrl.cpp index a62973a83..877ba0de5 100644 --- a/indra/newview/llmediaremotectrl.cpp +++ b/indra/newview/llmediaremotectrl.cpp @@ -169,7 +169,7 @@ void LLMediaRemoteCtrl::enableMediaButtons() { // Set the tooltip // Put this text into xui file - media_url = parcel->getObscureMedia() ? mControls->getString("media_hidden_label") : parcel->getMediaURL(); + media_url = parcel->getMediaURL(); media_type = parcel->getMediaType(); play_media_enabled = true; diff --git a/indra/newview/llnotify.cpp b/indra/newview/llnotify.cpp index 7ee72db4a..9a36b6542 100644 --- a/indra/newview/llnotify.cpp +++ b/indra/newview/llnotify.cpp @@ -583,6 +583,7 @@ void LLNotifyBox::format(std::string& msg, const LLStringUtil::format_map_t& arg LLStringUtil::format_map_t targs = args; targs["[SECOND_LIFE]"] = gHippoGridManager->getConnectedGrid()->getGridName(); targs["[GRID_NAME]"] = gHippoGridManager->getConnectedGrid()->getGridName(); + targs["[GRID_OWNER]"] = gHippoGridManager->getConnectedGrid()->getGridOwner(); targs["[GRID_SITE]"] = gHippoGridManager->getConnectedGrid()->getWebSite(); targs["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); targs["[VIEWER_NAME]"] = "Singularity Viewer"; diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index 7454c911f..5f74a9ecb 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -477,6 +477,23 @@ void LLOverlayBar::setCancelTPButtonVisible(BOOL b, const std::string& label) } +//////////////////////////////////////////////////////////////////////////////// +void LLOverlayBar::audioFilterPlay() +{ + if (gOverlayBar && gOverlayBar->mMusicState != PLAYING) + { + gOverlayBar->mMusicState = PLAYING; + } +} + +void LLOverlayBar::audioFilterStop() +{ + if (gOverlayBar && gOverlayBar->mMusicState != STOPPED) + { + gOverlayBar->mMusicState = STOPPED; + } +} + //////////////////////////////////////////////////////////////////////////////// // static media helpers // *TODO: Move this into an audio manager abstraction diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h index 53c0a8f9f..8f9c8ed2f 100644 --- a/indra/newview/lloverlaybar.h +++ b/indra/newview/lloverlaybar.h @@ -78,6 +78,9 @@ public: static void onClickResetView(void* data); static void onClickFlycam(void* data); + static void audioFilterPlay(); + static void audioFilterStop(); + //static media helper functions static void toggleMediaPlay(void*); static void toggleMusicPlay(void*); diff --git a/indra/newview/llpaneldirfind.cpp b/indra/newview/llpaneldirfind.cpp index 90cf15f1c..398cb2972 100644 --- a/indra/newview/llpaneldirfind.cpp +++ b/indra/newview/llpaneldirfind.cpp @@ -285,6 +285,7 @@ void LLPanelDirFind::navigateToDefaultPage() { // OS-based but has its own web search url -- MC start_url = gHippoGridManager->getConnectedGrid()->getSearchUrl(); + start_url += "panel=" + getName() + "&"; } BOOL inc_pg = childGetValue("incpg").asBoolean(); @@ -365,6 +366,7 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const std::string LLPanelDirFind::getSearchURLSuffix(bool inc_pg, bool inc_mature, bool inc_adult, bool is_web) { std::string url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_TEMPLATE, is_web); + llinfos << "Suffix template " << url << llendl; if (!url.empty()) { diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index f5dbfc6c7..fdef5380c 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -254,7 +254,7 @@ BOOL LLPanelGroupGeneral::postBuild() LLStringUtil::format_map_t args; args["[GROUPCREATEFEE]"] = gHippoGridManager->getConnectedGrid()->getGroupCreationFee(); mIncompleteMemberDataStr = getString("incomplete_member_data_str"); - mConfirmGroupCreateStr = getString("confirm_group_create_str"); + mConfirmGroupCreateStr = getString("confirm_group_create_str", args); // If the group_id is null, then we are creating a new group if (mGroupID.isNull()) diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp index 1252c2cd9..dd38bdbd4 100644 --- a/indra/newview/llpanellandaudio.cpp +++ b/indra/newview/llpanellandaudio.cpp @@ -74,8 +74,7 @@ LLPanelLandAudio::LLPanelLandAudio(LLParcelSelectionHandle& parcel) mCheckSoundLocal(NULL), mSoundHelpButton(NULL), mRadioVoiceChat(NULL), - mMusicURLEdit(NULL), - mMusicUrlCheck(NULL) + mMusicURLEdit(NULL) { } @@ -100,9 +99,6 @@ BOOL LLPanelLandAudio::postBuild() mMusicURLEdit = getChild("music_url"); childSetCommitCallback("music_url", onCommitAny, this); - mMusicUrlCheck = getChild("hide_music_url"); - childSetCommitCallback("hide_music_url", onCommitAny, this); - return TRUE; } @@ -126,12 +122,6 @@ void LLPanelLandAudio::refresh() mMusicURLEdit->setText(parcel->getMusicURL()); mMusicURLEdit->setEnabled( can_change_media ); - mMusicUrlCheck->set( parcel->getObscureMusic() ); - mMusicUrlCheck->setEnabled( can_change_media ); - - bool obscure_music = ! can_change_media && parcel->getObscureMusic(); - mMusicURLEdit->setDrawAsterixes( obscure_music ); - mCheckSoundLocal->set( parcel->getSoundLocal() ); mCheckSoundLocal->setEnabled( can_change_media ); @@ -166,8 +156,6 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) BOOL sound_local = self->mCheckSoundLocal->get(); int voice_setting = self->mRadioVoiceChat->getSelectedIndex(); std::string music_url = self->mMusicURLEdit->getText(); - U8 obscure_music = self->mMusicUrlCheck->get(); - BOOL voice_enabled; BOOL voice_estate_chan; @@ -197,7 +185,6 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); parcel->setMusicURL(music_url); - parcel->setObscureMusic(obscure_music); // Send current parcel data upstream to server LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index ab2e6fc10..417d14897 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -74,8 +74,7 @@ LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel) mMediaSizeCtrlLabel(NULL), mMediaTextureCtrl(NULL), mMediaAutoScaleCheck(NULL), - mMediaLoopCheck(NULL), - mMediaUrlCheck(NULL) + mMediaLoopCheck(NULL) { } @@ -101,9 +100,6 @@ BOOL LLPanelLandMedia::postBuild() mMediaLoopCheck = getChild("media_loop"); childSetCommitCallback("media_loop", onCommitAny, this ); - mMediaUrlCheck = getChild("hide_media_url"); - childSetCommitCallback("hide_media_url", onCommitAny, this ); - mMediaURLEdit = getChild("media_url"); childSetCommitCallback("media_url", onCommitAny, this ); @@ -186,25 +182,6 @@ void LLPanelLandMedia::refresh() mMediaTypeCombo->setEnabled( can_change_media ); childSetText("mime_type", mime_type); - mMediaUrlCheck->set( parcel->getObscureMedia() ); - mMediaUrlCheck->setEnabled( can_change_media ); - - // don't display urls if you're not able to change it - // much requested change in forums so people can't 'steal' urls - // NOTE: bug#2009 means this is still vunerable - however, bug - // should be closed since this bug opens up major security issues elsewhere. - bool obscure_media = ! can_change_media && parcel->getObscureMedia(); - - // Special code to disable asterixes for html type - if(mime_type == "text/html") - { - obscure_media = false; - mMediaUrlCheck->set( 0 ); - mMediaUrlCheck->setEnabled( false ); - } - - mMediaURLEdit->setDrawAsterixes( obscure_media ); - mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () ); mMediaAutoScaleCheck->setEnabled ( can_change_media ); @@ -369,7 +346,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) std::string mime_type = self->childGetText("mime_type"); U8 media_auto_scale = self->mMediaAutoScaleCheck->get(); U8 media_loop = self->mMediaLoopCheck->get(); - U8 obscure_media = self->mMediaUrlCheck->get(); F32 media_reset_time = (F32)self->mMediaResetCtrl->get(); S32 media_width = (S32)self->mMediaWidthCtrl->get(); S32 media_height = (S32)self->mMediaHeightCtrl->get(); @@ -392,7 +368,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) parcel->setMediaID(media_id); parcel->setMediaAutoScale ( media_auto_scale ); parcel->setMediaLoop ( media_loop ); - parcel->setObscureMedia( obscure_media ); parcel->setMediaURLFilterEnable(navigate_filter); parcel->setMediaAllowNavigate(navigate_allow); parcel->setMediaURLTimeout(media_reset_time); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index d79054037..ece744e5e 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -1102,8 +1102,12 @@ void LLPanelLogin::onClickConnect(void *) } else { - LLNotifications::instance().add("MustHaveAccountToLogIn", LLSD(), LLSD(), - LLPanelLogin::newAccountAlertCallback); + if (gHippoGridManager->getConnectedGrid()->getRegisterUrl().empty()) { + LLNotifications::instance().add("MustHaveAccountToLogInNoLinks"); + } else { + LLNotifications::instance().add("MustHaveAccountToLogIn", LLSD(), LLSD(), + LLPanelLogin::newAccountAlertCallback); + } } } } @@ -1129,7 +1133,14 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& // static void LLPanelLogin::onClickNewAccount(void*) { - LLWeb::loadURLExternal( CREATE_ACCOUNT_URL ); + const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); + if (!url.empty()) { + llinfos << "Going to account creation URL." << llendl; + LLWeb::loadURLExternal(url); + } else { + llinfos << "Account creation URL is empty." << llendl; + sInstance->setFocus(TRUE); + } } // static @@ -1174,7 +1185,12 @@ void LLPanelLogin::onClickForgotPassword(void*) { if (sInstance ) { - LLWeb::loadURLExternal(sInstance->getString( "forgot_password_url" )); + const std::string &url = gHippoGridManager->getConnectedGrid()->getPasswordUrl(); + if (!url.empty()) { + LLWeb::loadURLExternal(url); + } else { + llwarns << "Link for 'forgotton password' not set." << llendl; + } } } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b3bd0d4df..e6dd40ea6 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1140,8 +1140,10 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & { // this means this object *has* to be an attachment LLXform* attachment_point_xform = first_object->getRootEdit()->mDrawable->mXform.getParent(); - mGridOrigin = attachment_point_xform->getWorldPosition(); - mGridRotation = attachment_point_xform->getWorldRotation(); + if(attachment_point_xform) { + mGridOrigin = attachment_point_xform->getWorldPosition(); + mGridRotation = attachment_point_xform->getWorldRotation(); + } mGridScale = LLVector3(1.f, 1.f, 1.f) * gSavedSettings.getF32("GridResolution"); } break; @@ -3612,7 +3614,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point) if (0 == attachment_point || get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL)) { - if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { // If we know the attachment point then we got here by clicking an // "Attach to..." context menu item, so we should add, not replace. diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 7c8d94e13..02f24ac50 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2883,6 +2883,16 @@ public: renderBoundingBox(drawable); } + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BUILD_QUEUE)) + { + if (drawable->isState(LLDrawable::IN_REBUILD_Q2)) + { + gGL.color4f(0.6f, 0.6f, 0.1f, 1.f); + const LLVector3* ext = drawable->getSpatialExtents(); + drawBoxOutline((ext[0]+ext[1])*0.5f, (ext[1]-ext[0])*0.5f); + } + } + if (drawable->getVOVolume() && gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY)) { renderTexturePriority(drawable); @@ -2902,6 +2912,10 @@ public: { renderRaycast(drawable); } + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_UPDATE_TYPE)) + { + renderUpdateType(drawable); + } LLVOAvatar* avatar = dynamic_cast(drawable->getVObj().get()); @@ -3060,13 +3074,15 @@ void LLSpatialPartition::renderDebug() LLPipeline::RENDER_DEBUG_OCCLUSION | LLPipeline::RENDER_DEBUG_LIGHTS | LLPipeline::RENDER_DEBUG_BATCH_SIZE | + LLPipeline::RENDER_DEBUG_UPDATE_TYPE | LLPipeline::RENDER_DEBUG_BBOXES | LLPipeline::RENDER_DEBUG_POINTS | LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY | LLPipeline::RENDER_DEBUG_TEXTURE_ANIM | LLPipeline::RENDER_DEBUG_RAYCAST | LLPipeline::RENDER_DEBUG_AVATAR_VOLUME | - LLPipeline::RENDER_DEBUG_AGENT_TARGET)) + LLPipeline::RENDER_DEBUG_AGENT_TARGET | + LLPipeline::RENDER_DEBUG_BUILD_QUEUE)) { return; } diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 74d7e3ec0..abf58a79b 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -408,7 +408,7 @@ public: BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed BOOL mInfiniteFarClip; // if TRUE, frustum culling ignores far clip plane U32 mBufferUsage; - BOOL mRenderByGroup; + const BOOL mRenderByGroup; U32 mLODSeed; U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed) U32 mVertexDataMask; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8b3d67b7a..43fc4a59e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -807,13 +807,6 @@ bool idle_startup() timeout_count = 0; - // OGPX : Load URL History File for saved user. Needs to happen *before* login panel is displayed. - // Note: it only loads them if it can figure out the saved username. - if (!firstname.empty() && !lastname.empty()) - { - gDirUtilp->setLindenUserDir(firstname, lastname); - LLURLHistory::loadFile("url_history.xml"); - } // *NOTE: This is where LLViewerParcelMgr::getInstance() used to get allocated before becoming LLViewerParcelMgr::getInstance(). @@ -972,7 +965,14 @@ bool idle_startup() // create necessary directories // *FIX: these mkdir's should error check - gDirUtilp->setLindenUserDir(firstname, lastname); + if (gHippoGridManager->getCurrentGrid()->isSecondLife()) + { + gDirUtilp->setLindenUserDir(LLStringUtil::null, firstname, lastname); + } + else + { + gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); + } LLFile::mkdir(gDirUtilp->getLindenUserDir()); // Set PerAccountSettingsFile to the default value. @@ -1043,22 +1043,13 @@ bool idle_startup() // END TODO LLPanelLogin::close(); } - //For HTML parsing in text boxes. LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") ); // Load URL History File LLURLHistory::loadFile("url_history.xml"); - // OGPX : Since loading the file wipes the new value that might have gotten added on - // the login panel, let's add it to URL history - // (appendToURLCollection() only adds unique values to list) - // OGPX kind of ugly. TODO: figure out something less hacky - if (!gSavedSettings.getString("CmdLineRegionURI").empty()) - { - LLURLHistory::appendToURLCollection("regionuri",gSavedSettings.getString("CmdLineRegionURI")); - } - + //------------------------------------------------- // Handle startup progress screen //------------------------------------------------- @@ -1506,7 +1497,7 @@ bool idle_startup() } else { - emsg << "Unable to connect to " << LLAppViewer::instance()->getSecondLifeTitle() << ".\n"; + emsg << "Unable to connect to " << gHippoGridManager->getCurrentGrid()->getGridName() << ".\n"; emsg << LLUserAuth::getInstance()->errorMessage(); } break; @@ -2855,6 +2846,8 @@ bool idle_startup() { set_startup_status(1.0, "", ""); + LLViewerParcelMedia::loadDomainFilterList(); + // Let the map know about the inventory. if(gFloaterWorldMap) { diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 8873821ef..1716b5c5d 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1609,7 +1609,7 @@ void LLTextureCache::purgeTextures(bool validate) if (validate) { validate_idx = gSavedSettings.getU32("CacheValidateCounter"); - U32 next_idx = (++validate_idx) % 256; + U32 next_idx = (validate_idx + 1) % 256; gSavedSettings.setU32("CacheValidateCounter", next_idx); LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL; } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index cf7c0ef32..c29bcbd4a 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -61,6 +61,7 @@ #include "llworld.h" #include "pipeline.h" #include "llviewerjoystick.h" +#include "llviewerparcelmedia.h" #include "llviewerparcelmgr.h" #include "llparcel.h" #include "llnotify.h" @@ -316,7 +317,7 @@ static bool handleAudioStreamMusicChanged(const LLSD& newvalue) // otherwise music will briefly stop if ( !gAudiop->isInternetStreamPlaying() ) { - gAudiop->startInternetStream(LLViewerParcelMgr::getInstance()->getAgentParcel()->getMusicURL()); + LLViewerParcelMedia::playStreamingMusic(LLViewerParcelMgr::getInstance()->getAgentParcel()); } } } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index fd21a18ba..87654d11e 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -117,7 +117,6 @@ void render_hud_attachments(); void render_ui_3d(); void render_ui_2d(); void render_disconnected_background(); -void render_hud_elements(); void display_startup() { @@ -679,9 +678,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); - BOOL to_texture = !for_snapshot && - gPipeline.canUseVertexShaders() && - LLPipeline::sRenderGlow; + BOOL to_texture = gPipeline.canUseVertexShaders() && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderGlow && !gSnapshot)); LLAppViewer::instance()->pingMainloopTimeout("Display:Swap"); diff --git a/indra/newview/llviewergenericmessage.cpp b/indra/newview/llviewergenericmessage.cpp index e06766bbb..b541104fd 100644 --- a/indra/newview/llviewergenericmessage.cpp +++ b/indra/newview/llviewergenericmessage.cpp @@ -34,13 +34,16 @@ #include "llviewerprecompiledheaders.h" #include "llviewergenericmessage.h" - +#include "meta7windlight.h" #include "lldispatcher.h" #include "lluuid.h" #include "message.h" - #include "llagent.h" - +#include "llwaterparamset.h" +#include "llwaterparammanager.h" +#include "llwlparamset.h" +#include "llwlparammanager.h" +#include "lluuid.h" LLDispatcher gGenericDispatcher; @@ -82,20 +85,121 @@ void process_generic_message(LLMessageSystem* msg, void**) { LLUUID agent_id; msg->getUUID("AgentData", "AgentID", agent_id); - if (agent_id != gAgent.getID()) + + std::string method; + msg->getStringFast(_PREHASH_MethodData, _PREHASH_Method, method); + + //This needs to be handled by a dispatcher really, but I'm not sure where is the best place to put it + if (method == "Windlight") + { + //Meta7 WindLight packet + //We are delivering with an agentID of NULL_KEY so as to be + //friendly and not trigger a warning for unsupporting clients. + S32 count = msg->getNumberOfBlocksFast(_PREHASH_ParamList); + for (S32 i = 0; i < count; ++i) + { + // our param is binary data) + S32 size = msg->getSizeFast(_PREHASH_ParamList, i, _PREHASH_Parameter); + if (size >= 0) + { + char buf[250]; + msg->getBinaryDataFast( + _PREHASH_ParamList, _PREHASH_Parameter, + buf, size, i, 249); + + Meta7WindlightPacket* wl = (Meta7WindlightPacket*)buf; + + LLWaterParamManager * param_mgr = LLWaterParamManager::instance(); + LLWaterParamSet & param_set = param_mgr->mCurParams; + + param_set.set("waterFogColor", wl->waterColor.red / 256.f, wl->waterColor.green / 256.f, wl->waterColor.blue / 256.f); + param_set.set("waterFogDensity", pow(2.0f, wl->waterFogDensityExponent)); + param_set.set("underWaterFogMod", wl->underwaterFogModifier); + param_set.set("normScale", wl->reflectionWaveletScale.X,wl->reflectionWaveletScale.Y,wl->reflectionWaveletScale.Z); + param_set.set("fresnelScale", wl->fresnelScale); + param_set.set("fresnelOffset", wl->fresnelOffset); + param_set.set("scaleAbove", wl->refractScaleAbove); + param_set.set("scaleBelow", wl->refractScaleBelow); + param_set.set("blurMultiplier", wl->blurMultiplier); + param_set.set("wave1Dir", wl->littleWaveDirection.X, wl->littleWaveDirection.Y); + param_set.set("wave2Dir", wl->bigWaveDirection.X, wl->bigWaveDirection.Y); + + LLUUID normalMapTexture; + + std::string out = llformat( + "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", + (U8)(wl->normalMapTexture[0]), + (U8)(wl->normalMapTexture[1]), + (U8)(wl->normalMapTexture[2]), + (U8)(wl->normalMapTexture[3]), + (U8)(wl->normalMapTexture[4]), + (U8)(wl->normalMapTexture[5]), + (U8)(wl->normalMapTexture[6]), + (U8)(wl->normalMapTexture[7]), + (U8)(wl->normalMapTexture[8]), + (U8)(wl->normalMapTexture[9]), + (U8)(wl->normalMapTexture[10]), + (U8)(wl->normalMapTexture[11]), + (U8)(wl->normalMapTexture[12]), + (U8)(wl->normalMapTexture[13]), + (U8)(wl->normalMapTexture[14]), + (U8)(wl->normalMapTexture[15])); + + normalMapTexture.set(out); + + param_mgr->setParamSet( "Meta7CurrentRegion", param_set); + param_mgr->setNormalMapID(normalMapTexture); + + LLWLParamManager * wl_param_mgr = LLWLParamManager::instance(); + LLWLParamSet & wl_param_set = wl_param_mgr->mCurParams; + wl_param_set.setSunAngle(F_TWO_PI * wl->sunMoonPosiiton); + wl_param_set.setEastAngle(F_TWO_PI * wl->eastAngle); + wl_param_set.set("sunlight_color", wl->sunMoonColor.red * 3.0f, wl->sunMoonColor.green * 3.0f, wl->sunMoonColor.blue * 3.0f, wl->sunMoonColor.alpha * 3.0f); + wl_param_set.set("ambient", wl->ambient.red * 3.0f, wl->ambient.green * 3.0f, wl->ambient.blue * 3.0f, wl->ambient.alpha * 3.0f); + wl_param_set.set("blue_horizon", wl->horizon.red * 2.0f, wl->horizon.green *2.0f, wl->horizon.blue * 2.0f, wl->horizon.alpha * 2.0f); + wl_param_set.set("blue_density", wl->blueDensity.red * 2.0f, wl->blueDensity.green * 2.0f, wl->blueDensity.blue * 2.0f, wl->blueDensity.alpha * 2.0f); + wl_param_set.set("haze_horizon", wl->hazeHorizon, wl->hazeHorizon, wl->hazeHorizon, 1.f); + wl_param_set.set("haze_density", wl->hazeDensity, wl->hazeDensity, wl->hazeDensity, 1.f); + wl_param_set.set("cloud_shadow", wl->cloudCoverage, wl->cloudCoverage, wl->cloudCoverage, wl->cloudCoverage); + wl_param_set.set("density_multiplier", wl->densityMultiplier / 1000.0f); + wl_param_set.set("distance_multiplier", wl->distanceMultiplier, wl->distanceMultiplier, wl->distanceMultiplier, wl->distanceMultiplier); + wl_param_set.set("max_y",(F32)wl->maxAltitude); + wl_param_set.set("cloud_color", wl->cloudColor.red, wl->cloudColor.green, wl->cloudColor.blue, wl->cloudColor.alpha); + wl_param_set.set("cloud_pos_density1", wl->cloudXYDensity.X, wl->cloudXYDensity.Y, wl->cloudXYDensity.Z); + wl_param_set.set("cloud_pos_density2", wl->cloudDetailXYDensity.X, wl->cloudDetailXYDensity.Y, wl->cloudDetailXYDensity.Z); + wl_param_set.set("cloud_scale", wl->cloudScale, 0.f, 0.f, 1.f); + wl_param_set.set("gamma", wl->sceneGamma, wl->sceneGamma, wl->sceneGamma, 0.0f); + wl_param_set.set("glow",(2 - wl->sunGlowSize) * 20 , 0.f, -wl->sunGlowFocus * 5); + wl_param_set.setCloudScrollX(wl->cloudScrollX + 10.0f); + wl_param_set.setCloudScrollY(wl->cloudScrollY + 10.0f); + wl_param_set.setEnableCloudScrollX(!wl->cloudScrollXLock); + wl_param_set.setEnableCloudScrollY(!wl->cloudScrollYLock); + wl_param_set.setStarBrightness(wl->starBrightness); + wl_param_mgr->removeParamSet("Meta7-CurrentRegion",true); + wl_param_mgr->addParamSet( "Meta7-CurrentRegion", wl_param_set); + wl_param_mgr->savePreset( "Meta7-CurrentRegion"); + LLWLParamManager::instance()->mAnimator.mIsRunning = false; + LLWLParamManager::instance()->mAnimator.mUseLindenTime = false; + wl_param_mgr->loadPreset( "Meta7-CurrentRegion",true); + } + } + } + else if (agent_id != gAgent.getID()) { llwarns << "GenericMessage for wrong agent" << llendl; return; } - - std::string request; - LLUUID invoice; - LLDispatcher::sparam_t strings; - LLDispatcher::unpackMessage(msg, request, invoice, strings); - - if(!gGenericDispatcher.dispatch(request, invoice, strings)) + else { - llwarns << "GenericMessage " << request << " failed to dispatch" - << llendl; + std::string request; + LLUUID invoice; + LLDispatcher::sparam_t strings; + LLDispatcher::unpackMessage(msg, request, invoice, strings); + + if(!gGenericDispatcher.dispatch(request, invoice, strings)) + { + llwarns << "GenericMessage " << request << " failed to dispatch" + << llendl; + } } } diff --git a/indra/newview/llviewergenericmessage.h b/indra/newview/llviewergenericmessage.h index 6e1f0945b..6f54a2814 100644 --- a/indra/newview/llviewergenericmessage.h +++ b/indra/newview/llviewergenericmessage.h @@ -30,7 +30,7 @@ * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ - +#include "lluuid.h" #ifndef LLVIEWERGENERICMESSAGE_H #define LLVIEWERGENERICMESSAGE_H diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 522a7c5fa..aa9c1e9ff 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -189,9 +189,9 @@ void LLViewerInventoryItem::updateServer(BOOL is_new) const if(!mIsComplete) { // *FIX: deal with this better. - // If we're crashing here then the UI is incorrectly enabled. llwarns << "LLViewerInventoryItem::updateServer() - for incomplete item" << llendl; + LLNotifications::instance().add("IncompleteInventoryItem"); return; } LLInventoryModel::LLCategoryUpdate up(mParentUUID, is_new ? 1 : 0); diff --git a/indra/newview/llviewerjointmesh_sse2.cpp b/indra/newview/llviewerjointmesh_sse2.cpp index 2648f6af3..ac9d18778 100644 --- a/indra/newview/llviewerjointmesh_sse2.cpp +++ b/indra/newview/llviewerjointmesh_sse2.cpp @@ -114,7 +114,7 @@ void LLViewerJointMesh::updateGeometrySSE2(LLFace *face, LLPolyMesh *mesh) ((LLV4Matrix3)blend_mat).multiply(normals[index], o_normals[index]); } - //setBuffer(0) called in LLVOAvatar::renderSkinned + buffer->setBuffer(0); } bool LLViewerJointMesh::supportsSSE2() { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1b743fe95..a314a39b9 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -252,6 +252,7 @@ #include "llfloaterdisplayname.h" #include "llavatarnamecache.h" #include "floaterao.h" +#include "slfloatermediafilter.h" #include "hippogridmanager.h" @@ -1477,7 +1478,13 @@ void init_debug_rendering_menu(LLMenuGL* menu) sub_menu->append(new LLMenuItemCheckGL("Sculpt", &LLPipeline::toggleRenderDebug, NULL, &LLPipeline::toggleRenderDebugControl, (void*)LLPipeline::RENDER_DEBUG_SCULPTED)); - + sub_menu->append(new LLMenuItemCheckGL("Build Queue", &LLPipeline::toggleRenderDebug, NULL, + &LLPipeline::toggleRenderDebugControl, + (void*)LLPipeline::RENDER_DEBUG_BUILD_QUEUE)); + sub_menu->append(new LLMenuItemCheckGL("Update Types", &LLPipeline::toggleRenderDebug, NULL, + &LLPipeline::toggleRenderDebugControl, + (void*)LLPipeline::RENDER_DEBUG_UPDATE_TYPE)); + sub_menu->append(new LLMenuItemCallGL("Vectorize Perf Test", &run_vectorize_perf_test)); sub_menu = new LLMenuGL("Render Tests"); @@ -6470,6 +6477,10 @@ class LLShowFloater : public view_listener_t { LLFloaterMute::toggleInstance(); } + else if (floater_name == "media filter") + { + SLFloaterMediaFilter::toggleInstance(); + } else if (floater_name == "camera controls") { LLFloaterCamera::toggleInstance(); @@ -6629,6 +6640,10 @@ class LLFloaterVisible : public view_listener_t { new_value = LLFloaterMute::instanceVisible(); } + else if (floater_name == "media filter") + { + new_value = SLFloaterMediaFilter::instanceVisible(); + } else if (floater_name == "camera controls") { new_value = LLFloaterCamera::instanceVisible(); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index bbad40e7a..3a7889267 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -37,6 +37,10 @@ // project includes #include "llagent.h" +#include "llimagejpeg.h" +#include "llimagepng.h" +#include "llimagebmp.h" + #include "llfilepicker.h" #include "llfloateranimpreview.h" #include "llfloaterbuycurrency.h" @@ -81,10 +85,6 @@ #include "lluuid.h" #include "llvorbisencode.h" -#include "llimagejpeg.h" -#include "llimagepng.h" -#include "llimagebmp.h" - // system libraries #include diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a37cffd26..e955962d6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -37,6 +37,7 @@ #include +#include "llimagejpeg.h" #include "llaudioengine.h" #include "llavatarnamecache.h" #include "indra_constants.h" @@ -159,6 +160,9 @@ #include "hippofloaterxml.h" #include "llversionviewer.h" +#include "llwlparammanager.h" +#include "llwaterparammanager.h" + #include #if LL_WINDOWS // For Windows specific error handler @@ -3050,6 +3054,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (is_audible) { + msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); + if ((source_temp == CHAT_SOURCE_OBJECT) && (type_temp == CHAT_TYPE_OWNER) && (mesg.substr(0, 3) == "># ")) { if (mesg.substr(mesg.size()-3, 3) == " #<") { @@ -3071,14 +3077,11 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) avatar->clearNameFromChat(); } } else { - LLViewerObject *obj = gObjectList.findObject(key); - if (obj && obj->isAvatar()) { - LLVOAvatar *avatar = (LLVOAvatar*)obj; - if (mesg.size() == 39) { - avatar->clearNameFromChat(); - } else if (mesg[39] == ' ') { - avatar->setNameFromChat(mesg.substr(40)); - } + LLVOAvatar *avatar = gObjectList.findAvatar(key); + if (mesg.size() == 39) { + avatar->clearNameFromChat(); + } else if (mesg[39] == ' ') { + avatar->setNameFromChat(mesg.substr(40)); } } return; @@ -3130,7 +3133,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) std::string verb; color.setVec(1.f,1.f,1.f,1.f); - msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); // [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f if ( (rlv_handler_t::isEnabled()) && (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) ) @@ -3662,6 +3664,12 @@ void process_teleport_finish(LLMessageSystem* msg, void**) gCacheName->setUpstream(sim); */ + //Reset the windlight profile to default + LLWLParamManager::instance()->mAnimator.mIsRunning = false; + LLWLParamManager::instance()->mAnimator.mUseLindenTime = false; + LLWLParamManager::instance()->loadPreset("Default", true); + LLWaterParamManager::instance()->loadPreset("Default",true); + // now, use the circuit info to tell simulator about us! LL_INFOS("Messaging") << "process_teleport_finish() Enabling " << sim_host << " with code " << msg->mOurCircuitCode << LL_ENDL; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 7236bd772..bb096a3f0 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1092,6 +1092,9 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) gColors.getColor( "NetMapGroupOwnBelowWater" ); F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius"); + + static const F32 MAX_ALTITUDE_ABOVE_SELF = 256.f; + F32 max_altitude = gAgent.getPositionGlobal()[VZ] + MAX_ALTITUDE_ABOVE_SELF; for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter) { @@ -1104,11 +1107,12 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { continue; } + const LLVector3& scale = objectp->getScale(); const LLVector3d pos = objectp->getPositionGlobal(); const F64 water_height = F64( objectp->getRegion()->getWaterHeight() ); // LLWorld::getInstance()->getWaterHeight(); - + F32 approx_radius = (scale.mV[VX] + scale.mV[VY]) * 0.5f * 0.5f * 1.3f; // 1.3 is a fudge // Limit the size of megaprims so they don't blot out everything on the minimap. @@ -1124,7 +1128,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { approx_radius = MIN_RADIUS_FOR_OWNED_OBJECTS; } - + if( pos.mdV[VZ] >= water_height ) { if ( objectp->permGroupOwner() ) @@ -1133,8 +1137,8 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) } else { - color = you_own_above_water_color; - } + color = you_own_above_water_color; + } } else { @@ -1142,14 +1146,17 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { color = group_own_below_water_color; } - else - { - color = you_own_below_water_color; + else + { + color = you_own_below_water_color; + } } } + else if ( pos[VZ] > max_altitude ) + { + continue; } - else - if( pos.mdV[VZ] < water_height ) + else if ( pos.mdV[VZ] < water_height ) { color = below_water_color; } diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 2b6ba910f..be304fc9f 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -46,17 +46,27 @@ #include "llviewerwindow.h" #include "llfirstuse.h" #include "llpluginclassmedia.h" +#include "llnotify.h" +#include "llsdserialize.h" +#include "llaudioengine.h" +#include "lloverlaybar.h" +#include "slfloatermediafilter.h" // Static Variables S32 LLViewerParcelMedia::sMediaParcelLocalID = 0; LLUUID LLViewerParcelMedia::sMediaRegionID; viewer_media_t LLViewerParcelMedia::sMediaImpl; - +bool LLViewerParcelMedia::sIsUserAction = false; +bool LLViewerParcelMedia::sMediaFilterListLoaded = false; +LLSD LLViewerParcelMedia::sMediaFilterList; +std::set LLViewerParcelMedia::sMediaQueries; +std::set LLViewerParcelMedia::sAllowedMedia; +std::set LLViewerParcelMedia::sDeniedMedia; // Local functions bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel); - +void callback_media_alert(const LLSD& notification, const LLSD& response, LLParcel* parcel, U32 type, std::string domain); // static void LLViewerParcelMedia::initClass() @@ -175,7 +185,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel) } // static -void LLViewerParcelMedia::play(LLParcel* parcel) +void LLViewerParcelMedia::play(LLParcel* parcel, bool filter) { lldebugs << "LLViewerParcelMedia::play" << llendl; @@ -185,7 +195,17 @@ void LLViewerParcelMedia::play(LLParcel* parcel) return; std::string media_url = parcel->getMediaURL(); - std::string media_current_url = parcel->getMediaCurrentURL(); + LLStringUtil::trim(media_url); + + if (!media_url.empty() && gSavedSettings.getBOOL("MediaEnableFilter") && (filter || !allowedMedia(media_url))) + { + // If filtering is needed or in case media_url just changed + // to something we did not yet approve. + LLViewerParcelMediaAutoPlay::playStarted(); + filterMedia(parcel, 0); + return; + } + std::string mime_type = parcel->getMediaType(); LLUUID placeholder_texture_id = parcel->getMediaID(); U8 media_auto_scale = parcel->getMediaAutoScale(); @@ -575,3 +595,421 @@ void LLViewerParcelMediaNavigationObserver::onNavigateComplete( const EventType& } */ + +void LLViewerParcelMedia::playStreamingMusic(LLParcel* parcel, bool filter) +{ + std::string music_url = parcel->getMusicURL(); + LLStringUtil::trim(music_url); + if (!music_url.empty() && gSavedSettings.getBOOL("MediaEnableFilter") && (filter || !allowedMedia(music_url))) + { + // If filtering is needed or in case music_url just changed + // to something we did not yet approve. + filterMedia(parcel, 1); + } + else if (gAudiop) + { + LLStringUtil::trim(music_url); + gAudiop->startInternetStream(music_url); + if (music_url.empty()) + { + LLOverlayBar::audioFilterStop(); + } + else + { + LLOverlayBar::audioFilterPlay(); + } + } +} + +void LLViewerParcelMedia::stopStreamingMusic() +{ + if (gAudiop) + { + gAudiop->stopInternetStream(); + LLOverlayBar::audioFilterStop(); + } +} + +bool LLViewerParcelMedia::allowedMedia(std::string media_url) +{ + LLStringUtil::trim(media_url); + std::string domain = extractDomain(media_url); + LLHost host; + host.setHostByName(domain); + std::string ip = host.getIPString(); + if (sAllowedMedia.count(domain) || sAllowedMedia.count(ip)) + { + return true; + } + std::string server; + for (S32 i = 0; i < (S32)sMediaFilterList.size(); i++) + { + server = sMediaFilterList[i]["domain"].asString(); + if (server == domain || server == ip) + { + if (sMediaFilterList[i]["action"].asString() == "allow") + { + return true; + } + else + { + return false; + } + } + } + return false; +} + +void LLViewerParcelMedia::filterMedia(LLParcel* parcel, U32 type) +{ + std::string media_action; + std::string media_url; + std::string domain; + std::string ip; + + if (parcel != LLViewerParcelMgr::getInstance()->getAgentParcel()) + { + // The parcel just changed (may occur right out after a TP) + sIsUserAction = false; + return; + } + + if (type == 0) + { + media_url = parcel->getMediaURL(); + } + else + { + media_url = parcel->getMusicURL(); + } + LLStringUtil::trim(media_url); + + domain = extractDomain(media_url); + + if (sMediaQueries.count(domain) > 0) + { + sIsUserAction = false; + return; + } + + LLHost host; + host.setHostByName(domain); + ip = host.getIPString(); + + if (sIsUserAction) + { + // This was a user manual request to play this media, so give + // it another chance... + sIsUserAction = false; + bool dirty = false; + if (sDeniedMedia.count(domain)) + { + sDeniedMedia.erase(domain); + dirty = true; + } + if (sDeniedMedia.count(ip)) + { + sDeniedMedia.erase(ip); + dirty = true; + } + if (dirty) + { + SLFloaterMediaFilter::setDirty(); + } + } + + if (media_url.empty()) + { + media_action == "allow"; + } + else if (!sMediaFilterListLoaded || sDeniedMedia.count(domain) || sDeniedMedia.count(ip)) + { + media_action = "ignore"; + } + else if (sAllowedMedia.count(domain) || sAllowedMedia.count(ip)) + { + media_action = "allow"; + } + else + { + std::string server; + for (S32 i = 0; i < (S32)sMediaFilterList.size(); i++) + { + server = sMediaFilterList[i]["domain"].asString(); + if (server == domain || server == ip) + { + media_action = sMediaFilterList[i]["action"].asString(); + break; + } + } + } + + if (media_action == "allow") + { + if (type == 0) + { + play(parcel, false); + } + else + { + playStreamingMusic(parcel, false); + } + return; + } + if (media_action == "ignore") + { + if (type == 1) + { + LLViewerParcelMedia::stopStreamingMusic(); + } + return; + } + + LLSD args; + if (ip != domain && domain.find('/') == std::string::npos) + { + args["DOMAIN"] = domain + " (" + ip + ")"; + } + else + { + args["DOMAIN"] = domain; + } + + if (media_action == "deny") + { + LLNotifications::instance().add("MediaBlocked", args); + if (type == 1) + { + LLViewerParcelMedia::stopStreamingMusic(); + } + // So to avoid other "blocked" messages later in the session + // for this url should it be requested again by a script. + // We don't add the IP, on purpose (want to show different + // blocks for different domains pointing to the same IP). + sDeniedMedia.insert(domain); + } + else + { + sMediaQueries.insert(domain); + args["URL"] = media_url; + if (type == 0) + { + args["TYPE"] = "media"; + } + else + { + args["TYPE"] = "audio"; + } + LLNotifications::instance().add("MediaAlert", args, LLSD(), boost::bind(callback_media_alert, _1, _2, parcel, type, domain)); + } +} + +void callback_media_alert(const LLSD ¬ification, const LLSD &response, LLParcel* parcel, U32 type, std::string domain) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + + LLHost host; + host.setHostByName(domain); + std::string ip = host.getIPString(); + + LLSD args; + if (ip != domain && domain.find('/') == std::string::npos) + { + args["DOMAIN"] = domain + " (" + ip + ")"; + } + else + { + args["DOMAIN"] = domain; + } + + if (option == 0 || option == 3) // Allow or Whitelist + { + LLViewerParcelMedia::sAllowedMedia.insert(domain); + if (option == 3) // Whitelist + { + LLSD newmedia; + newmedia["domain"] = domain; + newmedia["action"] = "allow"; + LLViewerParcelMedia::sMediaFilterList.append(newmedia); + if (ip != domain && domain.find('/') == std::string::npos) + { + newmedia["domain"] = ip; + LLViewerParcelMedia::sMediaFilterList.append(newmedia); + } + LLViewerParcelMedia::saveDomainFilterList(); + args["LISTED"] = "whitelisted"; + LLNotifications::instance().add("MediaListed", args); + } + if (type == 0) + { + LLViewerParcelMedia::play(parcel, false); + } + else + { + LLViewerParcelMedia::playStreamingMusic(parcel, false); + } + } + else if (option == 1 || option == 2) // Deny or Blacklist + { + LLViewerParcelMedia::sDeniedMedia.insert(domain); + if (ip != domain && domain.find('/') == std::string::npos) + { + LLViewerParcelMedia::sDeniedMedia.insert(ip); + } + if (type == 1) + { + LLViewerParcelMedia::stopStreamingMusic(); + } + if (option == 1) // Deny + { + LLNotifications::instance().add("MediaBlocked", args); + } + else // Blacklist + { + LLSD newmedia; + newmedia["domain"] = domain; + newmedia["action"] = "deny"; + LLViewerParcelMedia::sMediaFilterList.append(newmedia); + if (ip != domain && domain.find('/') == std::string::npos) + { + newmedia["domain"] = ip; + LLViewerParcelMedia::sMediaFilterList.append(newmedia); + } + LLViewerParcelMedia::saveDomainFilterList(); + args["LISTED"] = "blacklisted"; + LLNotifications::instance().add("MediaListed", args); + } + } + + LLViewerParcelMedia::sMediaQueries.erase(domain); + SLFloaterMediaFilter::setDirty(); +} + +void LLViewerParcelMedia::saveDomainFilterList() +{ + std::string medialist_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "media_filter.xml"); + + llofstream medialistFile(medialist_filename); + LLSDSerialize::toPrettyXML(sMediaFilterList, medialistFile); + medialistFile.close(); +} + +bool LLViewerParcelMedia::loadDomainFilterList() +{ + sMediaFilterListLoaded = true; + + std::string medialist_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "media_filter.xml"); + + if (!LLFile::isfile(medialist_filename)) + { + LLSD emptyllsd; + llofstream medialistFile(medialist_filename); + LLSDSerialize::toPrettyXML(emptyllsd, medialistFile); + medialistFile.close(); + } + + if (LLFile::isfile(medialist_filename)) + { + llifstream medialistFile(medialist_filename); + LLSDSerialize::fromXML(sMediaFilterList, medialistFile); + medialistFile.close(); + SLFloaterMediaFilter::setDirty(); + return true; + } + else + { + return false; + } +} + +void LLViewerParcelMedia::clearDomainFilterList() +{ + sMediaFilterList.clear(); + sAllowedMedia.clear(); + sDeniedMedia.clear(); + saveDomainFilterList(); + LLNotifications::instance().add("MediaFiltersCleared"); + SLFloaterMediaFilter::setDirty(); +} + +std::string LLViewerParcelMedia::extractDomain(std::string url) +{ + static std::string last_region = "@"; + + if (url.empty()) + { + return url; + } + + LLStringUtil::toLower(url); + + size_t pos = url.find("//"); + + if (pos != std::string::npos) + { + size_t count = url.size() - pos + 2; + url = url.substr(pos + 2, count); + } + + // Check that there is at least one slash in the URL and add a trailing + // one if not (for media/audio URLs such as http://mydomain.net) + if (url.find('/') == std::string::npos) + { + url += '/'; + } + + // If there's a user:password@ part, remove it + pos = url.find('@'); + if (pos != std::string::npos && pos < url.find('/')) // if '@' is not before the first '/', then it's not a user:password + { + size_t count = url.size() - pos + 1; + url = url.substr(pos + 1, count); + } + + if (url.find(gAgent.getRegion()->getHost().getHostName()) == 0 || url.find(last_region) == 0) + { + // This must be a scripted object rezzed in the region: + // extend the concept of "domain" to encompass the + // scripted object server id and avoid blocking all other + // objects at once in this region... + + // Get rid of any port number + pos = url.find('/'); // We earlier made sure that there's one + url = gAgent.getRegion()->getHost().getHostName() + url.substr(pos); + + pos = url.find('?'); + if (pos != std::string::npos) + { + // Get rid of any parameter + url = url.substr(0, pos); + } + + pos = url.rfind('/'); + if (pos != std::string::npos) + { + // Get rid of the filename, if any, keeping only the server + path + url = url.substr(0, pos); + } + } + else + { + pos = url.find(':'); + if (pos != std::string::npos && pos < url.find('/')) + { + // Keep anything before the port number and strip the rest off + url = url.substr(0, pos); + } + else + { + pos = url.find('/'); // We earlier made sure that there's one + url = url.substr(0, pos); + } + } + + + // Remember this region, so to cope with requests occuring just after a + // TP out of it. + last_region = gAgent.getRegion()->getHost().getHostName(); + + return url; +} diff --git a/indra/newview/llviewerparcelmedia.h b/indra/newview/llviewerparcelmedia.h index 0f1e85c78..7531a0f59 100644 --- a/indra/newview/llviewerparcelmedia.h +++ b/indra/newview/llviewerparcelmedia.h @@ -35,6 +35,9 @@ #include "llviewermedia.h" +// For use by other patches so they know that media filtering is implemented. +#define MEDIA_FILTERING 1 + class LLMessageSystem; class LLParcel; class LLViewerParcelMediaNavigationObserver; @@ -54,8 +57,20 @@ class LLViewerParcelMedia : public LLViewerMediaObserver // called when the agent's parcel has a new URL, or the agent has // walked on to a new parcel with media - static void play(LLParcel* parcel); + static void play(LLParcel* parcel, bool filter = true); // user clicked play button in media transport controls + static void playStreamingMusic(LLParcel* parcel, bool filter = true); + // play the parcel music stream + static void stopStreamingMusic(); + // stop the parcel music stream + + static void filterMedia(LLParcel* parcel, U32 type); // type: 0 = media, 1 = streaming music + static bool allowedMedia(std::string media_url); + + static bool loadDomainFilterList(); + static void saveDomainFilterList(); + static void clearDomainFilterList(); + static std::string extractDomain(std::string url); static void stop(); // user clicked stop button in media transport controls @@ -85,6 +100,13 @@ class LLViewerParcelMedia : public LLViewerMediaObserver static LLUUID sMediaRegionID; // HACK: this will change with Media on a Prim static viewer_media_t sMediaImpl; + + static bool sIsUserAction; + static bool sMediaFilterListLoaded; + static LLSD sMediaFilterList; + static std::set sMediaQueries; + static std::set sAllowedMedia; + static std::set sDeniedMedia; }; diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 8c805e799..88f7e36bf 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -85,7 +85,7 @@ LLPointer sBlockedImage; LLPointer sPassImage; // Local functions -void optionally_start_music(const std::string& music_url); +void optionally_start_music(LLParcel* parcel); void callback_start_music(S32 option, void* data); void optionally_prepare_video(const LLParcel *parcelp); void callback_prepare_video(S32 option, void* data); @@ -1691,7 +1691,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use { if (music_url.substr(0,7) == "http://") { - optionally_start_music(music_url); + optionally_start_music(parcel); } else { @@ -1719,18 +1719,18 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use }; } -void optionally_start_music(const std::string& music_url) +void optionally_start_music(LLParcel* parcel) { if (gSavedSettings.getBOOL("AudioStreamingMusic")) { // Make the user click the start button on the overlay bar. JC - // llinfos << "Starting parcel music " << music_url << llendl; + // llinfos << "Starting parcel music " << parcel->getMusicURL() << llendl; // now only play music when you enter a new parcel if the control is in PLAY state // changed as part of SL-4878 - if ( gOverlayBar && gOverlayBar->musicPlaying()) + if (gOverlayBar && gOverlayBar->musicPlaying()) { - gAudiop->startInternetStream(music_url); + LLViewerParcelMedia::playStreamingMusic(parcel); } } } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index fdbfdd11f..4b5f53f89 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3886,7 +3886,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) (title && mTitle != title->getString()) || (is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute) || is_appearance != mNameAppearance || client != mClientName || - mNameFromAttachment != nameplate) + mNameFromAttachment != nameplate || + mNameFromChatChanged) { mRenderedName = usedname; mNameFromAttachment = nameplate; @@ -3938,6 +3939,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) line = "%f\n%l"; } } + mNameFromChatChanged = false; // replace first name, last name and title while ((index = line.find("%f")) != std::string::npos) diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 8fa0831f8..eca5594a5 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -75,10 +75,6 @@ // for MD5 hash #include "llmd5.h" -// -#include "llworld.h" -// - #define USE_SESSION_GROUPS 0 static bool sConnectingToAgni = false; @@ -1120,7 +1116,6 @@ LLVoiceClient::LLVoiceClient() mCommandCookie = 0; mCurrentParcelLocalID = 0; mLoginRetryCount = 0; - mPosLocked = false; mSpeakerVolume = 0; mMicVolume = 0; @@ -1153,7 +1148,6 @@ LLVoiceClient::LLVoiceClient() mTuningMicVolumeDirty = true; mTuningSpeakerVolume = 0; mTuningSpeakerVolumeDirty = true; - // gMuteListp isn't set up at this point, so we defer this until later. // gMuteListp->addObserver(&mutelist_listener); @@ -2572,7 +2566,7 @@ void LLVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAu if(!session->mHash.empty()) { stream - << "" << LLURI::escape(session->mHash, allowed_chars) << "" + << "" << LLURI::escape(session->mHash, allowed_chars) << "" << "SHA1UserName"; } @@ -3620,7 +3614,7 @@ void LLVoiceClient::sendFriendsListUpdates() << "" << "" << mAccountHandle << "" << "" << buddy->mURI << "" - << "" << buddy->mDisplayName << "" + << "" << buddy->mDisplayName << "" << "" // Without this, SLVoice doesn't seem to parse the command. << "0" << "\n\n\n"; @@ -4846,20 +4840,6 @@ LLVoiceClient::participantState::participantState(const std::string &uri) : { } -// -//static -void LLVoiceClient::sessionState::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* user_data) -{ - LLChat chat; - std::string name(first + " " + last); - chat.mFromName = name; - chat.mURL = llformat("secondlife:///app/agent/%s/about",id.asString().c_str()); - chat.mText = name+" is possibly eavesdropping in voice."; - chat.mSourceType = CHAT_SOURCE_SYSTEM; - LLFloaterChat::addChat(chat); -} -// - LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(const std::string &uri) { participantState *result = NULL; @@ -4904,30 +4884,6 @@ LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(con if(result->updateMuteState()) mVolumeDirty = true; - // - if(nameFromsipURI(uri) != gVoiceClient->mAccountName) - { - bool found = true; - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) - { - LLViewerRegion* regionp = *iter; - // let us check to see if they are actually in the sim - if(regionp) - { - if(regionp->mMapAvatarIDs.find(id) != -1) - { - found = true; - break; - } - } - } - if(!found) - // They are not in my list of people in my sims, they must be a spy. - gCacheName->getName(id, onAvatarNameLookup, NULL); - } - // - } else { @@ -5202,19 +5158,16 @@ void LLVoiceClient::switchChannel( void LLVoiceClient::joinSession(sessionState *session) { - if(!mPosLocked) + mNextAudioSession = session; + + if(getState() <= stateNoChannel) { - mNextAudioSession = session; - - if(getState() <= stateNoChannel) - { - // We're already set up to join a channel, just needed to fill in the session handle - } - else - { - // State machine will come around and rejoin if uri/handle is not empty. - sessionTerminate(); - } + // We're already set up to join a channel, just needed to fill in the session handle + } + else + { + // State machine will come around and rejoin if uri/handle is not empty. + sessionTerminate(); } } @@ -5229,23 +5182,20 @@ void LLVoiceClient::setSpatialChannel( const std::string &uri, const std::string &credentials) { - if(!mPosLocked) - { - mSpatialSessionURI = uri; - mSpatialSessionCredentials = credentials; - mAreaVoiceDisabled = mSpatialSessionURI.empty(); + mSpatialSessionURI = uri; + mSpatialSessionCredentials = credentials; + mAreaVoiceDisabled = mSpatialSessionURI.empty(); - LL_DEBUGS("Voice") << "got spatial channel uri: \"" << uri << "\"" << LL_ENDL; - - if((mAudioSession && !(mAudioSession->mIsSpatial)) || (mNextAudioSession && !(mNextAudioSession->mIsSpatial))) - { - // User is in a non-spatial chat or joining a non-spatial chat. Don't switch channels. - LL_INFOS("Voice") << "in non-spatial chat, not switching channels" << LL_ENDL; - } - else - { - switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); - } + LL_DEBUGS("Voice") << "got spatial channel uri: \"" << uri << "\"" << LL_ENDL; + + if((mAudioSession && !(mAudioSession->mIsSpatial)) || (mNextAudioSession && !(mNextAudioSession->mIsSpatial))) + { + // User is in a non-spatial chat or joining a non-spatial chat. Don't switch channels. + LL_INFOS("Voice") << "in non-spatial chat, not switching channels" << LL_ENDL; + } + else + { + switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); } } @@ -5477,23 +5427,20 @@ void LLVoiceClient::declineInvite(std::string &sessionHandle) void LLVoiceClient::leaveNonSpatialChannel() { - if(!mPosLocked) - { - LL_DEBUGS("Voice") - << "called in state " << state2string(getState()) - << LL_ENDL; - - // Make sure we don't rejoin the current session. - sessionState *oldNextSession = mNextAudioSession; - mNextAudioSession = NULL; - - // Most likely this will still be the current session at this point, but check it anyway. - reapSession(oldNextSession); - - verifySessionState(); - - sessionTerminate(); - } + LL_DEBUGS("Voice") + << "called in state " << state2string(getState()) + << LL_ENDL; + + // Make sure we don't rejoin the current session. + sessionState *oldNextSession = mNextAudioSession; + mNextAudioSession = NULL; + + // Most likely this will still be the current session at this point, but check it anyway. + reapSession(oldNextSession); + + verifySessionState(); + + sessionTerminate(); } std::string LLVoiceClient::getCurrentChannel() @@ -5722,7 +5669,7 @@ void LLVoiceClient::enforceTether(void) void LLVoiceClient::updatePosition(void) { - if(gVoiceClient && !gVoiceClient->getPosLocked()) + if(gVoiceClient) { LLVOAvatar *agent = gAgent.getAvatarObject(); LLViewerRegion *region = gAgent.getRegion(); @@ -5761,45 +5708,39 @@ void LLVoiceClient::updatePosition(void) void LLVoiceClient::setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) { - if(!mPosLocked) + mCameraRequestedPosition = position; + + if(mCameraVelocity != velocity) { - mCameraRequestedPosition = position; - - if(mCameraVelocity != velocity) - { - mCameraVelocity = velocity; - mSpatialCoordsDirty = true; - } - - if(mCameraRot != rot) - { - mCameraRot = rot; - mSpatialCoordsDirty = true; - } + mCameraVelocity = velocity; + mSpatialCoordsDirty = true; + } + + if(mCameraRot != rot) + { + mCameraRot = rot; + mSpatialCoordsDirty = true; } } void LLVoiceClient::setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) { - if(!mPosLocked) + if(dist_vec(mAvatarPosition, position) > 0.1) { - if(dist_vec(mAvatarPosition, position) > 0.1) - { - mAvatarPosition = position; - mSpatialCoordsDirty = true; - } - - if(mAvatarVelocity != velocity) - { - mAvatarVelocity = velocity; - mSpatialCoordsDirty = true; - } - - if(mAvatarRot != rot) - { - mAvatarRot = rot; - mSpatialCoordsDirty = true; - } + mAvatarPosition = position; + mSpatialCoordsDirty = true; + } + + if(mAvatarVelocity != velocity) + { + mAvatarVelocity = velocity; + mSpatialCoordsDirty = true; + } + + if(mAvatarRot != rot) + { + mAvatarRot = rot; + mSpatialCoordsDirty = true; } } @@ -5820,7 +5761,7 @@ bool LLVoiceClient::channelFromRegion(LLViewerRegion *region, std::string &name) void LLVoiceClient::leaveChannel(void) { - if(!mPosLocked && getState() == stateRunning) + if(getState() == stateRunning) { LL_DEBUGS("Voice") << "leaving channel for teleport/logout" << LL_ENDL; mChannelName.clear(); @@ -5859,7 +5800,7 @@ void LLVoiceClient::setVoiceEnabled(bool enabled) } else { - // Turning voice off loses your current channel -- this makes sure the UI isn't out of sync when you re-enable it. + // Turning voice off looses your current channel -- this makes sure the UI isn't out of sync when you re-enable it. LLVoiceChannel::getCurrentVoiceChannel()->deactivate(); } } @@ -5867,9 +5808,7 @@ void LLVoiceClient::setVoiceEnabled(bool enabled) bool LLVoiceClient::voiceEnabled() { - static const LLCachedControl enable_voice_chat("EnableVoiceChat",false); - static const LLCachedControl cmd_line_disable_voice("CmdLineDisableVoice",false); - return enable_voice_chat && !cmd_line_disable_voice; + return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); } void LLVoiceClient::setLipSyncEnabled(BOOL enabled) @@ -5890,16 +5829,6 @@ BOOL LLVoiceClient::lipSyncEnabled() } } -BOOL LLVoiceClient::getPosLocked() -{ - return mPosLocked; -} - -void LLVoiceClient::setPosLocked(bool locked) -{ - mPosLocked = locked; -} - void LLVoiceClient::setUsePTT(bool usePTT) { if(usePTT && !mUsePTT) diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 4f352c23c..cfc336b27 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -175,10 +175,6 @@ static void updatePosition(void); void setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); bool channelFromRegion(LLViewerRegion *region, std::string &name); void leaveChannel(void); // call this on logout or teleport begin - - // This should be called when the code detects we have changed parcels. - // It initiates the call to the server that gets the parcel channel. - void parcelChanged(); void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. @@ -196,8 +192,6 @@ static void updatePosition(void); void setUserVolume(const LLUUID& id, F32 volume); // set's volume for specified agent, from 0-1 (where .5 is nominal) void setLipSyncEnabled(BOOL enabled); BOOL lipSyncEnabled(); - void setPosLocked(bool locked); - BOOL getPosLocked(); //whether our position is locked to keep us nearby // PTT key triggering void keyDown(KEY key, MASK mask); @@ -299,10 +293,6 @@ static void updatePosition(void); sessionState(); ~sessionState(); - // - static void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* user_data); - // - participantState *addParticipant(const std::string &uri); // Note: after removeParticipant returns, the participant* that was passed to it will have been deleted. // Take care not to use the pointer again after that. @@ -656,6 +646,10 @@ static void updatePosition(void); bool mCaptureDeviceDirty; bool mRenderDeviceDirty; + // This should be called when the code detects we have changed parcels. + // It initiates the call to the server that gets the parcel channel. + void parcelChanged(); + void switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = ""); void joinSession(sessionState *session); @@ -738,8 +732,6 @@ static std::string nameFromsipURI(const std::string &uri); LLTimer mUpdateTimer; BOOL mLipSyncEnabled; - - bool mPosLocked; typedef std::set observer_set_t; observer_set_t mParticipantObservers; diff --git a/indra/newview/llvoiceremotectrl.cpp b/indra/newview/llvoiceremotectrl.cpp index 0f4b576ad..73d8c1087 100644 --- a/indra/newview/llvoiceremotectrl.cpp +++ b/indra/newview/llvoiceremotectrl.cpp @@ -76,10 +76,6 @@ BOOL LLVoiceRemoteCtrl::postBuild() mTalkLockBtn = getChild("ptt_lock"); mTalkLockBtn->setClickedCallback(onBtnLock); mTalkLockBtn->setCallbackUserData(this); - - mPosLockBtn = getChild("pos_lock_btn"); - mPosLockBtn->setClickedCallback(onClickPosLock); - mPosLockBtn->setCallbackUserData(this); mSpeakersBtn = getChild("speakers_btn"); mSpeakersBtn->setClickedCallback(onClickSpeakers); @@ -88,7 +84,14 @@ BOOL LLVoiceRemoteCtrl::postBuild() childSetAction("show_channel", onClickPopupBtn, this); childSetAction("end_call_btn", onClickEndCall, this); - + LLTextBox* text = getChild("channel_label"); + if (text) + { + text->setUseEllipses(TRUE); + } + + childSetAction("voice_channel_bg", onClickVoiceChannel, this); + return TRUE; } @@ -103,7 +106,6 @@ void LLVoiceRemoteCtrl::draw() } mTalkBtn->setEnabled(voice_active); - mPosLockBtn->setEnabled(voice_active); mTalkLockBtn->setEnabled(voice_active); // propagate ptt state to button display, @@ -113,9 +115,7 @@ void LLVoiceRemoteCtrl::draw() mTalkBtn->setToggleState(!gSavedSettings.getBOOL("PTTCurrentlyEnabled") || gVoiceClient->getUserPTTState()); } mSpeakersBtn->setToggleState(LLFloaterActiveSpeakers::instanceVisible(LLSD())); - mPosLockBtn->setToggleState(gVoiceClient->getPosLocked()); mTalkLockBtn->setToggleState(!gSavedSettings.getBOOL("PTTCurrentlyEnabled")); - std::string talk_blip_image; if (gVoiceClient->getIsSpeaking(gAgent.getID())) @@ -169,7 +169,36 @@ void LLVoiceRemoteCtrl::draw() && current_channel->isActive() && current_channel != LLVoiceChannelProximal::getInstance()); + childSetValue("channel_label", active_channel_name); + childSetToolTip("voice_channel_bg", active_channel_name); + if (current_channel) + { + LLIconCtrl* voice_channel_icon = getChild("voice_channel_icon"); + if (voice_channel_icon && voice_floater) + { + voice_channel_icon->setImage(voice_floater->getString("voice_icon")); + } + + LLButton* voice_channel_bg = getChild("voice_channel_bg"); + if (voice_channel_bg) + { + LLColor4 bg_color; + if (current_channel->isActive()) + { + bg_color = lerp(LLColor4::green, LLColor4::white, 0.7f); + } + else if (current_channel->getState() == LLVoiceChannel::STATE_ERROR) + { + bg_color = lerp(LLColor4::red, LLColor4::white, 0.7f); + } + else // active, but not connected + { + bg_color = lerp(LLColor4::yellow, LLColor4::white, 0.7f); + } + voice_channel_bg->setImageColor(bg_color); + } + } LLButton* expand_button = getChild("show_channel"); if (expand_button) @@ -249,17 +278,6 @@ void LLVoiceRemoteCtrl::onClickEndCall(void* user_data) } } -//static -void LLVoiceRemoteCtrl::onClickPosLock(void* user_data) -{ - gVoiceClient->setPosLocked(!gVoiceClient->getPosLocked()); - llwarns << gVoiceClient->getPosLocked() << llendl; - - if(!gVoiceClient->getPosLocked()) - { - gVoiceClient->parcelChanged(); //force it to get a new SIP url based on our actual location - } -} void LLVoiceRemoteCtrl::onClickSpeakers(void *user_data) { diff --git a/indra/newview/llvoiceremotectrl.h b/indra/newview/llvoiceremotectrl.h index 94c1603b9..1f61459ff 100644 --- a/indra/newview/llvoiceremotectrl.h +++ b/indra/newview/llvoiceremotectrl.h @@ -54,13 +54,11 @@ public: static void onClickPopupBtn(void* user_data); static void onClickVoiceChannel(void* user_data); static void onClickEndCall(void* user_data); - static void onClickPosLock(void* user_data); protected: LLButton* mTalkBtn; LLButton* mTalkLockBtn; LLButton* mSpeakersBtn; - LLButton* mPosLockBtn; }; #endif // LL_LLVOICEREMOTECTRL_H diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 94131a13d..e879470ec 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -337,11 +337,6 @@ void LLVOVolume::animateTextures() te->getScale(&scale_s, &scale_t); } - LLVector3 scale(scale_s, scale_t, 1.f); - LLVector3 trans(off_s+0.5f, off_t+0.5f, 0.f); - LLQuaternion quat; - quat.setQuat(rot, 0, 0, -1.f); - if (!facep->mTextureMatrix) { facep->mTextureMatrix = new LLMatrix4(); @@ -349,7 +344,16 @@ void LLVOVolume::animateTextures() LLMatrix4& tex_mat = *facep->mTextureMatrix; tex_mat.setIdentity(); - tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f)); + LLVector3 trans ; + { + trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f)); + tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f)); + } + + LLVector3 scale(scale_s, scale_t, 1.f); + LLQuaternion quat; + quat.setQuat(rot, 0, 0, -1.f); + tex_mat.rotate(quat); LLMatrix4 mat; @@ -892,9 +896,7 @@ BOOL LLVOVolume::calcLOD() if (distance < rampDist) { // Boost LOD when you're REALLY close - distance *= 1.0f/rampDist; - distance *= distance; - distance *= rampDist; + distance *= distance/rampDist; } // DON'T Compensate for field of view changing on FOV zoom. @@ -2228,7 +2230,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U8 glow = 0; - if (type == LLRenderPass::PASS_GLOW) + if (type == LLRenderPass::PASS_GLOW || type==LLRenderPass::PASS_ALPHA) //Alpha pass now handles glow internally { glow = (U8) (facep->getTextureEntry()->getGlow() * 255); } @@ -2766,7 +2768,9 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: // can we safely treat this as an alpha mask? if (facep->canRenderAsMask()) { - if (te->getFullbright()) + const LLDrawable* drawablep = facep->getDrawable(); + const LLVOVolume* vobj = drawablep ? drawablep->getVOVolume() : NULL; + if (te->getFullbright() || (vobj && vobj->isHUDAttachment())) { registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK); } @@ -2862,7 +2866,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: } } - if (LLPipeline::sRenderGlow && te->getGlow() > 0.f) + if (!is_alpha && LLPipeline::sRenderGlow && te->getGlow() > 0.f) { registerFace(group, facep, LLRenderPass::PASS_GLOW); } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 5c457810e..3cfed9aa2 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -622,6 +622,7 @@ BOOL LLWearable::isDirty() const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatar::getDefaultTEImageID((ETextureIndex) te ) ); if( avatar_image->getID() != image_id ) { + llwarns << "image ID " << avatar_image->getID() << " was changed." << llendl; return TRUE; } } diff --git a/indra/newview/meta7windlight.h b/indra/newview/meta7windlight.h new file mode 100644 index 000000000..04ce86d46 --- /dev/null +++ b/indra/newview/meta7windlight.h @@ -0,0 +1,131 @@ +/** + * @file lightshare.cpp + * @brief Handler for Meta7 Lightshare (region-side Windlight settings). + * + * Copyright (c) 2010, Tom Meta / Meta7 Project + * + * The source code in this file ("Source Code") is provided to you + * under the terms of the GNU General Public License, version 2.0 + * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in + * this distribution, or online at + * http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + */ + + +#ifndef META7WINDLIGHT_H +#define META7WINDLIGHT_H + +#include "linden_common.h" + +struct M7Color3{ + M7Color3(){}; + M7Color3(F32 pRed, F32 pGreen, F32 pBlue) + { + red=pRed; + green=pGreen; + blue=pBlue; + } + F32 red; + F32 green; + F32 blue; +}; + +struct M7Vector3 { + M7Vector3(){} + M7Vector3(F32 pX, F32 pY, F32 pZ) + { + X=pX; + Y=pY; + Z=pZ; + } + F32 X; + F32 Y; + F32 Z; + +}; + +struct M7Vector2{ + M7Vector2(){} + M7Vector2(F32 pX, F32 pY) + { + X=pX; + Y=pY; + } + F32 X; + F32 Y; + +}; + +struct M7Color4 { + M7Color4(){} + M7Color4(F32 pRed, F32 pGreen, F32 pBlue, F32 pAlpha) + { + red=pRed; + green=pGreen; + blue=pBlue; + alpha=pAlpha; + } + F32 red; + F32 green; + F32 blue; + F32 alpha; +}; + +struct Meta7WindlightPacket { + Meta7WindlightPacket(){} + M7Color3 waterColor; + F32 waterFogDensityExponent; + F32 underwaterFogModifier; + M7Vector3 reflectionWaveletScale; + F32 fresnelScale; + F32 fresnelOffset; + F32 refractScaleAbove; + F32 refractScaleBelow; + F32 blurMultiplier; + M7Vector2 littleWaveDirection; + M7Vector2 bigWaveDirection; + unsigned char normalMapTexture[16]; + M7Color4 horizon; + F32 hazeHorizon; + M7Color4 blueDensity; + F32 hazeDensity; + F32 densityMultiplier; + F32 distanceMultiplier; + M7Color4 sunMoonColor; + F32 sunMoonPosiiton; + M7Color4 ambient; + F32 eastAngle; + F32 sunGlowFocus; + F32 sunGlowSize; + F32 sceneGamma; + F32 starBrightness; + M7Color4 cloudColor; + M7Vector3 cloudXYDensity; + F32 cloudCoverage; + F32 cloudScale; + M7Vector3 cloudDetailXYDensity; + F32 cloudScrollX; + F32 cloudScrollY; + unsigned short maxAltitude; + char cloudScrollXLock; + char cloudScrollYLock; + char drawClassicClouds; + + +}; + +#endif diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ebd56f36a..3b5c6ec6b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -148,19 +148,22 @@ std::string gPoolNames[] = // Correspond to LLDrawpool enum render type "NONE", "POOL_SIMPLE", - "POOL_TERRAIN", + "POOL_TERRAIN", "POOL_BUMP", "POOL_TREE", "POOL_SKY", "POOL_WL_SKY", "POOL_GROUND", - "POOL_INVISIBLE", - "POOL_AVATAR", - "POOL_WATER", "POOL_GRASS", "POOL_FULLBRIGHT", + "POOL_BUMP", + "POOL_INVISIBLE", + "POOL_AVATAR", + "POOL_VOIDWATER", + "POOL_WATER", "POOL_GLOW", "POOL_ALPHA", + "POOL_INVALID_OUCH_CATASTROPHE_ERROR" }; U32 nhpo2(U32 v) @@ -378,6 +381,7 @@ void LLPipeline::init() LLViewerShaderMgr::instance()->setShaders(); stop_glerror(); + setLightingDetail(-1); } LLPipeline::~LLPipeline() @@ -450,8 +454,6 @@ void LLPipeline::cleanup() releaseGLBuffers(); - mBloomImagep = NULL; - mBloomImage2p = NULL; mFaceSelectImagep = NULL; mMovedBridge.clear(); @@ -556,13 +558,12 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) //static void LLPipeline::updateRenderDeferred() { - BOOL deferred = (gSavedSettings.getBOOL("RenderDeferred") && + sRenderDeferred = (gSavedSettings.getBOOL("RenderDeferred") && LLRenderTarget::sUseFBO && gSavedSettings.getBOOL("VertexShaderEnable") && gSavedSettings.getBOOL("RenderAvatarVP") && - gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE; - - sRenderDeferred = deferred; + gSavedSettings.getBOOL("WindLightUseAtmosShaders") && + !gUseWireframe); } void LLPipeline::releaseGLBuffers() @@ -1397,6 +1398,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl gGLLastMatrix = NULL; glLoadMatrixd(gGLLastModelView); + LLVertexBuffer::unbind(); LLGLDisable blend(GL_BLEND); LLGLDisable test(GL_ALPHA_TEST); @@ -1474,10 +1476,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl { mScreen.flush(); } - /*else if (LLPipeline::sUseOcclusion > 1) + else if (LLPipeline::sUseOcclusion > 1) { glFlush(); - }*/ + } } void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera) @@ -2371,6 +2373,7 @@ void LLPipeline::postSort(LLCamera& camera) assertInitialized(); + llpushcallstacks ; //rebuild drawable geometry for (LLCullResult::sg_list_t::iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i) { @@ -2381,7 +2384,7 @@ void LLPipeline::postSort(LLCamera& camera) group->rebuildGeom(); } } - + llpushcallstacks ; //rebuild groups sCull->assertDrawMapsEmpty(); @@ -2399,10 +2402,10 @@ void LLPipeline::postSort(LLCamera& camera) } LLSpatialGroup::sNoDelete = TRUE;*/ + rebuildPriorityGroups(); - - - + llpushcallstacks ; + const S32 bin_count = 1024*8; static LLCullResult::drawinfo_list_t alpha_bins[bin_count]; @@ -2503,7 +2506,7 @@ void LLPipeline::postSort(LLCamera& camera) std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); } - + llpushcallstacks ; // 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 static const LLCachedControl beacon_always_on("BeaconAlwaysOn",false); if (beacon_always_on && !sShadowRender) @@ -2552,7 +2555,7 @@ void LLPipeline::postSort(LLCamera& camera) forAllVisibleDrawables(renderSoundHighlights); } } - + llpushcallstacks ; // If managing your telehub, draw beacons at telehub and currently selected spawnpoint. if (LLFloaterTelehub::renderBeacons()) { @@ -2582,6 +2585,7 @@ void LLPipeline::postSort(LLCamera& camera) } //LLSpatialGroup::sNoDelete = FALSE; + llpushcallstacks ; } @@ -2614,7 +2618,12 @@ void render_hud_elements() // Render debugging beacons. //gObjectList.renderObjectBeacons(); - //LLHUDObject::renderAll(); + + //TO-DO: + //V2 moved this line from LLPipeline::renderGeom + //Uncomment once multisample z-buffer issues are figured out on ati cards. + // LLHUDObject::renderAll(); + //gObjectList.resetObjectBeacons(); } else if (gForceRenderLandFence) @@ -2937,6 +2946,9 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { // Render debugging beacons. gObjectList.renderObjectBeacons(); + //TO-DO: + //V2 moved this line to LLPipeline::render_hud_elements + //Migrate once multisample z-buffer issues are figured out on ati cards. LLHUDObject::renderAll(); gObjectList.resetObjectBeacons(); } @@ -3166,26 +3178,32 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera) gGLLastMatrix = NULL; glLoadMatrixd(gGLModelView); - renderHighlights(); - mHighlightFaces.clear(); - - renderDebug(); - - LLVertexBuffer::unbind(); - - if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + //TO-DO: + //V2 moved block to LLPipeline::renderDeferredLighting + //Migrate once multisample z-buffer issues are figured out on ati cards. { - // Render debugging beacons. - gObjectList.renderObjectBeacons(); - LLHUDObject::renderAll(); - gObjectList.resetObjectBeacons(); - } - else - { - // Make sure particle effects disappear - LLHUDObject::renderAllForTimer(); - } + renderHighlights(); + mHighlightFaces.clear(); + renderDebug(); + + LLVertexBuffer::unbind(); + + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { + // Render debugging beacons. + gObjectList.renderObjectBeacons(); + LLHUDObject::renderAll(); + gObjectList.resetObjectBeacons(); + } + else + { + // Make sure particle effects disappear + LLHUDObject::renderAllForTimer(); + } + } + //END + if (occlude) { occlude = FALSE; @@ -3281,6 +3299,9 @@ void LLPipeline::renderDebug() { LLMemType mt(LLMemType::MTYPE_PIPELINE); + if(!mRenderDebugMask) + return; + assertInitialized(); gGL.color4f(1,1,1,1); @@ -3445,6 +3466,55 @@ void LLPipeline::renderDebug() } } + if (mRenderDebugMask & LLPipeline::RENDER_DEBUG_BUILD_QUEUE) + { + U32 count = 0; + U32 size = mBuildQ2.size(); + LLColor4 col; + + LLGLEnable blend(GL_BLEND); + LLGLDepthTest depth(GL_TRUE, GL_FALSE); + gGL.getTexUnit(0)->bind(LLViewerImage::sWhiteImagep.get()); + + for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ2.begin(); iter != mGroupQ2.end(); ++iter) + { + LLSpatialGroup* group = *iter; + if (group->isDead()) + { + continue; + } + + LLSpatialBridge* bridge = group->mSpatialPartition->asBridge(); + + if (bridge && (!bridge->mDrawable || bridge->mDrawable->isDead())) + { + continue; + } + + if (bridge) + { + gGL.pushMatrix(); + glMultMatrixf((F32*)bridge->mDrawable->getRenderMatrix().mMatrix); + } + + F32 alpha = (F32) (size-count)/size; + + + LLVector2 c(1.f-alpha, alpha); + c.normVec(); + + + ++count; + col.set(c.mV[0], c.mV[1], 0, alpha*0.5f+0.1f); + group->drawObjectBox(col); + + if (bridge) + { + gGL.popMatrix(); + } + } + } + gGL.flush(); } @@ -4256,32 +4326,28 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) LLVector4 light_pos_gl(light_pos, 1.0f); F32 light_radius = llmax(light->getLightRadius(), 0.001f); - F32 atten, quad; -#if 0 //1.9.1 - if (pool->getVertexShaderLevel() > 0) - { - atten = light_radius; - quad = llmax(light->getLightFalloff(), 0.0001f); - } - else -#endif - { - F32 x = (3.f * (1.f + light->getLightFalloff())); - atten = x / (light_radius); // % of brightness at radius - quad = 0.0f; - } + F32 x = (3.f * (1.f + light->getLightFalloff())); // why this magic? probably trying to match a historic behavior. + float linatten = x / (light_radius); // % of brightness at radius + mHWLightColors[cur_light] = light_color; S32 gllight = GL_LIGHT0+cur_light; glLightfv(gllight, GL_POSITION, light_pos_gl.mV); glLightfv(gllight, GL_DIFFUSE, light_color.mV); glLightfv(gllight, GL_AMBIENT, LLColor4::black.mV); - glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV); glLightf (gllight, GL_CONSTANT_ATTENUATION, 0.0f); - glLightf (gllight, GL_LINEAR_ATTENUATION, atten); - glLightf (gllight, GL_QUADRATIC_ATTENUATION, quad); - glLightf (gllight, GL_SPOT_EXPONENT, 0.0f); - glLightf (gllight, GL_SPOT_CUTOFF, 180.0f); + glLightf (gllight, GL_LINEAR_ATTENUATION, linatten); + glLightf (gllight, GL_QUADRATIC_ATTENUATION, 0.0f); + //Point lights + { + glLightf (gllight, GL_SPOT_EXPONENT, 0.0f); + glLightf (gllight, GL_SPOT_CUTOFF, 180.0f); + + // we use specular.w = 1.0 as a cheap hack for the shaders to know that this is omnidirectional rather than a spotlight + const float specular[] = {0.f, 0.f, 0.f, 1.f}; + glLightfv(gllight, GL_SPECULAR, specular); + //llinfos << "boring light" << llendl; + } cur_light++; if (cur_light >= 8) { @@ -4298,7 +4364,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV); } - if (gAgent.getAvatarObject() && + if (isAgentAvatarValid() && gAgent.getAvatarObject()->mSpecialRenderMode == 3) { LLColor4 light_color = LLColor4::white; @@ -4308,13 +4374,10 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) LLVector4 light_pos_gl(light_pos, 1.0f); F32 light_radius = 16.f; - F32 atten, quad; - { F32 x = 3.f; - atten = x / (light_radius); // % of brightness at radius - quad = 0.0f; - } + float linatten = x / (light_radius); // % of brightness at radius + mHWLightColors[2] = light_color; S32 gllight = GL_LIGHT2; glLightfv(gllight, GL_POSITION, light_pos_gl.mV); @@ -4322,8 +4385,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) glLightfv(gllight, GL_AMBIENT, LLColor4::black.mV); glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV); glLightf (gllight, GL_CONSTANT_ATTENUATION, 0.0f); - glLightf (gllight, GL_LINEAR_ATTENUATION, atten); - glLightf (gllight, GL_QUADRATIC_ATTENUATION, quad); + glLightf (gllight, GL_LINEAR_ATTENUATION, linatten); + glLightf (gllight, GL_QUADRATIC_ATTENUATION, 0.0f); glLightf (gllight, GL_SPOT_EXPONENT, 0.0f); glLightf (gllight, GL_SPOT_CUTOFF, 180.0f); } @@ -4340,6 +4403,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) void LLPipeline::enableLights(U32 mask) { assertInitialized(); + if (mLightingDetail == 0) { mask &= 0xf003; // sun and backlight only (and fullbright bit) @@ -5527,6 +5591,14 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) gGL.getTexUnit(0)->activate(); gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); + //TO-DO: + //V2 requires this for hover text and such since they have been pulled out of geom render. + //Do this when multisample z-buffer issues are figured out + /*if (LLRenderTarget::sUseFBO) + { //copy depth buffer from mScreen to framebuffer + LLRenderTarget::copyContentsToFramebuffer(mScreen, 0, 0, mScreen.getWidth(), mScreen.getHeight(), + 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST); + }*/ } @@ -5835,6 +5907,9 @@ void LLPipeline::renderDeferredLighting() { LLGLDisable blend(GL_BLEND); + //TO-DO: + //V2 changed to LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS); + //Do this when multisample z-buffer issues are figured out LLGLDepthTest depth(GL_FALSE); stop_glerror(); glDrawArrays(GL_TRIANGLE_STRIP, 0, 3); @@ -5851,6 +5926,9 @@ void LLPipeline::renderDeferredLighting() { LLGLDisable blend(GL_BLEND); + //TO-DO: + //V2 changed to LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS); + //Do this when multisample z-buffer issues are figured out LLGLDepthTest depth(GL_FALSE); stop_glerror(); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); @@ -6087,6 +6165,26 @@ void LLPipeline::renderDeferredLighting() popRenderTypeMask(); } + //TO-DO: + //V2 moved block from LLPipeline::renderGeomPostDeferred + //Migrate once multisample z-buffer issues are figured out on ati cards. + /*{ + //render highlights, etc. + renderHighlights(); + mHighlightFaces.clear(); + + renderDebug(); + + LLVertexBuffer::unbind(); + + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { + // Render debugging beacons. + gObjectList.renderObjectBeacons(); + gObjectList.resetObjectBeacons(); + } + }*/ + mScreen.flush(); } @@ -6250,48 +6348,47 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) gPipeline.popRenderTypeMask(); } - gPipeline.pushRenderTypeMask(); - - clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER, - LLPipeline::RENDER_TYPE_VOIDWATER, - LLPipeline::RENDER_TYPE_GROUND, - LLPipeline::RENDER_TYPE_SKY, - LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS, - LLPipeline::RENDER_TYPE_WL_CLOUDS, - LLPipeline::END_RENDER_TYPES); if (gSavedSettings.getBOOL("RenderWaterReflections")) { //mask out selected geometry based on reflection detail S32 detail = gSavedSettings.getS32("RenderReflectionDetail"); - if (detail > 0) + //if (detail > 0) { //mask out selected geometry based on reflection detail { - if (detail < 4) - { - clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES); + gPipeline.pushRenderTypeMask(); if (detail < 3) { - clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES); + clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES); if (detail < 2) { + clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES); + if (detail < 1) + { clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES); } } } + + clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER, + LLPipeline::RENDER_TYPE_VOIDWATER, + LLPipeline::RENDER_TYPE_GROUND, + LLPipeline::RENDER_TYPE_SKY, + LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS, + LLPipeline::RENDER_TYPE_WL_CLOUDS, + LLPipeline::END_RENDER_TYPES); static LLCachedControl skip_distortion_updates("SkipReflectOcclusionUpdates",false); LLPipeline::sSkipUpdate = skip_distortion_updates; LLGLUserClipPlane clip_plane(plane, mat, projection); LLGLDisable cull(GL_CULL_FACE); updateCull(camera, ref_result, 1); stateSort(camera, ref_result); + gPipeline.grabReferences(ref_result); + renderGeom(camera); + LLPipeline::sSkipUpdate = FALSE; + gPipeline.popRenderTypeMask(); } - gPipeline.grabReferences(ref_result); - LLGLUserClipPlane clip_plane(plane, mat, projection); - renderGeom(camera); - LLPipeline::sSkipUpdate = FALSE; } } - gPipeline.popRenderTypeMask(); } glCullFace(GL_BACK); glPopMatrix(); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index aa3ea55a9..a7b318c60 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -48,7 +48,7 @@ #include -class LLViewerTexture; +class LLViewerImage; class LLEdge; class LLFace; class LLViewerObject; @@ -107,15 +107,15 @@ public: /// @brief Get a draw pool from pool type (POOL_SIMPLE, POOL_MEDIA) and texture. /// @return Draw pool, or NULL if not found. - LLDrawPool *findPool(const U32 pool_type, LLViewerTexture *tex0 = NULL); + LLDrawPool *findPool(const U32 pool_type, LLViewerImage *tex0 = NULL); /// @brief Get a draw pool for faces of the appropriate type and texture. Create if necessary. /// @return Always returns a draw pool. - LLDrawPool *getPool(const U32 pool_type, LLViewerTexture *tex0 = NULL); + LLDrawPool *getPool(const U32 pool_type, LLViewerImage *tex0 = NULL); /// @brief Figures out draw pool type from texture entry. Creates pool if necessary. - static LLDrawPool* getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* te_image); - static U32 getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep); + static LLDrawPool* getPoolFromTE(const LLTextureEntry* te, LLViewerImage* te_image); + static U32 getPoolTypeFromTE(const LLTextureEntry* te, LLViewerImage* imagep); void addPool(LLDrawPool *poolp); // Only to be used by LLDrawPool classes for splitting pools! void removePool( LLDrawPool* poolp ); @@ -155,7 +155,7 @@ public: ); // Something about these textures has changed. Dirty them. - void dirtyPoolObjectTextures(const std::set& textures); + void dirtyPoolObjectTextures(const std::set& textures); void resetDrawOrders(); @@ -397,7 +397,9 @@ public: RENDER_DEBUG_SHADOW_FRUSTA = 0x0040000, RENDER_DEBUG_SCULPTED = 0x0080000, RENDER_DEBUG_AVATAR_VOLUME = 0x0100000, - RENDER_DEBUG_AGENT_TARGET = 0x0200000, + RENDER_DEBUG_BUILD_QUEUE = 0x0200000, + RENDER_DEBUG_AGENT_TARGET = 0x0400000, + RENDER_DEBUG_UPDATE_TYPE = 0x0800000, }; public: @@ -601,9 +603,7 @@ public: protected: std::vector mSelectedFaces; - LLPointer mFaceSelectImagep; - LLPointer mBloomImagep; - LLPointer mBloomImage2p; + LLPointer mFaceSelectImagep; U32 mLightMask; U32 mLightMovingMask; @@ -620,6 +620,7 @@ public: }; void render_bbox(const LLVector3 &min, const LLVector3 &max); +void render_hud_elements(); extern LLPipeline gPipeline; extern BOOL gRenderForSelect; diff --git a/indra/newview/skins/dark/textures/checkbox_enabled_false.tga b/indra/newview/skins/dark/textures/checkbox_enabled_false.tga index df55cf2ed..c29ed89c6 100644 Binary files a/indra/newview/skins/dark/textures/checkbox_enabled_false.tga and b/indra/newview/skins/dark/textures/checkbox_enabled_false.tga differ diff --git a/indra/newview/skins/dark/textures/checkbox_enabled_true.tga b/indra/newview/skins/dark/textures/checkbox_enabled_true.tga index 3344ee78d..c8904bc60 100644 Binary files a/indra/newview/skins/dark/textures/checkbox_enabled_true.tga and b/indra/newview/skins/dark/textures/checkbox_enabled_true.tga differ diff --git a/indra/newview/skins/dark/textures/status_buy_currency.tga b/indra/newview/skins/dark/textures/status_buy_currency.tga index 391265320..206550cbb 100644 Binary files a/indra/newview/skins/dark/textures/status_buy_currency.tga and b/indra/newview/skins/dark/textures/status_buy_currency.tga differ diff --git a/indra/newview/skins/dark/textures/status_buy_currency_pressed.tga b/indra/newview/skins/dark/textures/status_buy_currency_pressed.tga index 4ade0c06d..2b82aef0f 100644 Binary files a/indra/newview/skins/dark/textures/status_buy_currency_pressed.tga and b/indra/newview/skins/dark/textures/status_buy_currency_pressed.tga differ diff --git a/indra/newview/skins/default/textures/status_buy_currency.tga b/indra/newview/skins/default/textures/status_buy_currency.tga index e4dc5f278..ec8621398 100644 Binary files a/indra/newview/skins/default/textures/status_buy_currency.tga and b/indra/newview/skins/default/textures/status_buy_currency.tga differ diff --git a/indra/newview/skins/default/textures/status_buy_currency_pressed.tga b/indra/newview/skins/default/textures/status_buy_currency_pressed.tga index 22cec7a15..620f90f73 100644 Binary files a/indra/newview/skins/default/textures/status_buy_currency_pressed.tga and b/indra/newview/skins/default/textures/status_buy_currency_pressed.tga differ diff --git a/indra/newview/skins/default/xui/en-us/floater_about_land.xml b/indra/newview/skins/default/xui/en-us/floater_about_land.xml index 9da335451..f1fd3617d 100644 --- a/indra/newview/skins/default/xui/en-us/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en-us/floater_about_land.xml @@ -918,32 +918,18 @@ Only large parcels can be listed in search. right="-12" scale_image="true" width="70" /> - + width="120"> Return to Home URL in: - Minutes + minutes - - Land can be bought direct for in-world money ([CURRENCY]) or at auction for either [CURRENCY] or US$. + Land can be bought direct for in-world money ([CURRENCY]) or at auction for either [CURRENCY] or [REALCURRENCY]. To buy direct, visit the land and click on the place name in the title bar. - Land can be bought direct for Linden Dollars (L$) or at auction for either L$ or US$. + Land can be bought direct for in-world money ([CURRENCY]) or at auction for either [CURRENCY] or [REALCURRENCY]. To buy direct, visit the land and click on the place name in the title bar. - Linden Location + Official Location Arts & Culture diff --git a/indra/newview/skins/default/xui/en-us/floater_directory3.xml b/indra/newview/skins/default/xui/en-us/floater_directory3.xml new file mode 100644 index 000000000..c4f0c3632 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/floater_directory3.xml @@ -0,0 +1,748 @@ + + + + + + Searching... + + + None Found. + +