From 14f6bbadef2c39e58a3b54c0c6212949acf50e45 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 8 Aug 2011 15:29:23 -0500
Subject: SH-2242 Work in progress migrating to glVertexAttrib everywhere
---
indra/newview/app_settings/logcontrol.xml | 2 +-
indra/newview/app_settings/settings.xml | 2 +-
.../shaders/class1/avatar/avatarSkinV.glsl | 3 +-
.../shaders/class1/avatar/avatarV.glsl | 24 +-
.../shaders/class1/avatar/eyeballV.glsl | 15 +-
.../shaders/class1/avatar/pickAvatarV.glsl | 16 +-
.../shaders/class1/deferred/alphaSkinnedV.glsl | 20 +-
.../shaders/class1/deferred/alphaV.glsl | 29 ++-
.../shaders/class1/deferred/attachmentShadowV.glsl | 10 +-
.../shaders/class1/deferred/avatarAlphaV.glsl | 32 +--
.../shaders/class1/deferred/avatarEyesV.glsl | 12 +-
.../shaders/class1/deferred/avatarShadowV.glsl | 23 +-
.../shaders/class1/deferred/avatarV.glsl | 25 +-
.../shaders/class1/deferred/blurLightV.glsl | 6 +-
.../shaders/class1/deferred/bumpSkinnedV.glsl | 16 +-
.../shaders/class1/deferred/bumpV.glsl | 16 +-
.../shaders/class1/deferred/cloudsV.glsl | 11 +-
.../shaders/class1/deferred/diffuseSkinnedV.glsl | 15 +-
.../shaders/class1/deferred/diffuseV.glsl | 14 +-
.../shaders/class1/deferred/fullbrightV.glsl | 16 +-
.../app_settings/shaders/class1/deferred/giV.glsl | 12 +-
.../shaders/class1/deferred/impostorV.glsl | 10 +-
.../shaders/class1/deferred/luminanceV.glsl | 12 +-
.../shaders/class1/deferred/multiPointLightV.glsl | 6 +-
.../shaders/class1/deferred/pointLightV.glsl | 12 +-
.../shaders/class1/deferred/postDeferredV.glsl | 6 +-
.../shaders/class1/deferred/postgiV.glsl | 5 +-
.../shaders/class1/deferred/shadowAlphaMaskV.glsl | 10 +-
.../shaders/class1/deferred/shadowV.glsl | 4 +-
.../app_settings/shaders/class1/deferred/skyV.glsl | 11 +-
.../shaders/class1/deferred/softenLightF.glsl | 6 +-
.../shaders/class1/deferred/softenLightV.glsl | 13 +-
.../shaders/class1/deferred/starsV.glsl | 10 +-
.../shaders/class1/deferred/sunLightV.glsl | 16 +-
.../shaders/class1/deferred/terrainV.glsl | 14 +-
.../shaders/class1/deferred/treeV.glsl | 12 +-
.../shaders/class1/deferred/waterV.glsl | 23 +-
.../shaders/class1/effects/glowExtractF.glsl | 2 +-
.../shaders/class1/effects/glowExtractV.glsl | 6 +-
.../app_settings/shaders/class1/effects/glowV.glsl | 21 +-
.../shaders/class1/environment/terrainV.glsl | 23 +-
.../shaders/class1/environment/waterV.glsl | 13 +-
.../shaders/class1/interface/customalphaV.glsl | 9 +-
.../shaders/class1/interface/glowcombineV.glsl | 9 +-
.../shaders/class1/interface/highlightF.glsl | 4 +-
.../shaders/class1/interface/highlightV.glsl | 18 +-
.../shaders/class1/interface/occlusionV.glsl | 4 +-
.../shaders/class1/interface/solidcolorV.glsl | 10 +-
.../shaders/class1/interface/twotextureaddV.glsl | 9 +-
.../app_settings/shaders/class1/interface/uiV.glsl | 10 +-
.../app_settings/shaders/class1/objects/bumpV.glsl | 13 +-
.../class1/objects/fullbrightShinySkinnedV.glsl | 14 +-
.../shaders/class1/objects/fullbrightShinyV.glsl | 14 +-
.../shaders/class1/objects/fullbrightSkinnedV.glsl | 14 +-
.../shaders/class1/objects/fullbrightV.glsl | 13 +-
.../class1/objects/shinySimpleSkinnedV.glsl | 15 +-
.../shaders/class1/objects/shinyV.glsl | 13 +-
.../shaders/class1/objects/simpleSkinnedV.glsl | 15 +-
.../shaders/class1/objects/simpleV.glsl | 18 +-
.../shaders/class2/avatar/eyeballV.glsl | 16 +-
.../shaders/class2/deferred/alphaSkinnedV.glsl | 27 +-
.../shaders/class2/deferred/alphaV.glsl | 31 +--
.../shaders/class2/deferred/avatarAlphaV.glsl | 31 ++-
.../shaders/class2/deferred/edgeV.glsl | 5 +-
.../shaders/class2/deferred/softenLightV.glsl | 12 +-
.../shaders/class2/deferred/sunLightV.glsl | 15 +-
.../app_settings/shaders/class2/effects/blurV.glsl | 6 +-
.../shaders/class2/effects/drawQuadV.glsl | 10 +-
.../shaders/class2/environment/terrainV.glsl | 22 +-
.../shaders/class2/lighting/sumLightsV.glsl | 2 -
.../shaders/class2/objects/fullbrightShinyV.glsl | 19 +-
.../shaders/class2/objects/fullbrightV.glsl | 18 +-
.../shaders/class2/objects/shinyV.glsl | 18 +-
.../shaders/class2/objects/simpleV.glsl | 20 +-
.../shaders/class2/windlight/cloudsV.glsl | 11 +-
.../shaders/class2/windlight/skyV.glsl | 10 +-
.../shaders/class3/avatar/avatarV.glsl | 27 +-
.../shaders/class3/deferred/giDownsampleV.glsl | 6 +-
.../shaders/class3/deferred/giFinalV.glsl | 5 +-
.../app_settings/shaders/class3/deferred/giV.glsl | 12 +-
.../shaders/class3/deferred/luminanceV.glsl | 12 +-
.../shaders/class3/deferred/postDeferredV.glsl | 6 +-
.../shaders/class3/deferred/postgiV.glsl | 6 +-
.../shaders/class3/deferred/softenLightV.glsl | 11 +-
.../shaders/class3/lighting/sumLightsV.glsl | 1 -
indra/newview/llagent.cpp | 2 +-
indra/newview/lldrawpool.cpp | 4 +-
indra/newview/lldrawpoolalpha.cpp | 23 +-
indra/newview/lldrawpoolalpha.h | 1 +
indra/newview/lldrawpoolavatar.cpp | 68 ++---
indra/newview/lldrawpoolbump.cpp | 2 +-
indra/newview/lldrawpoolsimple.cpp | 38 +--
indra/newview/lldrawpoolsimple.h | 5 +-
indra/newview/lldrawpoolsky.cpp | 6 +-
indra/newview/lldrawpoolterrain.cpp | 4 +
indra/newview/lldrawpooltree.cpp | 5 +-
indra/newview/lldrawpoolwater.cpp | 6 +-
indra/newview/lldrawpoolwlsky.cpp | 4 +-
indra/newview/lldynamictexture.cpp | 8 +
indra/newview/llface.cpp | 48 +++-
indra/newview/llface.h | 6 +-
indra/newview/llfloaterimagepreview.cpp | 4 +-
indra/newview/llfloatermodelpreview.cpp | 16 +-
indra/newview/llmanip.cpp | 4 +-
indra/newview/llmaniptranslate.cpp | 4 +-
indra/newview/llpreviewtexture.cpp | 2 +-
indra/newview/llselectmgr.cpp | 4 +-
indra/newview/llspatialpartition.cpp | 74 +++---
indra/newview/llspatialpartition.h | 1 -
indra/newview/lltexlayer.cpp | 3 +
indra/newview/lltextureview.cpp | 4 +-
indra/newview/llviewerjointmesh.cpp | 24 +-
indra/newview/llviewershadermgr.cpp | 280 +++++++++++++++++----
indra/newview/llviewershadermgr.h | 25 +-
indra/newview/llviewerwindow.cpp | 2 +-
indra/newview/llvosurfacepatch.cpp | 6 +
indra/newview/llvovolume.cpp | 24 +-
indra/newview/pipeline.cpp | 56 +++--
indra/newview/pipeline.h | 4 +
119 files changed, 1164 insertions(+), 718 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index ae72dee900..a76eb3cd37 100644
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -43,7 +43,7 @@
tags
-
+
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 9bb320d882..ed1e3c2057 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7565,7 +7565,7 @@
Type
Boolean
Value
- 0
+ 1
RenderDebugNormalScale
RenderDebugNormalScale
+ TranslationService
+
+ GoogleTranslateAPIv2Key
+
+ BingTranslateAPIKey
+
TutorialURL
", begin);
+ err_msg = body.substr(begin, end-begin);
+ LLStringUtil::replaceString(err_msg, "
", ""); // strip CR
+ return false;
+ }
+
+ // Sample response: Hola
+ size_t begin = body.find(">");
+ if (begin == std::string::npos || begin >= (body.size() - 1))
+ {
+ return false;
+ }
+
+ size_t end = body.find("", ++begin);
+ if (end == std::string::npos || end < begin)
+ {
+ return false;
+ }
+
+ detected_lang = ""; // unsupported by this API
+ translation = body.substr(begin, end-begin);
+ LLStringUtil::replaceString(translation, "
", ""); // strip CR
+ return true;
}
- LLHTTPClient::get(url, result, m_Header, m_GoogleTimeout);
+private:
+ static std::string getAPIKey()
+ {
+ return gSavedSettings.getString("BingTranslateAPIKey");
+ }
+};
+
+LLTranslate::TranslationReceiver::TranslationReceiver(const std::string& from_lang, const std::string& to_lang)
+: mFromLang(from_lang)
+, mToLang(to_lang)
+, mHandler(LLTranslate::getPreferredHandler())
+{
}
-//static
-void LLTranslate::getTranslateUrl(std::string &translate_url, const std::string &from_lang, const std::string &to_lang, const std::string &mesg)
+// virtual
+void LLTranslate::TranslationReceiver::completedRaw(
+ U32 http_status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
{
- char * curl_str = curl_escape(mesg.c_str(), mesg.size());
- std::string const escaped_mesg(curl_str);
- curl_free(curl_str);
-
- translate_url = m_GoogleURL
- + escaped_mesg + m_GoogleLangSpec
- + from_lang // 'from' language; empty string for auto
- + "%7C" // |
- + to_lang; // 'to' language
+ LLBufferStream istr(channels, buffer.get());
+ std::stringstream strstrm;
+ strstrm << istr.rdbuf();
+
+ const std::string body = strstrm.str();
+ std::string translation, detected_lang, err_msg;
+ int status = http_status;
+ if (mHandler.parseResponse(status, body, translation, detected_lang, err_msg))
+ {
+ // Fix up the response
+ LLStringUtil::replaceString(translation, "<", "<");
+ LLStringUtil::replaceString(translation, ">",">");
+ LLStringUtil::replaceString(translation, ""","\"");
+ LLStringUtil::replaceString(translation, "'","'");
+ LLStringUtil::replaceString(translation, "&","&");
+ LLStringUtil::replaceString(translation, "'","'");
+
+ handleResponse(translation, detected_lang);
+ }
+ else
+ {
+ llwarns << "Translation request failed: " << err_msg << llendl;
+ LL_DEBUGS("Translate") << "HTTP status: " << status << " " << reason << LL_ENDL;
+ LL_DEBUGS("Translate") << "Error response body: " << body << LL_ENDL;
+ handleFailure(status, err_msg);
+ }
}
//static
-bool LLTranslate::parseGoogleTranslate(const std::string& body, std::string &translation, std::string &detected_language)
+void LLTranslate::translateMessage(
+ TranslationReceiverPtr &receiver,
+ const std::string &from_lang,
+ const std::string &to_lang,
+ const std::string &mesg)
{
- Json::Value root;
- Json::Reader reader;
-
- bool success = reader.parse(body, root);
- if (!success)
+ std::string url;
+ receiver->mHandler.getTranslateURL(url, from_lang, to_lang, mesg);
+
+ static const float REQUEST_TIMEOUT = 5;
+ static LLSD sHeader;
+
+ if (!sHeader.size())
{
- LL_WARNS("Translate") << "Non valid response from Google Translate API: '" << reader.getFormatedErrorMessages() << "'" << LL_ENDL;
- return false;
+ std::string user_agent = llformat("%s %d.%d.%d (%d)",
+ LLVersionInfo::getChannel().c_str(),
+ LLVersionInfo::getMajor(),
+ LLVersionInfo::getMinor(),
+ LLVersionInfo::getPatch(),
+ LLVersionInfo::getBuild());
+
+ sHeader.insert("Accept", "text/plain");
+ sHeader.insert("User-Agent", user_agent);
}
-
- translation = root[m_GoogleData].get(m_GoogleTranslation, "").asString();
- detected_language = root[m_GoogleData].get(m_GoogleLanguage, "").asString();
- return true;
+
+ LL_DEBUGS("Translate") << "Sending translation request: " << url << LL_ENDL;
+ LLHTTPClient::get(url, receiver, sHeader, REQUEST_TIMEOUT);
}
//static
@@ -119,3 +308,22 @@ std::string LLTranslate::getTranslateLanguage()
return language;
}
+// static
+const LLTranslationAPIHandler& LLTranslate::getPreferredHandler()
+{
+ static LLGoogleV1Handler google_v1;
+ static LLGoogleV2Handler google_v2;
+ static LLBingHandler bing;
+
+ std::string service = gSavedSettings.getString("TranslationService");
+ if (service == "google_v2")
+ {
+ return google_v2;
+ }
+ else if (service == "google_v1")
+ {
+ return google_v1;
+ }
+
+ return bing;
+}
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index e85a42e878..1dee792f7b 100644
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -30,89 +30,42 @@
#include "llhttpclient.h"
#include "llbufferstream.h"
+class LLTranslationAPIHandler;
+
class LLTranslate
{
LOG_CLASS(LLTranslate);
+
public :
class TranslationReceiver: public LLHTTPClient::Responder
{
- protected:
- TranslationReceiver(const std::string &from_lang, const std::string &to_lang)
- : m_fromLang(from_lang),
- m_toLang(to_lang)
- {
- }
-
- virtual void handleResponse(const std::string &translation, const std::string &recognized_lang) {};
- virtual void handleFailure() {};
-
public:
- ~TranslationReceiver()
- {
- }
-
- virtual void completedRaw( U32 status,
- const std::string& reason,
- const LLChannelDescriptors& channels,
- const LLIOPipe::buffer_ptr_t& buffer)
- {
- if (200 <= status && status < 300)
- {
- LLBufferStream istr(channels, buffer.get());
- std::stringstream strstrm;
- strstrm << istr.rdbuf();
+ /*virtual*/ void completedRaw(
+ U32 http_status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer);
- const std::string result = strstrm.str();
- std::string translation;
- std::string detected_language;
+ protected:
+ friend class LLTranslate;
- if (!parseGoogleTranslate(result, translation, detected_language))
- {
- handleFailure();
- return;
- }
-
- // Fix up the response
- LLStringUtil::replaceString(translation, "<", "<");
- LLStringUtil::replaceString(translation, ">",">");
- LLStringUtil::replaceString(translation, ""","\"");
- LLStringUtil::replaceString(translation, "'","'");
- LLStringUtil::replaceString(translation, "&","&");
- LLStringUtil::replaceString(translation, "'","'");
+ TranslationReceiver(const std::string& from_lang, const std::string& to_lang);
- handleResponse(translation, detected_language);
- }
- else
- {
- LL_WARNS("Translate") << "HTTP request for Google Translate failed with status " << status << ", reason: " << reason << LL_ENDL;
- handleFailure();
- }
- }
+ virtual void handleResponse(const std::string &translation, const std::string &recognized_lang) = 0;
+ virtual void handleFailure(int status, const std::string& err_msg) = 0;
- protected:
- const std::string m_toLang;
- const std::string m_fromLang;
+ std::string mFromLang;
+ std::string mToLang;
+ const LLTranslationAPIHandler& mHandler;
};
- static void translateMessage(LLHTTPClient::ResponderPtr &result, const std::string &from_lang, const std::string &to_lang, const std::string &mesg);
- static float m_GoogleTimeout;
+ typedef boost::intrusive_ptr TranslationReceiverPtr;
+
+ static void translateMessage(TranslationReceiverPtr &receiver, const std::string &from_lang, const std::string &to_lang, const std::string &mesg);
static std::string getTranslateLanguage();
private:
- static void getTranslateUrl(std::string &translate_url, const std::string &from_lang, const std::string &to_lang, const std::string &text);
- static bool parseGoogleTranslate(const std::string& body, std::string &translation, std::string &detected_language);
-
- static LLSD m_Header;
- static const char* m_GoogleURL;
- static const char* m_GoogleLangSpec;
- static const char* m_AcceptHeader;
- static const char* m_AcceptType;
- static const char* m_AgentHeader;
- static const char* m_UserAgent;
-
- static const char* m_GoogleData;
- static const char* m_GoogleTranslation;
- static const char* m_GoogleLanguage;
+ static const LLTranslationAPIHandler& getPreferredHandler();
};
#endif
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 68745d5aeb..ff02214194 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3138,7 +3138,7 @@ protected:
{
// filter out non-interesting responeses
if ( !translation.empty()
- && (m_toLang != detected_language)
+ && (mToLang != detected_language)
&& (LLStringUtil::compareInsensitive(translation, m_origMesg) != 0) )
{
m_chat.mText += " (" + translation + ")";
@@ -3147,9 +3147,8 @@ protected:
LLNotificationsUI::LLNotificationManager::instance().onChat(m_chat, m_toastArgs);
}
- void handleFailure()
+ void handleFailure(int status, const std::string& err_msg)
{
- LLTranslate::TranslationReceiver::handleFailure();
m_chat.mText += " (?)";
LLNotificationsUI::LLNotificationManager::instance().onChat(m_chat, m_toastArgs);
@@ -3388,7 +3387,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
const std::string from_lang = ""; // leave empty to trigger autodetect
const std::string to_lang = LLTranslate::getTranslateLanguage();
- LLHTTPClient::ResponderPtr result = ChatTranslationReceiver::build(from_lang, to_lang, mesg, chat, args);
+ LLTranslate::TranslationReceiverPtr result = ChatTranslationReceiver::build(from_lang, to_lang, mesg, chat, args);
LLTranslate::translateMessage(result, from_lang, to_lang, mesg);
}
else
--
cgit v1.2.3
From e23ecf311c729be7e6611ef2fe21badaf9f1c3ed Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Wed, 7 Sep 2011 00:09:49 +0300
Subject: STORM-1577 WIP Implemented chat translation preferences management.
---
indra/newview/CMakeLists.txt | 2 +
indra/newview/llfloaterpreference.cpp | 9 +
indra/newview/llfloaterpreference.h | 1 +
indra/newview/llfloatertranslationsettings.cpp | 146 ++++++++++++++
indra/newview/llfloatertranslationsettings.h | 59 ++++++
indra/newview/llviewerfloaterreg.cpp | 2 +
.../xui/en/floater_translation_settings.xml | 222 +++++++++++++++++++++
.../default/xui/en/panel_preferences_chat.xml | 12 ++
8 files changed, 453 insertions(+)
create mode 100644 indra/newview/llfloatertranslationsettings.cpp
create mode 100644 indra/newview/llfloatertranslationsettings.h
create mode 100644 indra/newview/skins/default/xui/en/floater_translation_settings.xml
(limited to 'indra/newview')
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a117d9a593..e7ca2a4294 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -237,6 +237,7 @@ set(viewer_SOURCE_FILES
llfloatertools.cpp
llfloatertopobjects.cpp
llfloatertos.cpp
+ llfloatertranslationsettings.cpp
llfloateruipreview.cpp
llfloaterurlentry.cpp
llfloatervoiceeffect.cpp
@@ -799,6 +800,7 @@ set(viewer_HEADER_FILES
llfloatertools.h
llfloatertopobjects.h
llfloatertos.h
+ llfloatertranslationsettings.h
llfloateruipreview.h
llfloaterurlentry.h
llfloatervoiceeffect.h
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index d65928e385..07c07d608a 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -345,6 +345,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this));
mCommitCallbackRegistrar.add("Pref.BlockList", boost::bind(&LLFloaterPreference::onClickBlockList, this));
mCommitCallbackRegistrar.add("Pref.Proxy", boost::bind(&LLFloaterPreference::onClickProxySettings, this));
+ mCommitCallbackRegistrar.add("Pref.TranslationSettings", boost::bind(&LLFloaterPreference::onClickTranslationSettings, this));
sSkin = gSavedSettings.getString("SkinCurrent");
@@ -602,6 +603,9 @@ void LLFloaterPreference::cancel()
}
// hide joystick pref floater
LLFloaterReg::hideInstance("pref_joystick");
+
+ // hide translation settings floater
+ LLFloaterReg::hideInstance("prefs_translation");
// cancel hardware menu
LLFloaterHardwareSettings* hardware_settings = LLFloaterReg::getTypedInstance("prefs_hardware_settings");
@@ -1553,6 +1557,11 @@ void LLFloaterPreference::onClickProxySettings()
LLFloaterReg::showInstance("prefs_proxy");
}
+void LLFloaterPreference::onClickTranslationSettings()
+{
+ LLFloaterReg::showInstance("prefs_translation");
+}
+
void LLFloaterPreference::updateDoubleClickControls()
{
// check is one of double-click actions settings enabled
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index ef9bc2dd53..ee6bb235be 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -157,6 +157,7 @@ public:
void onChangeMaturity();
void onClickBlockList();
void onClickProxySettings();
+ void onClickTranslationSettings();
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp
new file mode 100644
index 0000000000..56f101d149
--- /dev/null
+++ b/indra/newview/llfloatertranslationsettings.cpp
@@ -0,0 +1,146 @@
+/**
+ * @file llfloatertranslationsettings.cpp
+ * @brief Machine translation settings for chat
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatertranslationsettings.h"
+
+// Viewer includes
+#include "llviewercontrol.h" // for gSavedSettings
+
+// Linden library includes
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "llfloaterreg.h"
+#include "lllineeditor.h"
+#include "llnotificationsutil.h"
+#include "llradiogroup.h"
+
+LLFloaterTranslationSettings::LLFloaterTranslationSettings(const LLSD& key)
+: LLFloater(key)
+, mMachineTranslationCB(NULL)
+, mLanguageCombo(NULL)
+, mTranslationServiceRadioGroup(NULL)
+, mBingAPIKeyEditor(NULL)
+, mGoogleAPIKeyEditor(NULL)
+{
+}
+
+// virtual
+BOOL LLFloaterTranslationSettings::postBuild()
+{
+ mMachineTranslationCB = getChild("translate_chat_checkbox");
+ mLanguageCombo = getChild("translate_language_combo");
+ mTranslationServiceRadioGroup = getChild("translation_service_rg");
+ mBingAPIKeyEditor = getChild("bing_api_key");
+ mGoogleAPIKeyEditor = getChild("google_api_key");
+
+ mMachineTranslationCB->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::updateControlsEnabledState, this));
+ mTranslationServiceRadioGroup->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::updateControlsEnabledState, this));
+ getChild("ok_btn")->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnOK, this));
+ getChild("cancel_btn")->setClickedCallback(boost::bind(&LLFloater::closeFloater, this, false));
+
+ center();
+ return TRUE;
+}
+
+// virtual
+void LLFloaterTranslationSettings::onOpen(const LLSD& key)
+{
+ mMachineTranslationCB->setValue(gSavedSettings.getBOOL("TranslateChat"));
+ mLanguageCombo->setSelectedByValue(gSavedSettings.getString("TranslateLanguage"), TRUE);
+ mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), TRUE);
+ mBingAPIKeyEditor->setText(gSavedSettings.getString("BingTranslateAPIKey"));
+ mGoogleAPIKeyEditor->setText(gSavedSettings.getString("GoogleTranslateAPIv2Key"));
+
+ updateControlsEnabledState();
+}
+
+std::string LLFloaterTranslationSettings::getSelectedService() const
+{
+ return mTranslationServiceRadioGroup->getSelectedValue().asString();
+}
+
+void LLFloaterTranslationSettings::showError(const std::string& err_name)
+{
+ LLSD args;
+ args["MESSAGE"] = getString(err_name);
+ LLNotificationsUtil::add("GenericAlert", args);
+}
+
+bool LLFloaterTranslationSettings::validate()
+{
+ bool translate_chat = mMachineTranslationCB->getValue().asBoolean();
+ if (!translate_chat) return true;
+
+ std::string service = getSelectedService();
+ if (service == "bing" && mBingAPIKeyEditor->getText().empty())
+ {
+ showError("no_bing_api_key");
+ return false;
+ }
+
+ if (service == "google_v2" && mGoogleAPIKeyEditor->getText().empty())
+ {
+ showError("no_google_api_key");
+ return false;
+ }
+
+ return true;
+}
+
+void LLFloaterTranslationSettings::updateControlsEnabledState()
+{
+ // Enable/disable controls based on the checkbox value.
+ bool on = mMachineTranslationCB->getValue().asBoolean();
+ std::string service = getSelectedService();
+
+ mTranslationServiceRadioGroup->setEnabled(on);
+ mLanguageCombo->setEnabled(on);
+
+ getChild("bing_api_key_label")->setEnabled(on);
+ mBingAPIKeyEditor->setEnabled(on);
+
+ getChild("google_api_key_label")->setEnabled(on);
+ mGoogleAPIKeyEditor->setEnabled(on);
+
+ mBingAPIKeyEditor->setEnabled(service == "bing");
+ mGoogleAPIKeyEditor->setEnabled(service == "google_v2");
+}
+
+void LLFloaterTranslationSettings::onBtnOK()
+{
+ if (validate())
+ {
+ gSavedSettings.setBOOL("TranslateChat", mMachineTranslationCB->getValue().asBoolean());
+ gSavedSettings.setString("TranslateLanguage", mLanguageCombo->getSelectedValue().asString());
+ gSavedSettings.setString("TranslationService", getSelectedService());
+ gSavedSettings.setString("BingTranslateAPIKey", mBingAPIKeyEditor->getText());
+ gSavedSettings.setString("GoogleTranslateAPIv2Key", mGoogleAPIKeyEditor->getText());
+ closeFloater(false);
+ }
+}
diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h
new file mode 100644
index 0000000000..1c03b86f4d
--- /dev/null
+++ b/indra/newview/llfloatertranslationsettings.h
@@ -0,0 +1,59 @@
+/**
+ * @file llfloatertranslationsettings.h
+ * @brief Machine translation settings for chat
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERTRANSLATIONSETTINGS_H
+#define LL_LLFLOATERTRANSLATIONSETTINGS_H
+
+#include "llfloater.h"
+
+class LLCheckBoxCtrl;
+class LLComboBox;
+class LLLineEditor;
+class LLRadioGroup;
+
+class LLFloaterTranslationSettings : public LLFloater
+{
+public:
+ LLFloaterTranslationSettings(const LLSD& key);
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ std::string getSelectedService() const;
+ void showError(const std::string& err_name);
+ bool validate();
+ void updateControlsEnabledState();
+ void onMachineTranslationToggle();
+ void onBtnOK();
+
+ LLCheckBoxCtrl* mMachineTranslationCB;
+ LLComboBox* mLanguageCombo;
+ LLLineEditor* mBingAPIKeyEditor;
+ LLLineEditor* mGoogleAPIKeyEditor;
+ LLRadioGroup* mTranslationServiceRadioGroup;
+};
+
+#endif // LL_LLFLOATERTRANSLATIONSETTINGS_H
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index fecc6d91bd..3be26d87e2 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -102,6 +102,7 @@
#include "llfloatertools.h"
#include "llfloatertos.h"
#include "llfloatertopobjects.h"
+#include "llfloatertranslationsettings.h"
#include "llfloateruipreview.h"
#include "llfloatervoiceeffect.h"
#include "llfloaterwhitelistentry.h"
@@ -234,6 +235,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
+ LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview");
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
new file mode 100644
index 0000000000..40a176830c
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -0,0 +1,222 @@
+
+
+
+ Bing Translator requires and appID to function.
+ Google Translate requires an API key to function.
+
+
+
+ Translate chat into:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Choose translation service to use:
+
+
+
+
+
+
+
+
+ Bing [http://www.bing.com/developers/createapp.aspx AppID]:
+
+
+
+
+ Google [http://code.google.com/apis/language/translate/v2/pricing.html API key]:
+
+
+
+
+ ([http://code.google.com/apis/language/translate/v2/pricing.html pricing])
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index ea09286592..3fbf484ab2 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -319,4 +319,16 @@
name="Korean"
value="ko" />
+
\ No newline at end of file
--
cgit v1.2.3
From 7975ab138b6ac54fc831613e4d3dfb913c5efbd2 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Wed, 7 Sep 2011 16:14:47 +0300
Subject: STORM-1577 Removed support for Google Translate v1 API.
---
indra/newview/app_settings/settings.xml | 10 ++--
indra/newview/llfloatertranslationsettings.cpp | 8 +--
indra/newview/lltranslate.cpp | 67 +++-------------------
.../xui/en/floater_translation_settings.xml | 4 +-
4 files changed, 18 insertions(+), 71 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 2549538df2..2f1a2093b2 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10925,18 +10925,18 @@
TranslationService
- GoogleTranslateAPIv2Key
+ GoogleTranslateAPIKey
- WindowFullScreen
+ FullScreen
Comment
- SL viewer window full screen
+ run a fullscreen session
Persist
1
Type
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl
deleted file mode 100644
index f75a08779c..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * @file edgeF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-
-VARYING vec2 vary_fragcoord;
-
-uniform float depth_cutoff;
-uniform float norm_cutoff;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-float getDepth(vec2 pos_screen)
-{
- float z = texture2DRect(depthMap, pos_screen.xy).r;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-void main()
-{
- vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float depth = getDepth(vary_fragcoord.xy);
-
- vec2 tc = vary_fragcoord.xy;
-
- float sc = 0.75;
-
- vec2 de;
- de.x = (depth-getDepth(tc+vec2(sc, sc))) + (depth-getDepth(tc+vec2(-sc, -sc)));
- de.y = (depth-getDepth(tc+vec2(-sc, sc))) + (depth-getDepth(tc+vec2(sc, -sc)));
- de /= depth;
- de *= de;
- de = step(depth_cutoff, de);
-
- vec2 ne;
- vec3 nexnorm = texture2DRect(normalMap, tc+vec2(-sc,-sc)).rgb;
- nexnorm = vec3((nexnorm.xy-0.5)*2.0,nexnorm.z); // unpack norm
- ne.x = dot(nexnorm, norm);
- vec3 neynorm = texture2DRect(normalMap, tc+vec2(sc,sc)).rgb;
- neynorm = vec3((neynorm.xy-0.5)*2.0,neynorm.z); // unpack norm
- ne.y = dot(neynorm, norm);
-
- ne = 1.0-ne;
-
- ne = step(norm_cutoff, ne);
-
- gl_FragColor.a = dot(de,de)+dot(ne,ne);
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl
deleted file mode 100644
index 69c6acc07a..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file edgeV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl
deleted file mode 100644
index 832cf46150..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * @file giDownsampleF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect giLightMap;
-
-uniform vec2 kern[32];
-uniform float dist_factor;
-uniform float blur_size;
-uniform vec2 delta;
-uniform int kern_length;
-uniform float kern_scale;
-uniform vec3 blur_quad;
-
-VARYING vec2 vary_fragcoord;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-float getDepth(vec2 pos_screen)
-{
- float z = texture2DRect(depthMap, pos_screen.xy).a;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-void main()
-{
- vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float depth = getDepth(vary_fragcoord.xy);
-
- vec3 ccol = texture2DRect(giLightMap, vary_fragcoord.xy).rgb;
- vec2 dlt = kern_scale * delta/(vec2(1.0,1.0)+norm.xy*norm.xy);
- dlt /= clamp(-depth*blur_quad.x, 1.0, 3.0);
- float defined_weight = kern[0].x;
- vec3 col = ccol*kern[0].x;
-
- for (int i = 0; i < kern_length; i++)
- {
- vec2 tc = vary_fragcoord.xy + kern[i].y*dlt;
- vec3 sampNorm = texture2DRect(normalMap, tc.xy).xyz;
- sampNorm = vec3((sampNorm.xy-0.5)*2.0,sampNorm.z); // unpack norm
-
- float d = dot(norm.xyz, sampNorm);
-
- if (d > 0.5)
- {
- float sampdepth = getDepth(tc.xy);
- sampdepth -= depth;
- if (sampdepth*sampdepth < blur_quad.z)
- {
- col += texture2DRect(giLightMap, tc).rgb*kern[i].x;
- defined_weight += kern[i].x;
- }
- }
- }
-
- col /= defined_weight;
-
- //col = ccol;
-
- col = col*blur_quad.y;
-
- gl_FragColor.xyz = col;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
deleted file mode 100644
index 380d5207c3..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file postgiV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
deleted file mode 100644
index ee992f2fe9..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * @file giF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR;
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-uniform sampler2DRect lightMap;
-uniform sampler2DRect specularRect;
-
-uniform sampler2D noiseMap;
-
-uniform sampler2D diffuseGIMap;
-uniform sampler2D specularGIMap;
-uniform sampler2D normalGIMap;
-uniform sampler2D depthGIMap;
-
-uniform sampler2D lightFunc;
-
-// Inputs
-VARYING vec2 vary_fragcoord;
-
-uniform vec2 screen_res;
-
-uniform vec4 sunlight_color;
-
-uniform mat4 inv_proj;
-uniform mat4 gi_mat; //gPipeline.mGIMatrix - eye space to sun space
-uniform mat4 gi_mat_proj; //gPipeline.mGIMatrixProj - eye space to projected sun space
-uniform mat4 gi_norm_mat; //gPipeline.mGINormalMatrix - eye space normal to sun space normal matrix
-uniform mat4 gi_inv_proj; //gPipeline.mGIInvProj - projected sun space to sun space
-uniform float gi_sample_width;
-uniform float gi_noise;
-uniform float gi_attenuation;
-uniform float gi_range;
-
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec4 getGIPosition(vec2 gi_tc)
-{
- float depth = texture2D(depthGIMap, gi_tc).a;
- vec2 sc = gi_tc*2.0;
- sc -= vec2(1.0, 1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = gi_inv_proj*ndc;
- pos.xyz /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec3 giAmbient(vec3 pos, vec3 norm)
-{
- vec4 gi_c = gi_mat_proj * vec4(pos, 1.0);
- gi_c.xyz /= gi_c.w;
-
- vec4 gi_pos = gi_mat*vec4(pos,1.0);
- vec3 gi_norm = (gi_norm_mat*vec4(norm,1.0)).xyz;
- gi_norm = normalize(gi_norm);
-
- vec4 c_spec = texture2DRect(specularRect, vary_fragcoord.xy);
- vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).rgb;
- gi_pos.xyz += nz.x*gi_noise*gi_norm.xyz;
- vec2 tcx = gi_norm.xy;
- vec2 tcy = gi_norm.yx;
-
- vec4 eye_pos = gi_mat*vec4(0,0,0,1.0);
-
- vec3 eye_dir = normalize(gi_pos.xyz-eye_pos.xyz);
- vec3 eye_ref = reflect(eye_dir, gi_norm);
-
- float da = 0.0; //texture2DRect(lightMap, vary_fragcoord.xy).r*0.5;
- vec3 fdiff = vec3(da);
- float fda = da;
-
- vec3 rcol = vec3(0,0,0);
-
- float fsa = 0.0;
-
-
- for (int i = -1; i <= 1; i += 2 )
- {
- for (int j = -1; j <= 1; j+= 2)
- {
- vec2 tc = vec2(i, j)*0.75+gi_norm.xy*nz.z;
- tc += nz.xy*2.0;
- tc *= gi_sample_width*0.25;
- tc += gi_c.xy;
-
- vec3 lnorm = -(texture2D(normalGIMap, tc.xy).xyz*2.0-1.0);
- vec3 lpos = getGIPosition(tc.xy).xyz;
-
- vec3 at = lpos-gi_pos.xyz;
- float dist = length(at);
- float dist_atten = clamp(1.0/(gi_attenuation*dist), 0.0, 1.0);
-
-
- if (dist_atten > 0.01)
- { //possible contribution of indirect light to this surface
- vec3 ldir = at;
-
- float ld = -dot(ldir, lnorm);
-
- if (ld < 0.0)
- {
- float ang_atten = dot(ldir, gi_norm);
-
- if (ang_atten > 0.0)
- {
- vec4 spec = texture2D(specularGIMap, tc.xy);
- at = normalize(at);
- vec3 diff;
-
- float da = 0.0;
-
- //contribution from indirect source to visible pixel
- vec3 ha = at;
- ha.z -= 1.0;
- ha = normalize(ha);
- if (spec.a > 0.0)
- {
- float sa = dot(ha,lnorm);
- da = texture2D(lightFunc, vec2(sa, spec.a)).r;
- }
- else
- {
- da = -lnorm.z;
- }
-
- diff = texture2D(diffuseGIMap, tc.xy).rgb+spec.rgb*spec.a*2.0;
-
- if (da > 0.0)
- { //contribution from visible pixel to eye
- vec3 ha = normalize(at-eye_dir);
- if (c_spec.a > 0.0)
- {
- float sa = dot(ha, gi_norm);
- da = dist_atten*texture2D(lightFunc, vec2(sa, c_spec.a)).r;
- }
- else
- {
- da = dist_atten*dot(gi_norm, normalize(ldir));
- }
- fda += da;
- fdiff += da*(c_spec.rgb*c_spec.a*2.0+vec3(1,1,1))*diff.rgb;
- }
- }
- }
- }
- }
- }
-
- fdiff *= sunlight_color.rgb;
-
- vec3 ret = fda*fdiff;
-
- return clamp(ret,vec3(0.0), vec3(1.0));
-}
-
-void main()
-{
- vec2 pos_screen = vary_fragcoord.xy;
- vec4 pos = getPosition(pos_screen);
-
- float rad = gi_range*0.5;
-
- vec3 norm = texture2DRect(normalMap, pos_screen).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float dist = max(length(pos.xyz)-rad, 0.0);
-
- float da = clamp(1.0-dist/rad, 0.0, 1.0);
-
- vec3 ambient = da > 0.0 ? giAmbient(pos.xyz, norm) : vec3(0);
-
-
- gl_FragColor.xyz = mix(vec3(0), ambient, da);
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl
deleted file mode 100644
index 3ace57e3cb..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @file giFinalF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect diffuseRect;
-uniform sampler2D bloomMap;
-uniform sampler2DRect edgeMap;
-
-uniform vec2 screen_res;
-VARYING vec2 vary_fragcoord;
-
-
-void main()
-{
- vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
- vec4 diff = texture2DRect(diffuseRect, vary_fragcoord.xy);
-
- gl_FragColor = bloom + diff;
- //gl_FragColor.rgb = vec3(texture2DRect(edgeMap, vary_fragcoord.xy).a);
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
deleted file mode 100644
index 60eca06d35..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file giFinalV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
deleted file mode 100644
index 8272dbf31b..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * @file giV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-ATTRIBUTE vec4 diffuse_color;
-ATTRIBUTE vec2 texcoord0;
-
-
-VARYING vec2 vary_fragcoord;
-VARYING vec4 vertex_color;
-
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
-
- vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
- vec4 tex = vec4(texcoord0,0,1);
- tex.w = 1.0;
-
- vertex_color = diffuse_color;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl
deleted file mode 100644
index 3057b63ecd..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @file luminanceF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect lightMap;
-uniform sampler2DRect diffuseRect;
-
-VARYING vec2 vary_fragcoord;
-void main()
-{
- float i = texture2DRect(lightMap, vary_fragcoord.xy).r;
- gl_FragColor.rgb = vec3(i);
- gl_FragColor.a = 1.0;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
deleted file mode 100644
index 062875e72f..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @file giV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-VARYING vec2 vary_fragcoord;
-VARYING vec4 vertex_color;
-
-uniform vec2 screen_res;
-
-ATTRIBUTE vec3 position;
-ATTRIBUTE vec4 diffuse_color;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
-
- vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
-
- vertex_color = diffuse_color;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl
deleted file mode 100644
index c7ccf3a613..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * @file postDeferredF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect diffuseRect;
-uniform sampler2DRect specularRect;
-
-uniform sampler2DRect localLightMap;
-uniform sampler2DRect sunLightMap;
-uniform sampler2DRect giLightMap;
-uniform sampler2DRect edgeMap;
-
-uniform sampler2D luminanceMap;
-
-uniform sampler2DRect lightMap;
-
-uniform sampler2D lightFunc;
-uniform sampler2D noiseMap;
-
-uniform float sun_lum_scale;
-uniform float sun_lum_offset;
-uniform float lum_scale;
-uniform float lum_lod;
-uniform vec4 ambient;
-uniform float gi_brightness;
-uniform float gi_luminance;
-
-uniform vec4 sunlight_color;
-
-uniform vec2 screen_res;
-VARYING vec2 vary_fragcoord;
-
-void main()
-{
- vec2 tc = vary_fragcoord.xy;
- vec4 lcol = texture2DLod(luminanceMap, vec2(0.5, 0.5), lum_lod);
-
- vec3 gi_col = texture2DRect(giLightMap, vary_fragcoord.xy).rgb;
- vec4 sun_col = texture2DRect(sunLightMap, vary_fragcoord.xy);
- vec3 local_col = texture2DRect(localLightMap, vary_fragcoord.xy).rgb;
-
- float scol = texture2DRect(lightMap, vary_fragcoord.xy).r;
-
- vec3 diff = texture2DRect(diffuseRect, vary_fragcoord.xy).rgb;
- vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
-
- gi_col = gi_col*(diff.rgb+spec.rgb*spec.a);
-
- float lum = 1.0-clamp(pow(lcol.r, gi_brightness)+sun_lum_offset, 0.0, 1.0);
-
- lum *= sun_lum_scale;
-
- sun_col *= 1.0+(lum*lum_scale*scol);
-
- vec4 col;
- col.rgb = gi_col+sun_col.rgb+local_col;
-
- col.a = sun_col.a;
-
- vec3 bcol = vec3(0,0,0);
- float tweight = 0.0;
- for (int i = 0; i < 16; i++)
- {
- float weight = (float(i)+1.0)/2.0;
- bcol += texture2DLod(luminanceMap, vary_fragcoord.xy/screen_res, weight).rgb*weight*weight*weight;
- tweight += weight*weight;
- }
-
- bcol /= tweight;
- bcol *= gi_luminance;
- col.rgb += bcol*lum;
-
- gl_FragColor = col;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
deleted file mode 100644
index 0049d8ea78..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file postDeferredV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl
deleted file mode 100644
index 499a72222d..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * @file postgiF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-uniform sampler2DRect giLightMap;
-uniform sampler2D noiseMap;
-uniform sampler2D giMip;
-uniform sampler2DRect edgeMap;
-
-
-uniform vec2 delta;
-uniform float kern_scale;
-uniform float gi_edge_weight;
-uniform float gi_blur_brightness;
-
-VARYING vec2 vary_fragcoord;
-
-void main()
-{
- vec2 dlt = kern_scale*delta;
- float defined_weight = 0.0;
- vec3 col = vec3(0.0);
-
- float e = 1.0;
-
- for (int i = 1; i < 8; i++)
- {
- vec2 tc = vary_fragcoord.xy + float(i) * dlt;
-
- e = max(e, 0.0);
- float wght = e;
-
- col += texture2DRect(giLightMap, tc).rgb*wght;
- defined_weight += wght;
-
- e *= e;
- e -=(texture2DRect(edgeMap, tc.xy-dlt*0.25).a+
- texture2DRect(edgeMap, tc.xy+dlt*0.25).a)*gi_edge_weight;
- }
-
- e = 1.0;
-
- for (int i = 1; i < 8; i++)
- {
- vec2 tc = vary_fragcoord.xy - float(i) * dlt;
-
- e = max(e,0.0);
- float wght = e;
-
- col += texture2DRect(giLightMap, tc).rgb*wght;
- defined_weight += wght;
-
- e *= e;
- e -= (texture2DRect(edgeMap, tc.xy-dlt*0.25).a+
- texture2DRect(edgeMap, tc.xy+dlt*0.25).a)*gi_edge_weight;
-
- }
-
- col /= max(defined_weight, 0.01);
-
- gl_FragColor.rgb = col * gi_blur_brightness;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
deleted file mode 100644
index 6d590c8051..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file postgiV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
deleted file mode 100644
index 7089c53f1c..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ /dev/null
@@ -1,337 +0,0 @@
-/**
- * @file softenLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect diffuseRect;
-uniform sampler2DRect specularRect;
-uniform sampler2DRect normalMap;
-uniform sampler2DRect lightMap;
-uniform sampler2D noiseMap;
-uniform samplerCube environmentMap;
-uniform sampler2D lightFunc;
-uniform vec3 gi_quad;
-
-uniform float blur_size;
-uniform float blur_fidelity;
-
-// Inputs
-uniform vec4 morphFactor;
-uniform vec3 camPosLocal;
-//uniform vec4 camPosWorld;
-uniform vec4 gamma;
-uniform vec4 lightnorm;
-uniform vec4 sunlight_color;
-uniform vec4 ambient;
-uniform vec4 blue_horizon;
-uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 distance_multiplier;
-uniform vec4 max_y;
-uniform vec4 glow;
-uniform float scene_light_strength;
-uniform vec3 env_mat[3];
-uniform vec4 shadow_clip;
-uniform mat3 ssao_effect_mat;
-
-uniform sampler2DRect depthMap;
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-VARYING vec4 vary_light;
-VARYING vec2 vary_fragcoord;
-
-vec3 vary_PositionEye;
-
-vec3 vary_SunlitColor;
-vec3 vary_AmblitColor;
-vec3 vary_AdditiveColor;
-vec3 vary_AtmosAttenuation;
-uniform float gi_ambiance;
-
-vec4 getPosition_d(vec2 pos_screen, float depth)
-{
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec4 getPosition(vec2 pos_screen)
-{ //get position in screen space (world units) given window coordinate and depth map
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- return getPosition_d(pos_screen, depth);
-}
-
-vec3 getPositionEye()
-{
- return vary_PositionEye;
-}
-vec3 getSunlitColor()
-{
- return vary_SunlitColor;
-}
-vec3 getAmblitColor()
-{
- return vary_AmblitColor;
-}
-vec3 getAdditiveColor()
-{
- return vary_AdditiveColor;
-}
-vec3 getAtmosAttenuation()
-{
- return vary_AtmosAttenuation;
-}
-
-
-void setPositionEye(vec3 v)
-{
- vary_PositionEye = v;
-}
-
-void setSunlitColor(vec3 v)
-{
- vary_SunlitColor = v;
-}
-
-void setAmblitColor(vec3 v)
-{
- vary_AmblitColor = v;
-}
-
-void setAdditiveColor(vec3 v)
-{
- vary_AdditiveColor = v;
-}
-
-void setAtmosAttenuation(vec3 v)
-{
- vary_AtmosAttenuation = v;
-}
-
-void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
-
- vec3 P = inPositionEye;
- setPositionEye(P);
-
- //(TERRAIN) limit altitude
- if (P.y > max_y.x) P *= (max_y.x / P.y);
- if (P.y < -max_y.x) P *= (-max_y.x / P.y);
-
- vec3 tmpLightnorm = lightnorm.xyz;
-
- vec3 Pn = normalize(P);
- float Plen = length(P);
-
- vec4 temp1 = vec4(0);
- vec3 temp2 = vec3(0);
- vec4 blue_weight;
- vec4 haze_weight;
- vec4 sunlight = sunlight_color;
- vec4 light_atten;
-
- //sunlight attenuation effect (hue and brightness) due to atmosphere
- //this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
- //I had thought blue_density and haze_density should have equal weighting,
- //but attenuation due to haze_density tends to seem too strong
-
- temp1 = blue_density + vec4(haze_density.r);
- blue_weight = blue_density / temp1;
- haze_weight = vec4(haze_density.r) / temp1;
-
- //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
- temp2.y = max(0.0, tmpLightnorm.y);
- temp2.y = 1. / temp2.y;
- sunlight *= exp( - light_atten * temp2.y);
-
- // main atmospheric scattering line integral
- temp2.z = Plen * density_multiplier.x;
-
- // Transparency (-> temp1)
- // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
- // compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
-
- //final atmosphere attenuation factor
- setAtmosAttenuation(temp1.rgb);
-
- //compute haze glow
- //(can use temp2.x as temp because we haven't used it yet)
- temp2.x = dot(Pn, tmpLightnorm.xyz);
- temp2.x = 1. - temp2.x;
- //temp2.x is 0 at the sun and increases away from sun
- temp2.x = max(temp2.x, .03); //was glow.y
- //set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.x *= glow.x;
- //higher glow.x gives dimmer glow (because next step is 1 / "angle")
- temp2.x = pow(temp2.x, glow.z);
- //glow.z should be negative, so we're doing a sort of (1 / "angle") function
-
- //add "minimum anti-solar illumination"
- temp2.x += .25;
-
- //increase ambient when there are more clouds
- vec4 tmpAmbient = ambient*gi_ambiance + (vec4(1.) - ambient*gi_ambiance) * cloud_shadow.x * 0.5;
-
- /* decrease value and saturation (that in HSV, not HSL) for occluded areas
- * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
- * // The following line of code performs the equivalent of:
- * float ambAlpha = tmpAmbient.a;
- * float ambValue = dot(vec3(tmpAmbient), vec3(0.577)); // projection onto <1/rt(3), 1/rt(3), 1/rt(3)>, the neutral white-black axis
- * vec3 ambHueSat = vec3(tmpAmbient) - vec3(ambValue);
- * tmpAmbient = vec4(RenderSSAOEffect.valueFactor * vec3(ambValue) + RenderSSAOEffect.saturationFactor *(1.0 - ambFactor) * ambHueSat, ambAlpha);
- */
- tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a);
-
- //haze color
- setAdditiveColor(
- vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
- + tmpAmbient)));
-
- //brightness of surface both sunlight and ambient
- setSunlitColor(vec3(sunlight * .5));
- setAmblitColor(vec3(tmpAmbient * .25));
- setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
-}
-
-vec3 atmosLighting(vec3 light)
-{
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor();
- return (2.0 * light);
-}
-
-vec3 atmosTransport(vec3 light) {
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor() * 2.0;
- return light;
-}
-vec3 atmosGetDiffuseSunlightColor()
-{
- return getSunlitColor();
-}
-
-vec3 scaleDownLight(vec3 light)
-{
- return (light / scene_light_strength );
-}
-
-vec3 scaleUpLight(vec3 light)
-{
- return (light * scene_light_strength);
-}
-
-vec3 atmosAmbient(vec3 light)
-{
- return getAmblitColor() + light / 2.0;
-}
-
-vec3 atmosAffectDirectionalLight(float lightIntensity)
-{
- return getSunlitColor() * lightIntensity;
-}
-
-vec3 scaleSoftClip(vec3 light)
-{
- //soft clip effect:
- light = 1. - clamp(light, vec3(0.), vec3(1.));
- light = 1. - pow(light, gamma.xxx);
-
- return light;
-}
-
-void main()
-{
- vec2 tc = vary_fragcoord.xy;
- float depth = texture2DRect(depthMap, tc.xy).a;
- vec3 pos = getPosition_d(tc, depth).xyz;
- vec3 norm = texture2DRect(normalMap, tc).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- //vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
-
- float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
-
- vec4 diffuse = texture2DRect(diffuseRect, tc);
- vec3 col;
- float bloom = 0.0;
-
- if (diffuse.a < 0.9)
- {
- vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
-
- da = texture2D(lightFunc, vec2(da, 0.0)).r;
-
- vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
- float scol = max(scol_ambocc.r, diffuse.a);
- float ambocc = scol_ambocc.g;
-
- calcAtmospherics(pos.xyz, ambocc);
-
- col = atmosAmbient(vec3(0));
- col += atmosAffectDirectionalLight(max(min(da, scol), diffuse.a));
-
- col *= diffuse.rgb;
-
- if (spec.a > 0.0) // specular reflection
- {
- // the old infinite-sky shiny reflection
- //
- vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
- float sa = dot(refnormpersp, vary_light.xyz);
- vec3 dumbshiny = vary_SunlitColor*scol*texture2D(lightFunc, vec2(sa, spec.a)).r;
-
- // add the two types of shiny together
- vec3 spec_contrib = dumbshiny * spec.rgb;
- bloom = dot(spec_contrib, spec_contrib);
- col += spec_contrib;
- }
-
- col = atmosLighting(col);
- col = scaleSoftClip(col);
-
- col = mix(col, diffuse.rgb, diffuse.a);
- }
- else
- {
- col = diffuse.rgb;
- }
-
- gl_FragColor.rgb = col;
- gl_FragColor.a = bloom;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
deleted file mode 100644
index 682508aaf3..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file softenLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-ATTRIBUTE vec2 texcoord0;
-
-uniform vec2 screen_res;
-
-VARYING vec4 vary_light;
-VARYING vec2 vary_fragcoord;
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
-
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-
- vary_light = vec4(texcoord0,0,1);
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl
deleted file mode 100644
index 4d4b5b190a..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file treeF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef gl_FragData
-out vec4 gl_FragData[3];
-#endif
-
-VARYING vec4 vertex_color;
-VARYING vec2 vary_texcoord0;
-
-uniform sampler2D diffuseMap;
-
-VARYING vec3 vary_normal;
-
-void main()
-{
- vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
- gl_FragData[0] = vec4(vertex_color.rgb*col.rgb, col.a <= 0.5 ? 0.0 : 0.005);
- gl_FragData[1] = vec4(0,0,0,0);
- vec3 nvn = normalize(vary_normal);
- gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
-}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index fcb256fbfc..c45e2ce270 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -590,7 +590,7 @@ static void settings_modify()
gSavedSettings.setBOOL("VectorizeSkin", FALSE);
// disable fullscreen mode, unsupported
- gSavedSettings.setBOOL("WindowFullScreen", FALSE);
+ //gSavedSettings.setBOOL("WindowFullScreen", FALSE);
#endif
}
@@ -2946,7 +2946,7 @@ bool LLAppViewer::initWindow()
VIEWER_WINDOW_CLASSNAME,
gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
- gSavedSettings.getBOOL("WindowFullScreen"), ignorePixelDepth);
+ gSavedSettings.getBOOL("FullScreen"), ignorePixelDepth);
LL_INFOS("AppInit") << "gViewerwindow created." << LL_ENDL;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 6effa77ced..1c89766b26 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -527,11 +527,12 @@ void LLGLTexMemBar::draw()
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
- text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d",
+ text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d",
total_mem,
max_total_mem,
bound_mem,
max_bound_mem,
+ LLRenderTarget::sBytesAllocated/(1024*1024),
LLImageRaw::sGlobalRawMemory >> 20, discard_bias,
cache_usage, cache_max_usage, total_texture_downloaded, total_object_downloaded, total_http_requests);
//, cache_entries, cache_max_entries
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index d22e5f0af2..5b178f82d8 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -622,7 +622,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleRenderDeferredChanged, _2));
gSavedSettings.getControl("RenderShadowDetail")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderDeferredSSAO")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
- gSavedSettings.getControl("RenderDeferredGI")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderPerformanceTest")->getSignal()->connect(boost::bind(&handleRenderPerfTestChanged, _2));
gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _2));
gSavedSettings.getControl("AuditTexture")->getSignal()->connect(boost::bind(&handleAuditTextureChanged, _2));
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 331eb8b8f4..3e20abecb7 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -706,9 +706,9 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w
if (num_verts)
{
- face->getGeometryAvatar(verticesp, normalsp, tex_coordsp, vertex_weightsp, clothing_weightsp);
face->getVertexBuffer()->getIndexStrider(indicesp);
-
+ face->getGeometryAvatar(verticesp, normalsp, tex_coordsp, vertex_weightsp, clothing_weightsp);
+
verticesp += mMesh->mFaceVertexOffset;
normalsp += mMesh->mFaceVertexOffset;
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 17d2a04301..764c247f01 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -152,7 +152,6 @@ LLGLSLShader gPostNightVisionProgram;
// Deferred rendering shaders
LLGLSLShader gDeferredImpostorProgram;
-LLGLSLShader gDeferredEdgeProgram;
LLGLSLShader gDeferredWaterProgram;
LLGLSLShader gDeferredDiffuseProgram;
LLGLSLShader gDeferredDiffuseAlphaMaskProgram;
@@ -183,16 +182,12 @@ LLGLSLShader gDeferredAlphaProgram;
LLGLSLShader gDeferredAvatarEyesProgram;
LLGLSLShader gDeferredFullbrightProgram;
LLGLSLShader gDeferredEmissiveProgram;
-LLGLSLShader gDeferredGIProgram;
-LLGLSLShader gDeferredGIFinalProgram;
-LLGLSLShader gDeferredPostGIProgram;
LLGLSLShader gDeferredPostProgram;
LLGLSLShader gFXAAProgram;
LLGLSLShader gDeferredPostNoDoFProgram;
LLGLSLShader gDeferredWLSkyProgram;
LLGLSLShader gDeferredWLCloudProgram;
LLGLSLShader gDeferredStarProgram;
-LLGLSLShader gLuminanceGatherProgram;
LLViewerShaderMgr::LLViewerShaderMgr() :
mVertexShaderLevel(SHADER_COUNT, 0),
@@ -273,12 +268,8 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gDeferredFullbrightProgram);
mShaderList.push_back(&gDeferredEmissiveProgram);
mShaderList.push_back(&gDeferredAvatarEyesProgram);
- mShaderList.push_back(&gDeferredPostGIProgram);
- mShaderList.push_back(&gDeferredEdgeProgram);
mShaderList.push_back(&gDeferredPostProgram);
mShaderList.push_back(&gFXAAProgram);
- mShaderList.push_back(&gDeferredGIProgram);
- mShaderList.push_back(&gDeferredGIFinalProgram);
mShaderList.push_back(&gDeferredWaterProgram);
mShaderList.push_back(&gDeferredAvatarAlphaProgram);
mShaderList.push_back(&gDeferredWLSkyProgram);
@@ -368,24 +359,8 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void)
mReservedUniforms.push_back("noiseMap");
mReservedUniforms.push_back("lightFunc");
mReservedUniforms.push_back("lightMap");
- mReservedUniforms.push_back("luminanceMap");
- mReservedUniforms.push_back("giLightMap");
- mReservedUniforms.push_back("giMip");
- mReservedUniforms.push_back("edgeMap");
mReservedUniforms.push_back("bloomMap");
- mReservedUniforms.push_back("sunLightMap");
- mReservedUniforms.push_back("localLightMap");
mReservedUniforms.push_back("projectionMap");
- mReservedUniforms.push_back("diffuseGIMap");
- mReservedUniforms.push_back("specularGIMap");
- mReservedUniforms.push_back("normalGIMap");
- mReservedUniforms.push_back("minpGIMap");
- mReservedUniforms.push_back("maxpGIMap");
- mReservedUniforms.push_back("depthGIMap");
- mReservedUniforms.push_back("lastDiffuseGIMap");
- mReservedUniforms.push_back("lastNormalGIMap");
- mReservedUniforms.push_back("lastMinpGIMap");
- mReservedUniforms.push_back("lastMaxpGIMap");
mWLUniforms.push_back("camPosLocal");
@@ -531,15 +506,8 @@ void LLViewerShaderMgr::setShaders()
gSavedSettings.getBOOL("WindLightUseAtmosShaders"))
{
if (gSavedSettings.getS32("RenderShadowDetail") > 0)
- {
- if (gSavedSettings.getBOOL("RenderDeferredGI"))
- { //shadows + gi
- deferred_class = 3;
- }
- else
- { //shadows
- deferred_class = 2;
- }
+ { //shadows
+ deferred_class = 2;
}
else
{ //no shadows
@@ -1108,13 +1076,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightProgram.unload();
gDeferredEmissiveProgram.unload();
gDeferredAvatarEyesProgram.unload();
- gDeferredPostGIProgram.unload();
- gDeferredEdgeProgram.unload();
gDeferredPostProgram.unload();
gFXAAProgram.unload();
- gLuminanceGatherProgram.unload();
- gDeferredGIProgram.unload();
- gDeferredGIFinalProgram.unload();
gDeferredWaterProgram.unload();
gDeferredWLSkyProgram.unload();
gDeferredWLCloudProgram.unload();
@@ -1569,62 +1532,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = gDeferredStarProgram.createShader(NULL, &mWLUniforms);
}
- if (mVertexShaderLevel[SHADER_DEFERRED] > 1)
- {
- if (success)
- {
- gDeferredEdgeProgram.mName = "Deferred Edge Shader";
- gDeferredEdgeProgram.mShaderFiles.clear();
- gDeferredEdgeProgram.mShaderFiles.push_back(make_pair("deferred/edgeV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredEdgeProgram.mShaderFiles.push_back(make_pair("deferred/edgeF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredEdgeProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredEdgeProgram.createShader(NULL, NULL);
- }
- }
-
- if (mVertexShaderLevel[SHADER_DEFERRED] > 2)
- {
- if (success)
- {
- gDeferredPostGIProgram.mName = "Deferred Post GI Shader";
- gDeferredPostGIProgram.mShaderFiles.clear();
- gDeferredPostGIProgram.mShaderFiles.push_back(make_pair("deferred/postgiV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredPostGIProgram.mShaderFiles.push_back(make_pair("deferred/postgiF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredPostGIProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredPostGIProgram.createShader(NULL, NULL);
- }
-
- if (success)
- {
- gDeferredGIProgram.mName = "Deferred GI Shader";
- gDeferredGIProgram.mShaderFiles.clear();
- gDeferredGIProgram.mShaderFiles.push_back(make_pair("deferred/giV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredGIProgram.mShaderFiles.push_back(make_pair("deferred/giF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredGIProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredGIProgram.createShader(NULL, NULL);
- }
-
- if (success)
- {
- gDeferredGIFinalProgram.mName = "Deferred GI Final Shader";
- gDeferredGIFinalProgram.mShaderFiles.clear();
- gDeferredGIFinalProgram.mShaderFiles.push_back(make_pair("deferred/giFinalV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredGIFinalProgram.mShaderFiles.push_back(make_pair("deferred/giFinalF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredGIFinalProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredGIFinalProgram.createShader(NULL, NULL);
- }
-
- if (success)
- {
- gLuminanceGatherProgram.mName = "Luminance Gather Shader";
- gLuminanceGatherProgram.mShaderFiles.clear();
- gLuminanceGatherProgram.mShaderFiles.push_back(make_pair("deferred/luminanceV.glsl", GL_VERTEX_SHADER_ARB));
- gLuminanceGatherProgram.mShaderFiles.push_back(make_pair("deferred/luminanceF.glsl", GL_FRAGMENT_SHADER_ARB));
- gLuminanceGatherProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gLuminanceGatherProgram.createShader(NULL, NULL);
- }
- }
-
return success;
}
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index aeb8553fa1..74708c94a7 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -111,24 +111,8 @@ public:
DEFERRED_NOISE,
DEFERRED_LIGHTFUNC,
DEFERRED_LIGHT,
- DEFERRED_LUMINANCE,
- DEFERRED_GI_LIGHT,
- DEFERRED_GI_MIP,
- DEFERRED_EDGE,
DEFERRED_BLOOM,
- DEFERRED_SUN_LIGHT,
- DEFERRED_LOCAL_LIGHT,
DEFERRED_PROJECTION,
- DEFERRED_GI_DIFFUSE,
- DEFERRED_GI_SPECULAR,
- DEFERRED_GI_NORMAL,
- DEFERRED_GI_MIN_POS,
- DEFERRED_GI_MAX_POS,
- DEFERRED_GI_DEPTH,
- DEFERRED_GI_LAST_DIFFUSE,
- DEFERRED_GI_LAST_NORMAL,
- DEFERRED_GI_LAST_MIN_POS,
- DEFERRED_GI_LAST_MAX_POS,
END_RESERVED_UNIFORMS
} eGLSLReservedUniforms;
@@ -364,7 +348,6 @@ extern LLGLSLShader gPostNightVisionProgram;
// Deferred rendering shaders
extern LLGLSLShader gDeferredImpostorProgram;
-extern LLGLSLShader gDeferredEdgeProgram;
extern LLGLSLShader gDeferredWaterProgram;
extern LLGLSLShader gDeferredDiffuseProgram;
extern LLGLSLShader gDeferredDiffuseAlphaMaskProgram;
@@ -383,14 +366,11 @@ extern LLGLSLShader gDeferredMultiLightProgram;
extern LLGLSLShader gDeferredSpotLightProgram;
extern LLGLSLShader gDeferredMultiSpotLightProgram;
extern LLGLSLShader gDeferredSunProgram;
-extern LLGLSLShader gDeferredGIProgram;
-extern LLGLSLShader gDeferredGIFinalProgram;
extern LLGLSLShader gDeferredBlurLightProgram;
extern LLGLSLShader gDeferredAvatarProgram;
extern LLGLSLShader gDeferredSoftenProgram;
extern LLGLSLShader gDeferredShadowProgram;
extern LLGLSLShader gDeferredShadowAlphaMaskProgram;
-extern LLGLSLShader gDeferredPostGIProgram;
extern LLGLSLShader gDeferredPostProgram;
extern LLGLSLShader gFXAAProgram;
extern LLGLSLShader gDeferredPostNoDoFProgram;
@@ -404,7 +384,6 @@ extern LLGLSLShader gDeferredAvatarAlphaProgram;
extern LLGLSLShader gDeferredWLSkyProgram;
extern LLGLSLShader gDeferredWLCloudProgram;
extern LLGLSLShader gDeferredStarProgram;
-extern LLGLSLShader gLuminanceGatherProgram;
#endif
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5f010624a8..e672f7c4f1 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -661,8 +661,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
BOOL ssao = gSavedSettings.getBOOL("RenderDeferredSSAO");
- bool gi = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED);
-
+
//allocate deferred rendering color buffers
if (!mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
if (!mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
@@ -678,68 +677,22 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mFXAABuffer.release();
}
-#if LL_DARWIN
- // As of OS X 10.6.7, Apple doesn't support multiple color formats in a single FBO
- if (!mEdgeMap.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
-#else
- if (!mEdgeMap.allocate(resX, resY, LLRender::sGLCoreProfile ? GL_RGBA : GL_ALPHA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
-#endif
-
if (shadow_detail > 0 || ssao)
- { //only need mDeferredLight[0] for shadows OR ssao
- if (!mDeferredLight[0].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
+ { //only need mDeferredLight for shadows OR ssao
+ if (!mDeferredLight.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
}
else
{
- mDeferredLight[0].release();
- }
-
- if (ssao)
- { //only need mDeferredLight[1] for ssao
- if (!mDeferredLight[1].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, false)) return false;
- }
- else
- {
- mDeferredLight[1].release();
- }
-
- if (gi)
- { //only need mDeferredLight[2] and mGIMapPost for gi
- if (!mDeferredLight[2].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, false)) return false;
- for (U32 i = 0; i < 2; i++)
- {
-#if LL_DARWIN
- // As of OS X 10.6.7, Apple doesn't support multiple color formats in a single FBO
- if (!mGIMapPost[i].allocate(resX,resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
-#else
- if (!mGIMapPost[i].allocate(resX,resY, GL_RGB, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
-#endif
- }
- }
- else
- {
- mDeferredLight[2].release();
-
- for (U32 i = 0; i < 2; i++)
- {
- mGIMapPost[i].release();
- }
+ mDeferredLight.release();
}
F32 scale = gSavedSettings.getF32("RenderShadowResolutionScale");
-#if LL_DARWIN
- U32 shadow_fmt = 0;
-#else
- //HACK: make alpha masking work on ATI depth shadows (work around for ATI driver bug)
- U32 shadow_fmt = gGLManager.mIsATI ? GL_ALPHA : 0;
-#endif
-
if (shadow_detail > 0)
{ //allocate 4 sun shadow maps
for (U32 i = 0; i < 4; i++)
{
- if (!mShadow[i].allocate(U32(resX*scale),U32(resY*scale), shadow_fmt, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
+ if (!mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
}
}
else
@@ -757,7 +710,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{ //allocate two spot shadow maps
for (U32 i = 4; i < 6; i++)
{
- if (!mShadow[i].allocate(width, height, shadow_fmt, TRUE, FALSE)) return false;
+ if (!mShadow[i].allocate(width, height, 0, TRUE, FALSE)) return false;
}
}
else
@@ -767,21 +720,11 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mShadow[i].release();
}
}
-
- width = nhpo2(resX)/2;
- height = nhpo2(resY)/2;
- if (!mLuminanceMap.allocate(width,height, GL_RGBA, FALSE, FALSE)) return false;
}
else
{
- for (U32 i = 0; i < 3; i++)
- {
- mDeferredLight[i].release();
- }
- for (U32 i = 0; i < 2; i++)
- {
- mGIMapPost[i].release();
- }
+ mDeferredLight.release();
+
for (U32 i = 0; i < 6; i++)
{
mShadow[i].release();
@@ -790,9 +733,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mScreen.release();
mDeferredScreen.release(); //make sure to release any render targets that share a depth buffer with mDeferredScreen first
mDeferredDepth.release();
- mEdgeMap.release();
- mLuminanceMap.release();
-
+
if (!mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
}
@@ -876,18 +817,10 @@ void LLPipeline::releaseScreenBuffers()
mPhysicsDisplay.release();
mDeferredScreen.release();
mDeferredDepth.release();
- for (U32 i = 0; i < 3; i++)
- {
- mDeferredLight[i].release();
- }
-
- mEdgeMap.release();
- mGIMap.release();
- mGIMapPost[0].release();
- mGIMapPost[1].release();
- mHighlight.release();
- mLuminanceMap.release();
+ mDeferredLight.release();
+ mHighlight.release();
+
for (U32 i = 0; i < 6; i++)
{
mShadow[i].release();
@@ -1008,12 +941,6 @@ void LLPipeline::createGLBuffers()
delete [] lg;
}
-
- if (gSavedSettings.getBOOL("RenderDeferredGI"))
- {
- mGIMap.allocate(512,512,GL_RGBA, TRUE, FALSE);
- addDeferredAttachments(mGIMap);
- }
}
gBumpImageList.restoreGL();
@@ -6689,7 +6616,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
static LLFastTimer::DeclareTimer FTM_BIND_DEFERRED("Bind Deferred");
-void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRenderTarget* gi_source, LLRenderTarget* last_gi_post, U32 noise_map)
+void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 noise_map)
{
LLFastTimer t(FTM_BIND_DEFERRED);
@@ -6721,124 +6648,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- if (gi_source)
- {
- BOOL has_gi = FALSE;
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_DIFFUSE);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_SPECULAR);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(1, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_NORMAL);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(2, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_MIN_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(1, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_MAX_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(3, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_DIFFUSE);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_NORMAL);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(2, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MAX_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(1, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MIN_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(3, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_DEPTH);
- if (channel > -1)
- {
- has_gi = TRUE;
- gGL.getTexUnit(channel)->bind(gi_source, TRUE);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- stop_glerror();
-
- glTexParameteri(LLTexUnit::getInternalType(mGIMap.getUsage()), GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
- glTexParameteri(LLTexUnit::getInternalType(mGIMap.getUsage()), GL_DEPTH_TEXTURE_MODE_ARB, GL_ALPHA);
-
- stop_glerror();
- }
-
- if (has_gi)
- {
- F32 range_x = llmin(mGIRange.mV[0], 1.f);
- F32 range_y = llmin(mGIRange.mV[1], 1.f);
-
- LLVector2 scale(range_x,range_y);
-
- LLVector2 kern[25];
-
- for (S32 i = 0; i < 5; ++i)
- {
- for (S32 j = 0; j < 5; ++j)
- {
- S32 idx = i*5+j;
- kern[idx].mV[0] = (i-2)*0.5f;
- kern[idx].mV[1] = (j-2)*0.5f;
- kern[idx].scaleVec(scale);
- }
- }
-
- shader.uniform2fv("gi_kern", 25, (F32*) kern);
- shader.uniformMatrix4fv("gi_mat", 1, FALSE, mGIMatrix.m);
- shader.uniformMatrix4fv("gi_mat_proj", 1, FALSE, mGIMatrixProj.m);
- shader.uniformMatrix4fv("gi_inv_proj", 1, FALSE, mGIInvProj.m);
- shader.uniformMatrix4fv("gi_norm_mat", 1, FALSE, mGINormalMatrix.m);
- }
- }
- stop_glerror();
-
channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredDepth.getUsage());
if (channel > -1)
{
@@ -6875,55 +6684,26 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight[light_index].getUsage());
+ channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
if (channel > -1)
{
- mDeferredLight[light_index].bindTexture(0, channel);
+ if (light_index > 0)
+ {
+ mScreen.bindTexture(0, channel);
+ }
+ else
+ {
+ mDeferredLight.bindTexture(0, channel);
+ }
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LUMINANCE);
- if (channel > -1)
- {
- gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, mLuminanceMap.getTexture(), true);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);
- }
-
channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
if (channel > -1)
{
mGlow[1].bindTexture(0, channel);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- gi_source->bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_EDGE, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mEdgeMap.bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SUN_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mDeferredLight[1].bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LOCAL_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mDeferredLight[2].bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
-
stop_glerror();
for (U32 i = 0; i < 4; i++)
@@ -7032,20 +6812,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
shader.uniform1f ("spot_shadow_offset", gSavedSettings.getF32("RenderSpotShadowOffset"));
shader.uniform1f("spot_shadow_bias", gSavedSettings.getF32("RenderSpotShadowBias"));
- shader.uniform1f("lum_scale", gSavedSettings.getF32("RenderLuminanceScale"));
- shader.uniform1f("sun_lum_scale", gSavedSettings.getF32("RenderSunLuminanceScale"));
- shader.uniform1f("sun_lum_offset", gSavedSettings.getF32("RenderSunLuminanceOffset"));
shader.uniform3fv("sun_dir", 1, mTransformedSunDir.mV);
- shader.uniform1f("lum_lod", gSavedSettings.getF32("RenderLuminanceDetail"));
- shader.uniform1f("gi_range", gSavedSettings.getF32("RenderGIRange"));
- shader.uniform1f("gi_brightness", gSavedSettings.getF32("RenderGIBrightness"));
- shader.uniform1f("gi_luminance", gSavedSettings.getF32("RenderGILuminance"));
- shader.uniform1f("gi_edge_weight", gSavedSettings.getF32("RenderGIBlurEdgeWeight"));
- shader.uniform1f("gi_blur_brightness", gSavedSettings.getF32("RenderGIBlurBrightness"));
- shader.uniform1f("gi_sample_width", mGILightRadius);
- shader.uniform1f("gi_noise", gSavedSettings.getF32("RenderGINoise"));
- shader.uniform1f("gi_attenuation", gSavedSettings.getF32("RenderGIAttenuation"));
- shader.uniform1f("gi_ambiance", gSavedSettings.getF32("RenderGIAmbiance"));
shader.uniform2f("shadow_res", mShadow[0].getWidth(), mShadow[0].getHeight());
shader.uniform2f("proj_shadow_res", mShadow[4].getWidth(), mShadow[4].getHeight());
shader.uniform1f("depth_cutoff", gSavedSettings.getF32("RenderEdgeDepthCutoff"));
@@ -7137,13 +6904,13 @@ void LLPipeline::renderDeferredLighting()
if (gSavedSettings.getBOOL("RenderDeferredSSAO") || gSavedSettings.getS32("RenderShadowDetail") > 0)
{
- mDeferredLight[0].bindTarget();
+ mDeferredLight.bindTarget();
{ //paint shadow/SSAO light map (direct lighting lightmap)
LLFastTimer ftm(FTM_SUN_SHADOW);
bindDeferredShader(gDeferredSunProgram, 0);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glClearColor(1,1,1,1);
- mDeferredLight[0].clear(GL_COLOR_BUFFER_BIT);
+ mDeferredLight.clear(GL_COLOR_BUFFER_BIT);
glClearColor(0,0,0,0);
glh::matrix4f inv_trans = glh_get_current_modelview().inverse().transpose();
@@ -7166,7 +6933,7 @@ void LLPipeline::renderDeferredLighting()
}
gDeferredSunProgram.uniform3fv("offset", slice, offset);
- gDeferredSunProgram.uniform2f("screenRes", mDeferredLight[0].getWidth(), mDeferredLight[0].getHeight());
+ gDeferredSunProgram.uniform2f("screenRes", mDeferredLight.getWidth(), mDeferredLight.getHeight());
{
LLGLDisable blend(GL_BLEND);
@@ -7178,125 +6945,16 @@ void LLPipeline::renderDeferredLighting()
unbindDeferredShader(gDeferredSunProgram);
}
- mDeferredLight[0].flush();
+ mDeferredLight.flush();
}
- { //global illumination specific block (still experimental)
- if (gSavedSettings.getBOOL("RenderDeferredBlurLight") &&
- gSavedSettings.getBOOL("RenderDeferredGI"))
- {
- LLFastTimer ftm(FTM_EDGE_DETECTION);
- //generate edge map
- LLGLDisable blend(GL_BLEND);
- LLGLDisable test(GL_ALPHA_TEST);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable stencil(GL_STENCIL_TEST);
-
- {
- gDeferredEdgeProgram.bind();
- mEdgeMap.bindTarget();
- bindDeferredShader(gDeferredEdgeProgram);
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- unbindDeferredShader(gDeferredEdgeProgram);
- mEdgeMap.flush();
- }
- }
-
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- { //get luminance map from previous frame's light map
- LLGLEnable blend(GL_BLEND);
- LLGLDisable test(GL_ALPHA_TEST);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable stencil(GL_STENCIL_TEST);
-
- //static F32 fade = 1.f;
-
- {
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
- gLuminanceGatherProgram.bind();
- gLuminanceGatherProgram.uniform2f("screen_res", mDeferredLight[0].getWidth(), mDeferredLight[0].getHeight());
- mLuminanceMap.bindTarget();
- bindDeferredShader(gLuminanceGatherProgram);
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- unbindDeferredShader(gLuminanceGatherProgram);
- mLuminanceMap.flush();
- gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLuminanceMap.getTexture(), true);
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);
- glGenerateMipmap(GL_TEXTURE_2D);
- }
- }
-
- { //paint noisy GI map (bounce lighting lightmap)
- LLFastTimer ftm(FTM_GI_TRACE);
- LLGLDisable blend(GL_BLEND);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable test(GL_ALPHA_TEST);
-
- mGIMapPost[0].bindTarget();
-
- bindDeferredShader(gDeferredGIProgram, 0, &mGIMap, 0, mTrueNoiseMap);
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- unbindDeferredShader(gDeferredGIProgram);
- mGIMapPost[0].flush();
- }
-
- U32 pass_count = 0;
- if (gSavedSettings.getBOOL("RenderDeferredBlurLight"))
- {
- pass_count = llclamp(gSavedSettings.getU32("RenderGIBlurPasses"), (U32) 1, (U32) 128);
- }
-
- for (U32 i = 0; i < pass_count; ++i)
- { //gather/soften indirect lighting map
- LLFastTimer ftm(FTM_GI_GATHER);
- bindDeferredShader(gDeferredPostGIProgram, 0, &mGIMapPost[0], NULL, mTrueNoiseMap);
- F32 blur_size = gSavedSettings.getF32("RenderGIBlurSize")/((F32) i * gSavedSettings.getF32("RenderGIBlurIncrement")+1.f);
- gDeferredPostGIProgram.uniform2f("delta", 1.f, 0.f);
- gDeferredPostGIProgram.uniform1f("kern_scale", blur_size);
- gDeferredPostGIProgram.uniform1f("gi_blur_brightness", gSavedSettings.getF32("RenderGIBlurBrightness"));
-
- mGIMapPost[1].bindTarget();
- {
- LLGLDisable blend(GL_BLEND);
- LLGLDepthTest depth(GL_FALSE);
- stop_glerror();
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- stop_glerror();
- }
-
- mGIMapPost[1].flush();
- unbindDeferredShader(gDeferredPostGIProgram);
- bindDeferredShader(gDeferredPostGIProgram, 0, &mGIMapPost[1], NULL, mTrueNoiseMap);
- mGIMapPost[0].bindTarget();
-
- gDeferredPostGIProgram.uniform2f("delta", 0.f, 1.f);
-
- {
- LLGLDisable blend(GL_BLEND);
- LLGLDepthTest depth(GL_FALSE);
- stop_glerror();
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- stop_glerror();
- }
- mGIMapPost[0].flush();
- unbindDeferredShader(gDeferredPostGIProgram);
- }
- }
- }
-
if (gSavedSettings.getBOOL("RenderDeferredSSAO"))
{ //soften direct lighting lightmap
LLFastTimer ftm(FTM_SOFTEN_SHADOW);
//blur lightmap
- mDeferredLight[1].bindTarget();
+ mScreen.bindTarget();
glClearColor(1,1,1,1);
- mDeferredLight[1].clear(GL_COLOR_BUFFER_BIT);
+ mScreen.clear(GL_COLOR_BUFFER_BIT);
glClearColor(0,0,0,0);
bindDeferredShader(gDeferredBlurLightProgram);
@@ -7332,12 +6990,12 @@ void LLPipeline::renderDeferredLighting()
stop_glerror();
}
- mDeferredLight[1].flush();
+ mScreen.flush();
unbindDeferredShader(gDeferredBlurLightProgram);
bindDeferredShader(gDeferredBlurLightProgram, 1);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredLight[0].bindTarget();
+ mDeferredLight.bindTarget();
gDeferredBlurLightProgram.uniform2f("delta", 0.f, 1.f);
@@ -7348,7 +7006,7 @@ void LLPipeline::renderDeferredLighting()
mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
stop_glerror();
}
- mDeferredLight[0].flush();
+ mDeferredLight.flush();
unbindDeferredShader(gDeferredBlurLightProgram);
}
@@ -7364,25 +7022,15 @@ void LLPipeline::renderDeferredLighting()
//mScreen.copyContents(mDeferredScreen, 0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight(),
// 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- mDeferredLight[1].bindTarget();
- // clear color buffer here (GI) - zeroing alpha (glow) is important or it will accumulate against sky
- glClearColor(0,0,0,0);
- mScreen.clear(GL_COLOR_BUFFER_BIT);
- }
- else
- {
- mScreen.bindTarget();
- // clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky
- glClearColor(0,0,0,0);
- mScreen.clear(GL_COLOR_BUFFER_BIT);
- }
-
+ mScreen.bindTarget();
+ // clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky
+ glClearColor(0,0,0,0);
+ mScreen.clear(GL_COLOR_BUFFER_BIT);
+
if (gSavedSettings.getBOOL("RenderDeferredAtmospheric"))
{ //apply sunlight contribution
LLFastTimer ftm(FTM_ATMOSPHERICS);
- bindDeferredShader(gDeferredSoftenProgram, 0, &mGIMapPost[0]);
+ bindDeferredShader(gDeferredSoftenProgram);
{
LLGLDepthTest depth(GL_FALSE);
LLGLDisable blend(GL_BLEND);
@@ -7426,13 +7074,6 @@ void LLPipeline::renderDeferredLighting()
BOOL render_local = gSavedSettings.getBOOL("RenderLocalLights");
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- mDeferredLight[1].flush();
- mDeferredLight[2].bindTarget();
- mDeferredLight[2].clear(GL_COLOR_BUFFER_BIT);
- }
-
if (render_local)
{
gGL.setSceneBlendType(LLRender::BT_ADD);
@@ -7723,47 +7364,6 @@ void LLPipeline::renderDeferredLighting()
}
gGL.setColorMask(true, true);
-
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- mDeferredLight[2].flush();
-
- mScreen.bindTarget();
- mScreen.clear(GL_COLOR_BUFFER_BIT);
-
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
-
- { //mix various light maps (local, sun, gi)
- LLFastTimer ftm(FTM_POST);
- LLGLDisable blend(GL_BLEND);
- LLGLDisable test(GL_ALPHA_TEST);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable stencil(GL_STENCIL_TEST);
-
- bindDeferredShader(gDeferredPostProgram, 0, &mGIMapPost[0]);
-
- gDeferredPostProgram.bind();
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- LLVertexBuffer::unbind();
-
-// glVertexPointer(2, GL_FLOAT, 0, vert);
- gGL.diffuseColor3f(1,1,1);
-
- gGL.pushMatrix();
- gGL.loadIdentity();
- gGL.matrixMode(LLRender::MM_PROJECTION);
- gGL.pushMatrix();
- gGL.loadIdentity();
-
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
-
- gGL.popMatrix();
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- gGL.popMatrix();
-
- unbindDeferredShader(gDeferredPostProgram);
- }
- }
}
{ //render non-deferred geometry (alpha, fullbright, glow)
@@ -7963,25 +7563,9 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
shader.disableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
shader.disableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
shader.disableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight[0].getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_EDGE, mEdgeMap.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_SUN_LIGHT, mDeferredLight[1].getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LOCAL_LIGHT, mDeferredLight[2].getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LUMINANCE);
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
shader.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MIP);
shader.disableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_NORMAL);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_DIFFUSE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_SPECULAR);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_DEPTH);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MIN_POS);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MAX_POS);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_NORMAL);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_DIFFUSE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MIN_POS);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MAX_POS);
for (U32 i = 0; i < 4; i++)
{
@@ -8631,184 +8215,6 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
return TRUE;
}
-void LLPipeline::generateGI(LLCamera& camera, LLVector3& lightDir, std::vector& vpc)
-{
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) < 3)
- {
- return;
- }
-
- LLVector3 up;
-
- //LLGLEnable depth_clamp(GL_DEPTH_CLAMP_NV);
-
- if (lightDir.mV[2] > 0.5f)
- {
- up = LLVector3(1,0,0);
- }
- else
- {
- up = LLVector3(0, 0, 1);
- }
-
-
- F32 gi_range = gSavedSettings.getF32("RenderGIRange");
-
- U32 res = mGIMap.getWidth();
-
- F32 atten = llmax(gSavedSettings.getF32("RenderGIAttenuation"), 0.001f);
-
- //set radius to range at which distance attenuation of incoming photons is near 0
-
- F32 lrad = sqrtf(1.f/(atten*0.01f));
-
- F32 lrange = lrad+gi_range*0.5f;
-
- LLVector3 pad(lrange,lrange,lrange);
-
- glh::matrix4f view = look(LLVector3(128.f,128.f,128.f), lightDir, up);
-
- LLVector3 cp = camera.getOrigin()+camera.getAtAxis()*(gi_range*0.5f);
-
- glh::vec3f scp(cp.mV);
- view.mult_matrix_vec(scp);
- cp.setVec(scp.v);
-
- F32 pix_width = lrange/(res*0.5f);
-
- //move cp to the nearest pix_width
- for (U32 i = 0; i < 3; i++)
- {
- cp.mV[i] = llround(cp.mV[i], pix_width);
- }
-
- LLVector3 min = cp-pad;
- LLVector3 max = cp+pad;
-
- //set mGIRange to range in tc space[0,1] that covers texture block of intersecting lights around a point
- mGIRange.mV[0] = (max.mV[0]-min.mV[0])/res;
- mGIRange.mV[1] = (max.mV[1]-min.mV[1])/res;
- mGILightRadius = lrad/lrange*0.5f;
-
- glh::matrix4f proj = gl_ortho(min.mV[0], max.mV[0],
- min.mV[1], max.mV[1],
- -max.mV[2], -min.mV[2]);
-
- LLCamera sun_cam = camera;
-
- glh::matrix4f eye_view = glh_get_current_modelview();
-
- //get eye space to camera space matrix
- mGIMatrix = view*eye_view.inverse();
- mGINormalMatrix = mGIMatrix.inverse().transpose();
- mGIInvProj = proj.inverse();
- mGIMatrixProj = proj*mGIMatrix;
-
- //translate and scale to [0,1]
- glh::matrix4f trans(.5f, 0.f, 0.f, .5f,
- 0.f, 0.5f, 0.f, 0.5f,
- 0.f, 0.f, 0.5f, 0.5f,
- 0.f, 0.f, 0.f, 1.f);
-
- mGIMatrixProj = trans*mGIMatrixProj;
-
- glh_set_current_modelview(view);
- glh_set_current_projection(proj);
-
- LLViewerCamera::updateFrustumPlanes(sun_cam, TRUE, FALSE, TRUE);
-
- sun_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR);
- static LLCullResult result;
-
- pushRenderTypeMask();
-
- andRenderTypeMask(LLPipeline::RENDER_TYPE_SIMPLE,
- LLPipeline::RENDER_TYPE_FULLBRIGHT,
- LLPipeline::RENDER_TYPE_BUMP,
- LLPipeline::RENDER_TYPE_VOLUME,
- LLPipeline::RENDER_TYPE_TREE,
- LLPipeline::RENDER_TYPE_TERRAIN,
- LLPipeline::RENDER_TYPE_WATER,
- LLPipeline::RENDER_TYPE_VOIDWATER,
- LLPipeline::RENDER_TYPE_PASS_ALPHA_SHADOW,
- LLPipeline::RENDER_TYPE_AVATAR,
- LLPipeline::RENDER_TYPE_PASS_SIMPLE,
- LLPipeline::RENDER_TYPE_PASS_BUMP,
- LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT,
- LLPipeline::RENDER_TYPE_PASS_SHINY,
- END_RENDER_TYPES);
-
-
-
- S32 occlude = LLPipeline::sUseOcclusion;
- //LLPipeline::sUseOcclusion = 0;
- LLPipeline::sShadowRender = TRUE;
-
- //only render large objects into GI map
- sMinRenderSize = gSavedSettings.getF32("RenderGIMinRenderSize");
-
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_GI_SOURCE;
- mGIMap.bindTarget();
-
- F64 last_modelview[16];
- F64 last_projection[16];
- for (U32 i = 0; i < 16; i++)
- {
- last_modelview[i] = gGLLastModelView[i];
- last_projection[i] = gGLLastProjection[i];
- gGLLastModelView[i] = mGIModelview.m[i];
- gGLLastProjection[i] = mGIProjection.m[i];
- }
-
- sun_cam.setOrigin(0.f, 0.f, 0.f);
- updateCull(sun_cam, result);
- stateSort(sun_cam, result);
-
- for (U32 i = 0; i < 16; i++)
- {
- gGLLastModelView[i] = last_modelview[i];
- gGLLastProjection[i] = last_projection[i];
- }
-
- mGIProjection = proj;
- mGIModelview = view;
-
- LLGLEnable cull(GL_CULL_FACE);
-
- //generate GI map
- gGL.matrixMode(LLRender::MM_PROJECTION);
- gGL.pushMatrix();
- gGL.loadMatrix(proj.m);
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- gGL.pushMatrix();
- gGL.loadMatrix(view.m);
-
- stop_glerror();
- gGLLastMatrix = NULL;
-
- mGIMap.clear();
-
- {
- //LLGLEnable enable(GL_DEPTH_CLAMP_NV);
- renderGeomDeferred(camera);
- }
-
- mGIMap.flush();
-
- gGL.matrixMode(LLRender::MM_PROJECTION);
- gGL.popMatrix();
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- gGL.popMatrix();
- gGLLastMatrix = NULL;
-
- LLPipeline::sUseOcclusion = occlude;
- LLPipeline::sShadowRender = FALSE;
- sMinRenderSize = 0.f;
-
- popRenderTypeMask();
-
-}
-
void LLPipeline::renderHighlight(const LLViewerObject* obj, F32 fade)
{
if (obj && obj->getVolume())
@@ -9010,8 +8416,6 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
return;
}
- generateGI(camera, lightDir, fp);
-
//get good split distances for frustum
for (U32 i = 0; i < fp.size(); ++i)
{
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 02898aff1f..d24bab747b 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -248,7 +248,7 @@ public:
void renderGeomDeferred(LLCamera& camera);
void renderGeomPostDeferred(LLCamera& camera);
void renderGeomShadow(LLCamera& camera);
- void bindDeferredShader(LLGLSLShader& shader, U32 light_index = 0, LLRenderTarget* gi_source = NULL, LLRenderTarget* last_gi_post = NULL, U32 noise_map = 0xFFFFFFFF);
+ void bindDeferredShader(LLGLSLShader& shader, U32 light_index = 0, U32 noise_map = 0xFFFFFFFF);
void setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep);
void unbindDeferredShader(LLGLSLShader& shader);
@@ -262,7 +262,6 @@ public:
void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, BOOL use_shader = TRUE, BOOL use_occlusion = TRUE);
- void generateGI(LLCamera& camera, LLVector3& lightDir, std::vector& vpc);
void renderHighlights();
void renderDebug();
void renderPhysicsDisplay();
@@ -534,10 +533,7 @@ public:
LLRenderTarget mFXAABuffer;
LLRenderTarget mEdgeMap;
LLRenderTarget mDeferredDepth;
- LLRenderTarget mDeferredLight[3];
- LLRenderTarget mGIMap;
- LLRenderTarget mGIMapPost[2];
- LLRenderTarget mLuminanceMap;
+ LLRenderTarget mDeferredLight;
LLRenderTarget mHighlight;
LLRenderTarget mPhysicsDisplay;
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 16f48f3a4e..45d6d85937 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2549,19 +2549,6 @@
-
-
-
-
-
-
Date: Tue, 4 Oct 2011 09:38:57 -0700
Subject: DS_Store update to handle developer and release app names
---
.../newview/installers/darwin/release-dmg/_DS_Store | Bin 12292 -> 12292 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/darwin/release-dmg/_DS_Store b/indra/newview/installers/darwin/release-dmg/_DS_Store
index 7022814254..747ca961d8 100644
Binary files a/indra/newview/installers/darwin/release-dmg/_DS_Store and b/indra/newview/installers/darwin/release-dmg/_DS_Store differ
--
cgit v1.2.3
From ae0cd901f8917f1cacc4c402e5a51a06632a076b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 4 Oct 2011 17:25:55 -0500
Subject: SH-2428 Make GCC 4.4 happy by using LLVector4a striders with
LLAlphaObject subclasses -- also vectorize particle VBO updates
---
indra/newview/CMakeLists.txt | 2 -
indra/newview/llviewerobject.h | 4 +-
indra/newview/llvograss.cpp | 22 ++--
indra/newview/llvograss.h | 2 +-
indra/newview/llvopartgroup.cpp | 94 +++++++++-----
indra/newview/llvopartgroup.h | 2 +-
indra/newview/llvotextbubble.cpp | 272 ---------------------------------------
indra/newview/llvotextbubble.h | 66 ----------
8 files changed, 78 insertions(+), 386 deletions(-)
delete mode 100644 indra/newview/llvotextbubble.cpp
delete mode 100644 indra/newview/llvotextbubble.h
(limited to 'indra/newview')
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index fe80a47ca4..0381609cbd 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -588,7 +588,6 @@ set(viewer_SOURCE_FILES
llvopartgroup.cpp
llvosky.cpp
llvosurfacepatch.cpp
- llvotextbubble.cpp
llvotree.cpp
llvovolume.cpp
llvowater.cpp
@@ -1145,7 +1144,6 @@ set(viewer_HEADER_FILES
llvopartgroup.h
llvosky.h
llvosurfacepatch.h
- llvotextbubble.h
llvotree.h
llvotreenew.h
llvovolume.h
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 53e951e483..a77725c1ca 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -1,4 +1,4 @@
-/**
+/**
* @file llviewerobject.h
* @brief Description of LLViewerObject class, which is the base class for most objects in the viewer.
*
@@ -811,7 +811,7 @@ public:
virtual F32 getPartSize(S32 idx);
virtual void getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 32822e1181..8a79d564d3 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -464,7 +464,7 @@ void LLVOGrass::plantBlades()
}
void LLVOGrass::getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
@@ -516,21 +516,24 @@ void LLVOGrass::getGeometry(S32 idx,
position.mV[0] = mPosition.mV[VX] + x + xf;
position.mV[1] = mPosition.mV[VY] + y + yf;
position.mV[2] = mRegionp->getLand().resolveHeightRegion(position);
- *verticesp++ = v1 = position + mRegionp->getOriginAgent();
- *verticesp++ = v1;
+ v1 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v1.mV);
+ (*verticesp++).load3(v1.mV);
position.mV[0] += dzx;
position.mV[1] += dzy;
position.mV[2] += blade_height;
- *verticesp++ = v2 = position + mRegionp->getOriginAgent();
- *verticesp++ = v2;
+ v2 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v2.mV);
+ (*verticesp++).load3(v2.mV);
position.mV[0] = mPosition.mV[VX] + x - xf;
position.mV[1] = mPosition.mV[VY] + y - xf;
position.mV[2] = mRegionp->getLand().resolveHeightRegion(position);
- *verticesp++ = v3 = position + mRegionp->getOriginAgent();
- *verticesp++ = v3;
+ v3 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v3.mV);
+ (*verticesp++).load3(v3.mV);
LLVector3 normal1 = (v1-v2) % (v2-v3);
normal1.mV[VZ] = 0.75f;
@@ -541,8 +544,9 @@ void LLVOGrass::getGeometry(S32 idx,
position.mV[0] += dzx;
position.mV[1] += dzy;
position.mV[2] += blade_height;
- *verticesp++ = v1 = position + mRegionp->getOriginAgent();
- *verticesp++ = v1;
+ v1 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v1.mV);
+ (*verticesp++).load3(v1.mV);
*(normalsp++) = normal1;
*(normalsp++) = normal2;
diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h
index c262fdcc79..00a59facf7 100644
--- a/indra/newview/llvograss.h
+++ b/indra/newview/llvograss.h
@@ -59,7 +59,7 @@ public:
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
/*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
/*virtual*/ void getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index d7edc94c2f..5c10a80b07 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -274,7 +274,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
}
void LLVOPartGroup::getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
@@ -290,37 +290,54 @@ void LLVOPartGroup::getGeometry(S32 idx,
U32 vert_offset = mDrawable->getFace(idx)->getGeomIndex();
- LLVector3 part_pos_agent(part.mPosAgent);
- LLVector3 camera_agent = getCameraPosition();
- LLVector3 at = part_pos_agent - camera_agent;
- LLVector3 up;
- LLVector3 right;
-
- right = at % LLVector3(0.f, 0.f, 1.f);
- right.normalize();
- up = right % at;
- up.normalize();
+ LLVector4a part_pos_agent;
+ part_pos_agent.load3(part.mPosAgent.mV);
+ LLVector4a camera_agent;
+ camera_agent.load3(getCameraPosition().mV);
+ LLVector4a at;
+ at.setSub(part_pos_agent, camera_agent);
+ LLVector4a up(0, 0, 1);
+ LLVector4a right;
+
+ right.setCross3(at, up);
+ right.normalize3fast();
+ up.setCross3(right, at);
+ up.normalize3fast();
if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK)
{
- LLVector3 normvel = part.mVelocity;
- normvel.normalize();
+ LLVector4a normvel;
+ normvel.load3(part.mVelocity.mV);
+ normvel.normalize3fast();
LLVector2 up_fracs;
- up_fracs.mV[0] = normvel*right;
- up_fracs.mV[1] = normvel*up;
+ up_fracs.mV[0] = normvel.dot3(right).getF32();
+ up_fracs.mV[1] = normvel.dot3(up).getF32();
up_fracs.normalize();
- LLVector3 new_up;
- LLVector3 new_right;
- new_up = up_fracs.mV[0] * right + up_fracs.mV[1]*up;
- new_right = up_fracs.mV[1] * right - up_fracs.mV[0]*up;
+ LLVector4a new_up;
+ LLVector4a new_right;
+
+ //new_up = up_fracs.mV[0] * right + up_fracs.mV[1]*up;
+ LLVector4a t = right;
+ t.mul(up_fracs.mV[0]);
+ new_up = up;
+ new_up.mul(up_fracs.mV[1]);
+ new_up.add(t);
+
+ //new_right = up_fracs.mV[1] * right - up_fracs.mV[0]*up;
+ t = right;
+ t.mul(up_fracs.mV[1]);
+ new_right = up;
+ new_right.mul(up_fracs.mV[0]);
+ t.sub(new_right);
+
up = new_up;
- right = new_right;
- up.normalize();
- right.normalize();
+ right = t;
+ up.normalize3fast();
+ right.normalize3fast();
}
- right *= 0.5f*part.mScale.mV[0];
- up *= 0.5f*part.mScale.mV[1];
+ right.mul(0.5f*part.mScale.mV[0]);
+ up.mul(0.5f*part.mScale.mV[1]);
LLVector3 normal = -LLViewerCamera::getInstance()->getXAxis();
@@ -329,14 +346,25 @@ void LLVOPartGroup::getGeometry(S32 idx,
// this works because there is actually a 4th float stored after the vertex position which is used as a texture index
// also, somebody please VECTORIZE THIS
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent + up - right;
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent - up - right;
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent + up + right;
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent - up + right;
+ LLVector4a ppapu;
+ LLVector4a ppamu;
+
+ ppapu.setAdd(part_pos_agent, up);
+ ppamu.setSub(part_pos_agent, up);
+
+ verticesp->setSub(ppapu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setSub(ppamu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setAdd(ppapu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setAdd(ppamu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+
+ //*verticesp++ = part_pos_agent + up - right;
+ //*verticesp++ = part_pos_agent - up - right;
+ //*verticesp++ = part_pos_agent + up + right;
+ //*verticesp++ = part_pos_agent - up + right;
*colorsp++ = part.mColor;
*colorsp++ = part.mColor;
@@ -453,7 +481,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
LLVertexBuffer* buffer = group->mVertexBuffer;
LLStrider indicesp;
- LLStrider verticesp;
+ LLStrider verticesp;
LLStrider normalsp;
LLStrider texcoordsp;
LLStrider colorsp;
diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h
index 4db893b4ef..e58fed86d9 100644
--- a/indra/newview/llvopartgroup.h
+++ b/indra/newview/llvopartgroup.h
@@ -60,7 +60,7 @@ public:
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
/*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
void getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp
deleted file mode 100644
index a92172fe23..0000000000
--- a/indra/newview/llvotextbubble.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * @file llvotextbubble.cpp
- * @brief Viewer-object text bubble.
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llvotextbubble.h"
-
-#include "imageids.h"
-#include "llviewercontrol.h"
-#include "llprimitive.h"
-#include "llrendersphere.h"
-
-#include "llbox.h"
-#include "lldrawable.h"
-#include "llface.h"
-#include "llviewertexturelist.h"
-#include "llvolume.h"
-#include "pipeline.h"
-#include "llvector4a.h"
-#include "llviewerregion.h"
-
-LLVOTextBubble::LLVOTextBubble(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
-: LLAlphaObject(id, pcode, regionp)
-{
- setScale(LLVector3(1.5f, 1.5f, 0.25f));
- mbCanSelect = FALSE;
- mLOD = MIN_LOD;
- mVolumeChanged = TRUE;
- setVelocity(LLVector3(0.f, 0.f, 0.75f));
- LLVolumeParams volume_params;
- volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_LINE);
- volume_params.setBeginAndEndS(0.f, 1.f);
- volume_params.setBeginAndEndT(0.f, 1.f);
- volume_params.setRatio(0.25f, 0.25f);
- volume_params.setShear(0.f, 0.f);
- setVolume(volume_params, 0);
- mColor = LLColor4(1.0f, 0.0f, 0.0f, 1.f);
- S32 i;
- for (i = 0; i < getNumTEs(); i++)
- {
- setTEColor(i, mColor);
- setTETexture(i, LLUUID(IMG_DEFAULT));
- }
-}
-
-
-LLVOTextBubble::~LLVOTextBubble()
-{
-}
-
-
-BOOL LLVOTextBubble::isActive() const
-{
- return TRUE;
-}
-
-BOOL LLVOTextBubble::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
-{
- static LLFastTimer::DeclareTimer ftm("Text Bubble");
- LLFastTimer t(ftm);
-
- F32 dt = mUpdateTimer.getElapsedTimeF32();
- // Die after a few seconds.
- if (dt > 1.5f)
- {
- return FALSE;
- }
-
- LLViewerObject::idleUpdate(agent, world, time);
-
- setScale(0.5f * (1.f+dt) * LLVector3(1.5f, 1.5f, 0.5f));
-
- F32 alpha = 0.35f*dt;
-
- LLColor4 color = mColor;
- color.mV[VALPHA] -= alpha;
- if (color.mV[VALPHA] <= 0.05f)
- {
- return FALSE;
- }
- S32 i;
- for (i = 0; i < getNumTEs(); i++)
- {
- setTEColor(i, color);
- setTEFullbright(i, TRUE);
- }
-
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
- return TRUE;
-}
-
-
-void LLVOTextBubble::updateTextures()
-{
- // Update the image levels of all textures...
-
- for (U32 i = 0; i < getNumTEs(); i++)
- {
- const LLTextureEntry *te = getTE(i);
- F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT);
- texel_area_ratio = llclamp(texel_area_ratio, .125f, 16.f);
- LLViewerTexture *imagep = getTEImage(i);
- if (imagep)
- {
- imagep->addTextureStats(mPixelArea / texel_area_ratio);
- }
- }
-}
-
-
-LLDrawable *LLVOTextBubble::createDrawable(LLPipeline *pipeline)
-{
- pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
- mDrawable->setRenderType(LLPipeline::RENDER_TYPE_VOLUME);
-
- for (U32 i = 0; i < getNumTEs(); i++)
- {
- LLViewerTexture *imagep;
- const LLTextureEntry *texture_entry = getTE(i);
- imagep = LLViewerTextureManager::getFetchedTexture(texture_entry->getID());
-
- mDrawable->addFace((LLFacePool*) NULL, imagep);
- }
-
- return mDrawable;
-}
-
-// virtual
-BOOL LLVOTextBubble::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
-{
- if (LLPrimitive::setVolume(volume_params, mLOD))
- {
- if (mDrawable)
- {
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
- mVolumeChanged = TRUE;
- }
- return TRUE;
- }
- return FALSE;
-}
-
-
-BOOL LLVOTextBubble::updateLOD()
-{
- return FALSE;
-}
-
-BOOL LLVOTextBubble::updateGeometry(LLDrawable *drawable)
-{
- if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_VOLUME)))
- return TRUE;
-
- if (mVolumeChanged)
- {
- LLVolumeParams volume_params = getVolume()->getParams();
- setVolume(volume_params, 0);
-
- LLPipeline::sCompiles++;
-
- drawable->setNumFaces(getVolume()->getNumFaces(), drawable->getFace(0)->getPool(), getTEImage(0));
- }
-
- LLMatrix4 identity4;
- LLMatrix3 identity3;
- for (S32 i = 0; i < drawable->getNumFaces(); i++)
- {
- LLFace *face = drawable->getFace(i);
- face->setTEOffset(i);
- face->setTexture(LLViewerFetchedTexture::sSmokeImagep);
- face->setState(LLFace::FULLBRIGHT);
- }
-
- mVolumeChanged = FALSE;
-
- mDrawable->movePartition();
- return TRUE;
-}
-
-void LLVOTextBubble::updateFaceSize(S32 idx)
-{
- LLFace* face = mDrawable->getFace(idx);
-
- if (idx == 0 || idx == 2)
- {
- face->setSize(0,0);
- }
- else
- {
- const LLVolumeFace& vol_face = getVolume()->getVolumeFace(idx);
- face->setSize(vol_face.mNumVertices, vol_face.mNumIndices);
- }
-}
-
-void LLVOTextBubble::getGeometry(S32 idx,
- LLStrider& verticesp,
- LLStrider& normalsp,
- LLStrider& texcoordsp,
- LLStrider& colorsp,
- LLStrider& indicesp)
-{
- if (idx == 0 || idx == 2)
- {
- return;
- }
-
- const LLVolumeFace& face = getVolume()->getVolumeFace(idx);
-
- LLVector4a pos;
- pos.load3(getPositionAgent().mV);
-
- LLVector4a scale;
- scale.load3(getScale().mV);
-
- LLColor4U color = LLColor4U(getTE(idx)->getColor());
- U32 offset = mDrawable->getFace(idx)->getGeomIndex();
-
- LLVector4a* dst_pos = (LLVector4a*) verticesp.get();
- LLVector4a* src_pos = (LLVector4a*) face.mPositions;
-
- LLVector4a* dst_norm = (LLVector4a*) normalsp.get();
- LLVector4a* src_norm = (LLVector4a*) face.mNormals;
-
- LLVector2* dst_tc = (LLVector2*) texcoordsp.get();
- LLVector2* src_tc = (LLVector2*) face.mTexCoords;
-
- LLVector4a::memcpyNonAliased16((F32*) dst_norm, (F32*) src_norm, face.mNumVertices*4*sizeof(F32));
- LLVector4a::memcpyNonAliased16((F32*) dst_tc, (F32*) src_tc, face.mNumVertices*2*sizeof(F32));
-
-
- for (U32 i = 0; i < face.mNumVertices; i++)
- {
- LLVector4a t;
- t.setMul(src_pos[i], scale);
- dst_pos[i].setAdd(t, pos);
- *colorsp++ = color;
- }
-
- for (U32 i = 0; i < face.mNumIndices; i++)
- {
- *indicesp++ = face.mIndices[i] + offset;
- }
-}
-
-U32 LLVOTextBubble::getPartitionType() const
-{
- return LLViewerRegion::PARTITION_PARTICLE;
-}
diff --git a/indra/newview/llvotextbubble.h b/indra/newview/llvotextbubble.h
deleted file mode 100644
index 9c39929711..0000000000
--- a/indra/newview/llvotextbubble.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file llvotextbubble.h
- * @brief Description of LLVORock class, which a derivation of LLViewerObject
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLVOTEXTBUBBLE_H
-#define LL_LLVOTEXTBUBBLE_H
-
-#include "llviewerobject.h"
-#include "llframetimer.h"
-
-class LLVOTextBubble : public LLAlphaObject
-{
-public:
- LLVOTextBubble(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
-
- /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
- /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
-
- /*virtual*/ void updateTextures();
- /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
- /*virtual*/ BOOL updateLOD();
- /*virtual*/ void updateFaceSize(S32 idx);
-
- /*virtual*/ void getGeometry(S32 idx,
- LLStrider& verticesp,
- LLStrider& normalsp,
- LLStrider& texcoordsp,
- LLStrider& colorsp,
- LLStrider& indicesp);
-
- virtual U32 getPartitionType() const;
-
- LLColor4 mColor;
- S32 mLOD;
- BOOL mVolumeChanged;
-
-protected:
- ~LLVOTextBubble();
- BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false);
- LLFrameTimer mUpdateTimer;
-};
-
-#endif // LL_VO_TEXT_BUBBLE
--
cgit v1.2.3
From 425b10601da5f0e0df265489d8d427afbd506332 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 4 Oct 2011 18:11:11 -0500
Subject: SH-2459 Default to 2x antialiasing instead of 4x/8x
---
indra/newview/featuretable.txt | 4 ++--
indra/newview/featuretable_linux.txt | 4 ++--
indra/newview/featuretable_mac.txt | 4 ++--
indra/newview/featuretable_xp.txt | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index ca66ae989c..9379d336d0 100755
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -155,7 +155,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -184,7 +184,7 @@ WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 6e962f3c56..18efcf5665 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -153,7 +153,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -183,7 +183,7 @@ WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 36ffa54184..c37e4e93ee 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -155,7 +155,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -185,7 +185,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index e855b2c569..fffd30c0d8 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -155,7 +155,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -185,7 +185,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
// Class Unknown Hardware (unknown)
--
cgit v1.2.3
From 210120f9068e8f5696abab55f9fced307e021d22 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 5 Oct 2011 00:49:03 -0500
Subject: SH-2240 Fix for projectors being double sided when shadows disabled
---
.../newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index d3984276ef..2196d14895 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -149,7 +149,7 @@ void main()
vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
if (proj_tc.z < 0.0)
{
- //discard;
+ discard;
}
proj_tc.xyz /= proj_tc.w;
@@ -158,7 +158,7 @@ void main()
float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
if (dist_atten <= 0.0)
{
- //discard;
+ discard;
}
lv = proj_origin-pos.xyz;
--
cgit v1.2.3
From 55cbe344f8aebba2301f127cab2a94c63d5b0978 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Wed, 5 Oct 2011 10:23:46 -0400
Subject: SH-2515 WIP - Preserve user settings
---
.../installers/windows/installer_template.nsi | 94 ++++++++++++++++++++++
1 file changed, 94 insertions(+)
mode change 100644 => 100755 indra/newview/installers/windows/installer_template.nsi
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
old mode 100644
new mode 100755
index a874ce1245..abd2e7f7c5
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -342,6 +342,97 @@ FunctionEnd
;
;FunctionEnd
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Save files from cache
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function PreserveCacheFiles
+
+Push $0
+Push $1
+Push $2
+
+ RMDir /r "$TEMP\SecondLifeSettingsBackup"
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup"
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0"
+ CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+ CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+Pop $0
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Restore files from cache
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function RestoreCacheFiles
+
+Push $0
+Push $1
+Push $2
+
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ RMDir /r "$2\Application Data\SecondLifeRestore\"
+ CreateDirectory "$2\Application Data\SecondLifeRestore\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLifeRestore\"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ RMDir /r "$2\Application Data\SecondLifeRestore\"
+ CreateDirectory "$2\Application Data\SecondLifeRestore\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLifeRestore\"
+Pop $0
+
+FunctionEnd
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Delete the installed shader files
;;; Since shaders are in active development, we'll likely need to shuffle them
@@ -772,6 +863,9 @@ Call CheckNetworkConnection ; ping secondlife.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
+
+Call PreserveCacheFiles
+Call RestoreCacheFiles
; VFS and cache files.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--
cgit v1.2.3
From 967479f9039dc358b9419be7f117162f7d90609c Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 5 Oct 2011 15:12:02 -0500
Subject: SH-2031 Fix for stall in image update -- don't use the CPU to convert
a height map into a normal map -- use the GPU instead via a shader. Also,
WTF glFinish?
---
.../shaders/class1/deferred/normgenF.glsl | 56 +++++++
.../shaders/class1/deferred/normgenV.glsl | 36 +++++
indra/newview/lldrawpoolbump.cpp | 176 +++++++++++++++------
indra/newview/llviewerdisplay.cpp | 35 ++--
indra/newview/llviewershadermgr.cpp | 14 ++
indra/newview/llviewershadermgr.h | 2 +-
indra/newview/llviewertexturelist.cpp | 66 +++++---
7 files changed, 305 insertions(+), 80 deletions(-)
create mode 100644 indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
create mode 100644 indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
new file mode 100644
index 0000000000..879942d8fa
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
@@ -0,0 +1,56 @@
+/**
+ * @file normgenF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2D alphaMap;
+
+VARYING vec2 vary_texcoord0;
+
+uniform float stepX;
+uniform float stepY;
+uniform float norm_scale;
+
+void main()
+{
+ float alpha = texture2D(alphaMap, vary_texcoord0).a;
+
+ vec3 right = vec3(norm_scale, 0, (texture2D(alphaMap, vary_texcoord0+vec2(stepX, 0)).a-alpha)*255);
+ vec3 left = vec3(-norm_scale, 0, (texture2D(alphaMap, vary_texcoord0-vec2(stepX, 0)).a-alpha)*255);
+ vec3 up = vec3(0, -norm_scale, (texture2D(alphaMap, vary_texcoord0-vec2(0, stepY)).a-alpha)*255);
+ vec3 down = vec3(0, norm_scale, (texture2D(alphaMap, vary_texcoord0+vec2(0, stepY)).a-alpha)*255);
+
+ vec3 norm = cross(right, down) + cross(down, left) + cross(left,up) + cross(up, right);
+
+ norm = normalize(norm);
+ norm *= 0.5;
+ norm += 0.5;
+
+ gl_FragColor = vec4(norm, alpha);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl
new file mode 100644
index 0000000000..9bceae05b7
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl
@@ -0,0 +1,36 @@
+/**
+ * @file normgenV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec2 vary_fragcoord;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = vec4(position.x*2.0-1.0, position.y*2.0-1.0, -1.0, 1.0);
+ vary_texcoord0 = texcoord0;
+}
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 501bd88970..be12eb800f 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1088,6 +1088,8 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
}
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback");
+
// static
void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
{
@@ -1110,14 +1112,24 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu
}
}
+static LLFastTimer::DeclareTimer FTM_BUMP_GEN_NORMAL("Generate Normal Map");
+static LLFastTimer::DeclareTimer FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map");
+
void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
{
if (success && LLPipeline::sRenderDeferred)
{
+ LLFastTimer t(FTM_BUMP_SOURCE_STANDARD_LOADED);
LLPointer nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4);
- generateNormalMapFromAlpha(src, nrm_image);
+ {
+ LLFastTimer t(FTM_BUMP_GEN_NORMAL);
+ generateNormalMapFromAlpha(src, nrm_image);
+ }
src_vi->setExplicitFormat(GL_RGBA, GL_RGBA);
- src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image);
+ {
+ LLFastTimer t(FTM_BUMP_CREATE_TEXTURE);
+ src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image);
+ }
}
}
@@ -1176,24 +1188,39 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr
}
}
+
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_LOADED("Bump Source Loaded");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_MIN_MAX("Min/Max");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RESCALE("Rescale");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Create");
+
// static
void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
{
if( success )
{
+ LLFastTimer t(FTM_BUMP_SOURCE_LOADED);
+
+
bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries );
bump_image_map_t::iterator iter = entries_list.find(source_asset_id);
- if (iter == entries_list.end() ||
- iter->second.isNull() ||
- iter->second->getWidth() != src->getWidth() ||
- iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
- { //make sure an entry exists for this image
- LLPointer raw = new LLImageRaw(1,1,1);
- raw->clear(0x77, 0x77, 0xFF, 0xFF);
-
- entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture( raw.get(), TRUE);
- iter = entries_list.find(src_vi->getID());
+ {
+ LLFastTimer t(FTM_BUMP_SOURCE_ENTRIES_UPDATE);
+ if (iter == entries_list.end() ||
+ iter->second.isNull() ||
+ iter->second->getWidth() != src->getWidth() ||
+ iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
+ { //make sure an entry exists for this image
+ LLPointer raw = new LLImageRaw(1,1,1);
+ raw->clear(0x77, 0x77, 0xFF, 0xFF);
+
+ entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture( raw.get(), TRUE);
+ iter = entries_list.find(src_vi->getID());
+ }
}
//if (iter->second->getWidth() != src->getWidth() ||
@@ -1224,50 +1251,56 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
{
case 1:
case 2:
- if( src_data_size == dst_data_size * src_components )
{
- for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
+ LLFastTimer t(FTM_BUMP_SOURCE_MIN_MAX);
+ if( src_data_size == dst_data_size * src_components )
{
- dst_data[i] = src_data[j];
- if( dst_data[i] < minimum )
+ for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
{
- minimum = dst_data[i];
- }
- if( dst_data[i] > maximum )
- {
- maximum = dst_data[i];
+ dst_data[i] = src_data[j];
+ if( dst_data[i] < minimum )
+ {
+ minimum = dst_data[i];
+ }
+ if( dst_data[i] > maximum )
+ {
+ maximum = dst_data[i];
+ }
}
}
- }
- else
- {
- llassert(0);
- dst_image->clear();
+ else
+ {
+ llassert(0);
+ dst_image->clear();
+ }
}
break;
case 3:
case 4:
- if( src_data_size == dst_data_size * src_components )
{
- for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
+ LLFastTimer t(FTM_BUMP_SOURCE_RGB2LUM);
+ if( src_data_size == dst_data_size * src_components )
{
- // RGB to luminance
- dst_data[i] = (R_WEIGHT * src_data[j] + G_WEIGHT * src_data[j+1] + B_WEIGHT * src_data[j+2]) >> FIXED_PT;
- //llassert( dst_data[i] <= 255 );true because it's 8bit
- if( dst_data[i] < minimum )
- {
- minimum = dst_data[i];
- }
- if( dst_data[i] > maximum )
+ for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
{
- maximum = dst_data[i];
+ // RGB to luminance
+ dst_data[i] = (R_WEIGHT * src_data[j] + G_WEIGHT * src_data[j+1] + B_WEIGHT * src_data[j+2]) >> FIXED_PT;
+ //llassert( dst_data[i] <= 255 );true because it's 8bit
+ if( dst_data[i] < minimum )
+ {
+ minimum = dst_data[i];
+ }
+ if( dst_data[i] > maximum )
+ {
+ maximum = dst_data[i];
+ }
}
}
- }
- else
- {
- llassert(0);
- dst_image->clear();
+ else
+ {
+ llassert(0);
+ dst_image->clear();
+ }
}
break;
default:
@@ -1278,6 +1311,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
if( maximum > minimum )
{
+ LLFastTimer t(FTM_BUMP_SOURCE_RESCALE);
U8 bias_and_scale_lut[256];
F32 twice_one_over_range = 2.f / (maximum - minimum);
S32 i;
@@ -1311,17 +1345,63 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
// accidentally releases it.
LLPointer bump = LLViewerTextureManager::getLocalTexture( TRUE );
+
if (!LLPipeline::sRenderDeferred)
{
+ LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
bump->createGLTexture(0, dst_image);
}
- else
- {
- LLPointer nrm_image = new LLImageRaw(dst_image->getWidth(), dst_image->getHeight(), 4);
- generateNormalMapFromAlpha(dst_image, nrm_image);
- bump->setExplicitFormat(GL_RGBA, GL_RGBA);
- bump->createGLTexture(0, nrm_image);
+ else
+ { //convert to normal map
+ {
+ LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
+ bump->setExplicitFormat(GL_RGBA8, GL_ALPHA);
+ bump->createGLTexture(0, dst_image);
+ }
+
+ {
+ LLFastTimer t(FTM_BUMP_SOURCE_GEN_NORMAL);
+ gPipeline.mScreen.bindTarget();
+ LLGLDepthTest depth(GL_FALSE);
+ LLGLDisable cull(GL_CULL_FACE);
+ LLGLDisable blend(GL_BLEND);
+ gGL.setColorMask(TRUE, TRUE);
+ gNormalMapGenProgram.bind();
+ gNormalMapGenProgram.uniform1f("norm_scale", gSavedSettings.getF32("RenderNormalMapScale"));
+ gNormalMapGenProgram.uniform1f("stepX", 1.f/bump->getWidth());
+ gNormalMapGenProgram.uniform1f("stepY", 1.f/bump->getHeight());
+
+ LLVector2 v((F32) bump->getWidth()/gPipeline.mScreen.getWidth(),
+ (F32) bump->getHeight()/gPipeline.mScreen.getHeight());
+
+ gGL.getTexUnit(0)->bind(bump);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+
+ gGL.texCoord2f(0, 0);
+ gGL.vertex2f(0, 0);
+ gGL.texCoord2f(0, 1);
+ gGL.vertex2f(0, v.mV[1]);
+ gGL.texCoord2f(1, 0);
+ gGL.vertex2f(v.mV[0], 0);
+ gGL.texCoord2f(1, 1);
+ gGL.vertex2f(v.mV[0], v.mV[1]);
+
+ gGL.end();
+
+ gGL.flush();
+
+ glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, bump->getWidth(), bump->getHeight());
+
+ glGenerateMipmap(GL_TEXTURE_2D);
+
+ gPipeline.mScreen.flush();
+
+ gNormalMapGenProgram.unbind();
+
+ //generateNormalMapFromAlpha(dst_image, nrm_image);
+ }
}
iter->second = bump; // derefs (and deletes) old image
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 20c9071052..85ef12b32b 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -213,6 +213,10 @@ static LLFastTimer::DeclareTimer FTM_RENDER("Render", true);
static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky");
static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_CLASS("Class");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Bump");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_DELETE("Delete");
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
@@ -743,18 +747,31 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE);
LLFastTimer t(FTM_IMAGE_UPDATE);
- LLViewerTexture::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
- LLViewerCamera::getInstance()->getAngularVelocityStat()->getMean());
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_CLASS);
+ LLViewerTexture::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
+ LLViewerCamera::getInstance()->getAngularVelocityStat()->getMean());
+ }
- gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first.
+
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_BUMP);
+ gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first.
+ }
- F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time
- max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame)
- gTextureList.updateImages(max_image_decode_time);
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_LIST);
+ F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time
+ max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame)
+ gTextureList.updateImages(max_image_decode_time);
+ }
- //remove dead textures from GL
- LLImageGL::deleteDeadTextures();
- stop_glerror();
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_DELETE);
+ //remove dead textures from GL
+ LLImageGL::deleteDeadTextures();
+ stop_glerror();
+ }
}
LLGLState::checkStates();
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 764c247f01..ac489e0caf 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -188,6 +188,7 @@ LLGLSLShader gDeferredPostNoDoFProgram;
LLGLSLShader gDeferredWLSkyProgram;
LLGLSLShader gDeferredWLCloudProgram;
LLGLSLShader gDeferredStarProgram;
+LLGLSLShader gNormalMapGenProgram;
LLViewerShaderMgr::LLViewerShaderMgr() :
mVertexShaderLevel(SHADER_COUNT, 0),
@@ -275,6 +276,7 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gDeferredWLSkyProgram);
mShaderList.push_back(&gDeferredWLCloudProgram);
mShaderList.push_back(&gDeferredStarProgram);
+ mShaderList.push_back(&gNormalMapGenProgram);
}
LLViewerShaderMgr::~LLViewerShaderMgr()
@@ -1082,6 +1084,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWLSkyProgram.unload();
gDeferredWLCloudProgram.unload();
gDeferredStarProgram.unload();
+ gNormalMapGenProgram.unload();
return TRUE;
}
@@ -1532,6 +1535,17 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = gDeferredStarProgram.createShader(NULL, &mWLUniforms);
}
+ if (success)
+ {
+ gNormalMapGenProgram.mName = "Normal Map Generation Program";
+ gNormalMapGenProgram.mShaderFiles.clear();
+ gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenV.glsl", GL_VERTEX_SHADER_ARB));
+ gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gNormalMapGenProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ gNormalMapGenProgram.mShaderGroup = LLGLSLShader::SG_SKY;
+ success = gNormalMapGenProgram.createShader(NULL, NULL);
+ }
+
return success;
}
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 74708c94a7..5bcdf11be5 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -384,6 +384,6 @@ extern LLGLSLShader gDeferredAvatarAlphaProgram;
extern LLGLSLShader gDeferredWLSkyProgram;
extern LLGLSLShader gDeferredWLCloudProgram;
extern LLGLSLShader gDeferredStarProgram;
-
+extern LLGLSLShader gNormalMapGenProgram;
#endif
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 30ef8b8a29..487cdafd8f 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -586,6 +586,11 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image)
////////////////////////////////////////////////////////////////////////////
static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_PRIORITIES("Prioritize");
+static LLFastTimer::DeclareTimer FTM_IMAGE_CALLBACKS("Callbacks");
+static LLFastTimer::DeclareTimer FTM_IMAGE_FETCH("Fetch");
+static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create");
+static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats");
void LLViewerTextureList::updateImages(F32 max_time)
{
@@ -597,14 +602,25 @@ void LLViewerTextureList::updateImages(F32 max_time)
LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory));
LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
-
- updateImagesDecodePriorities();
+
+
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_PRIORITIES);
+ updateImagesDecodePriorities();
+ }
F32 total_max_time = max_time;
- max_time -= updateImagesFetchTextures(max_time);
+
+ {
+ LLFastTimer t(FTM_IMAGE_FETCH);
+ max_time -= updateImagesFetchTextures(max_time);
+ }
- max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time
- max_time -= updateImagesCreateTextures(max_time);
+ {
+ LLFastTimer t(FTM_IMAGE_CREATE);
+ max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time
+ max_time -= updateImagesCreateTextures(max_time);
+ }
if (!mDirtyTextureList.empty())
{
@@ -612,24 +628,32 @@ void LLViewerTextureList::updateImages(F32 max_time)
gPipeline.dirtyPoolObjectTextures(mDirtyTextureList);
mDirtyTextureList.clear();
}
- bool didone = false;
- for (image_list_t::iterator iter = mCallbackList.begin();
- iter != mCallbackList.end(); )
+
{
- //trigger loaded callbacks on local textures immediately
- LLViewerFetchedTexture* image = *iter++;
- if (!image->getUrl().empty())
+ LLFastTimer t(FTM_IMAGE_CALLBACKS);
+ bool didone = false;
+ for (image_list_t::iterator iter = mCallbackList.begin();
+ iter != mCallbackList.end(); )
{
- // Do stuff to handle callbacks, update priorities, etc.
- didone = image->doLoadedCallbacks();
- }
- else if (!didone)
- {
- // Do stuff to handle callbacks, update priorities, etc.
- didone = image->doLoadedCallbacks();
+ //trigger loaded callbacks on local textures immediately
+ LLViewerFetchedTexture* image = *iter++;
+ if (!image->getUrl().empty())
+ {
+ // Do stuff to handle callbacks, update priorities, etc.
+ didone = image->doLoadedCallbacks();
+ }
+ else if (!didone)
+ {
+ // Do stuff to handle callbacks, update priorities, etc.
+ didone = image->doLoadedCallbacks();
+ }
}
}
- updateImagesUpdateStats();
+
+ {
+ LLFastTimer t(FTM_IMAGE_STATS);
+ updateImagesUpdateStats();
+ }
}
void LLViewerTextureList::updateImagesDecodePriorities()
@@ -747,7 +771,6 @@ void LLViewerTextureList::updateImagesDecodePriorities()
return type_from_host;
}
*/
-static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create Images");
F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
{
@@ -757,8 +780,7 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
// Create GL textures for all textures that need them (images which have been
// decoded, but haven't been pushed into GL).
//
- LLFastTimer t(FTM_IMAGE_CREATE);
-
+
LLTimer create_timer;
image_list_t::iterator enditer = mCreateTextureList.begin();
for (image_list_t::iterator iter = mCreateTextureList.begin();
--
cgit v1.2.3
From 2b51a7a60942b1efc99cee43489ef2f92fa7a188 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 5 Oct 2011 17:57:13 -0500
Subject: SH-2454 Fix for head attachments not casting shadows when in
mouselook mode.
---
indra/newview/llspatialpartition.cpp | 4 ++++
indra/newview/pipeline.cpp | 22 ++++++++++++++++++++++
2 files changed, 26 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 8e22a9be2c..65a78d9048 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1613,6 +1613,8 @@ void LLSpatialGroup::checkOcclusion()
static LLFastTimer::DeclareTimer FTM_PUSH_OCCLUSION_VERTS("Push Occlusion");
static LLFastTimer::DeclareTimer FTM_SET_OCCLUSION_STATE("Occlusion State");
static LLFastTimer::DeclareTimer FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_ALLOCATE("Allocate");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_BUILD("Build");
void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
@@ -1636,11 +1638,13 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
if (!mOcclusionQuery[LLViewerCamera::sCurCameraID])
{
+ LLFastTimer t(FTM_OCCLUSION_ALLOCATE);
mOcclusionQuery[LLViewerCamera::sCurCameraID] = sQueryPool.allocate();
}
if (mOcclusionVerts.isNull() || isState(LLSpatialGroup::OCCLUSION_DIRTY))
{
+ LLFastTimer t(FTM_OCCLUSION_BUILD);
buildOcclusion();
}
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index e672f7c4f1..83f9863224 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8300,6 +8300,17 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
return;
}
+ BOOL skip_avatar_update = FALSE;
+ if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
+ {
+ skip_avatar_update = TRUE;
+ }
+
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
+ }
+
F64 last_modelview[16];
F64 last_projection[16];
for (U32 i = 0; i < 16; i++)
@@ -8413,6 +8424,12 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
mShadowFrustPoints[3].clear();
}
popRenderTypeMask();
+
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
+ }
+
return;
}
@@ -9001,6 +9018,11 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
}
popRenderTypeMask();
+
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
+ }
}
void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture)
--
cgit v1.2.3
From d66a999d1de3fbc77eb31aeb07ddc1e20d19647a Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Thu, 6 Oct 2011 13:10:01 -0400
Subject: SH-2515 WIP - uninstall viewer 2 when installing viewer 3+
---
.../installers/windows/installer_template.nsi | 42 +++++++++++++++++-----
1 file changed, 33 insertions(+), 9 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index abd2e7f7c5..1b07961e1c 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -408,9 +408,9 @@ Push $2
; Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
- RMDir /r "$2\Application Data\SecondLifeRestore\"
- CreateDirectory "$2\Application Data\SecondLifeRestore\"
- CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLifeRestore\"
+ RMDir /r "$2\Application Data\SecondLife\"
+ CreateDirectory "$2\Application Data\SecondLife\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\"
CONTINUE:
IntOp $0 $0 + 1
@@ -425,9 +425,9 @@ Pop $0
Push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
StrCmp $0 "" +2
- RMDir /r "$2\Application Data\SecondLifeRestore\"
- CreateDirectory "$2\Application Data\SecondLifeRestore\"
- CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLifeRestore\"
+ RMDir /r "$2\Application Data\SecondLife\"
+ CreateDirectory "$2\Application Data\SecondLife\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\"
Pop $0
FunctionEnd
@@ -863,10 +863,8 @@ Call CheckNetworkConnection ; ping secondlife.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
-
-Call PreserveCacheFiles
-Call RestoreCacheFiles
; VFS and cache files.
+Call PreserveCacheFiles
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Need to clean out shader files from previous installs to fix DEV-5663
@@ -948,6 +946,32 @@ WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" ""
; write out uninstaller
WriteUninstaller "$INSTDIR\uninst.exe"
+; Remove existing "Second Life Viewer 2" install if any.
+StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" SLV2_DONE
+IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SLV2_FOUND SLV2_DONE
+
+SLV2_FOUND:
+ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S'
+
+; cheesy spin wait for uninstall to finish - uninstaller is supposed
+; to take _? argument which combined with ExecWait would avoid need
+; for this, but have not been able to get it to work.
+SPIN_LOOP:
+Sleep 500
+IntOp $0 $0 + 500
+IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
+SLV2_TIMEOUT:
+MsgBox MB_OK "Error in uninstall"
+Goto SLV2_DONE
+
+CONT:
+; Do we know this is the last file removed?
+IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
+
+SLV2_DONE:
+MessageBox MB_OK "Restoring Cache Files"
+Call RestoreCacheFiles
+
; end of default section
SectionEnd
--
cgit v1.2.3
From e76eaa8b2a1f49e45d009379aaf36f8e62b6273a Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 13:48:10 -0500
Subject: Fix for busted settings.xml (thanks TankMaster Finesmith)
---
indra/newview/app_settings/settings.xml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 110e3e3d04..e7ff584b38 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9075,9 +9075,7 @@
1
Type
Boolean
- Va
-
- lue
+ Value
1
RenderPreferStreamDraw
--
cgit v1.2.3
From 40fe25632c62ab6a8bbb817149c159295b365d59 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 15:00:14 -0500
Subject: SH-2553 Fix for glitches when rendering HUD attachments.
---
indra/newview/llviewerdisplay.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 835f16d086..7220f2a20f 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1359,7 +1359,12 @@ void render_ui_3d()
}
stop_glerror();
-
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
gViewerWindow->renderSelections(FALSE, FALSE, TRUE); // Non HUD call in render_hud_elements
stop_glerror();
}
--
cgit v1.2.3
From a90ea46804d1fdb60d44178140b12e341c715178 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 15:34:28 -0500
Subject: SH-2240 Fix for beacons not rendering (or crashing when rendered)
---
indra/newview/llglsandbox.cpp | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 8c872283bd..844d7ba41c 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -777,6 +777,11 @@ void LLViewerObjectList::renderObjectBeacons()
LLGLSUIDefault gls_ui;
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
--
cgit v1.2.3
From fba8afd7b27ebc362af7b26b1f1fb2917deae920 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 16:43:19 -0500
Subject: SH-2454 Fix for attachments casting shadows/showing up in water when
"show me in mouselook" is disabled
---
indra/newview/pipeline.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 83f9863224..d28bb1f64e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7612,11 +7612,11 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
{
BOOL skip_avatar_update = FALSE;
- if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
+ if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
skip_avatar_update = TRUE;
}
-
+
if (!skip_avatar_update)
{
gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
@@ -8301,7 +8301,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
}
BOOL skip_avatar_update = FALSE;
- if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
+ if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
skip_avatar_update = TRUE;
}
--
cgit v1.2.3
From f2fc69c65650bf5db4f0ea098be7bd5fe37f224d Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 17:31:59 -0500
Subject: SH-2240 Fix for crash when rendering beacons and Debug GL enabled --
flush every 128 beacons to keep from hitting the end of the immediate mode
wrapper buffer.
---
indra/newview/llglsandbox.cpp | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 844d7ba41c..3f773effcb 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -789,6 +789,8 @@ void LLViewerObjectList::renderObjectBeacons()
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
BOOL flush = FALSE;
+ S32 flush_me = 128;
+
for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -818,6 +820,14 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY] + 2.f,thisline.mV[VZ]);
draw_line_cube(0.10f, thisline);
+
+ if (--flush_me <= 0)
+ {
+ flush_me = 128;
+ gGL.end();
+ gGL.flush();
+ gGL.begin(LLRender::LINES);
+ }
}
gGL.end();
}
@@ -830,6 +840,8 @@ void LLViewerObjectList::renderObjectBeacons()
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
BOOL flush = FALSE;
+ S32 flush_me = 128;
+
for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -858,6 +870,14 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY] + 0.5f,thisline.mV[VZ]);
draw_line_cube(0.10f, thisline);
+
+ if (--flush_me <= 0)
+ {
+ flush_me = 128;
+ gGL.end();
+ gGL.flush();
+ gGL.begin(LLRender::LINES);
+ }
}
gGL.end();
--
cgit v1.2.3
From 0fcef13ab8ee947c1cb472407cbfe891a55043ad Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Thu, 6 Oct 2011 18:50:31 -0400
Subject: SH-2515 WIP
---
indra/newview/installers/windows/installer_template.nsi | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 1b07961e1c..fcc187dc6f 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -505,6 +505,7 @@ Push $2
; If uninstalling a normal install remove everything
; Otherwise (preview/dmz etc) just remove cache
+ MessageBox MB_OK 'RM_ALL points at "$2\Application Data\SecondLife"'
StrCmp $INSTFLAGS "" RM_ALL RM_CACHE
RM_ALL:
RMDir /r "$2\Application Data\SecondLife"
@@ -957,16 +958,16 @@ ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S'
; to take _? argument which combined with ExecWait would avoid need
; for this, but have not been able to get it to work.
SPIN_LOOP:
-Sleep 500
-IntOp $0 $0 + 500
-IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
+ Sleep 500
+ IntOp $0 $0 + 500
+ IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
SLV2_TIMEOUT:
-MsgBox MB_OK "Error in uninstall"
-Goto SLV2_DONE
+;; MessageBox /SD IDOK MB_OK "Error in uninstall of Second Life Viewer 2"
+ Goto SLV2_DONE
CONT:
-; Do we know this is the last file removed?
-IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
+ ; Do we know this is the last file removed?
+ IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
SLV2_DONE:
MessageBox MB_OK "Restoring Cache Files"
--
cgit v1.2.3
From c834bdd05a134d6b3442a31f351a94f21965d4e9 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 17:54:06 -0500
Subject: SH-2240 Better fix for beacon rendering -- let LLRender take care of
optimization around joining chunks of line segments together into one draw
call
---
indra/newview/llglsandbox.cpp | 41 ++++++-----------------------------------
1 file changed, 6 insertions(+), 35 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 3f773effcb..ac87da2d71 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -788,9 +788,6 @@ void LLViewerObjectList::renderObjectBeacons()
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- BOOL flush = FALSE;
- S32 flush_me = 128;
-
for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -799,18 +796,14 @@ void LLViewerObjectList::renderObjectBeacons()
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (flush)
- {
- gGL.end();
- }
- flush = TRUE;
gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
- gGL.begin(LLRender::LINES);
}
const LLVector3 &thisline = debug_beacon.mPositionAgent;
+
+ gGL.begin(LLRender::LINES);
gGL.color4fv(color.mV);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] - 50.f);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] + 50.f);
@@ -820,16 +813,9 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY] + 2.f,thisline.mV[VZ]);
draw_line_cube(0.10f, thisline);
-
- if (--flush_me <= 0)
- {
- flush_me = 128;
- gGL.end();
- gGL.flush();
- gGL.begin(LLRender::LINES);
- }
+
+ gGL.end();
}
- gGL.end();
}
{
@@ -839,9 +825,6 @@ void LLViewerObjectList::renderObjectBeacons()
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- BOOL flush = FALSE;
- S32 flush_me = 128;
-
for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -849,18 +832,13 @@ void LLViewerObjectList::renderObjectBeacons()
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (flush)
- {
- gGL.end();
- }
- flush = TRUE;
gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
- gGL.begin(LLRender::LINES);
}
const LLVector3 &thisline = debug_beacon.mPositionAgent;
+ gGL.begin(LLRender::LINES);
gGL.color4fv(debug_beacon.mColor.mV);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] - 0.5f);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] + 0.5f);
@@ -871,16 +849,9 @@ void LLViewerObjectList::renderObjectBeacons()
draw_line_cube(0.10f, thisline);
- if (--flush_me <= 0)
- {
- flush_me = 128;
- gGL.end();
- gGL.flush();
- gGL.begin(LLRender::LINES);
- }
+ gGL.end();
}
- gGL.end();
gGL.flush();
glLineWidth(1.f);
--
cgit v1.2.3
From 63fdeb14ef74bed9c96092296015e69b6557f3ea Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Thu, 6 Oct 2011 23:00:33 -0400
Subject: SH-2515 WIP, STORM-280 WIP - ported over Oz fix for cache
overdeletion during uninstall
---
.../installers/windows/installer_template.nsi | 134 +++++++++++++++++++--
1 file changed, 121 insertions(+), 13 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index fcc187dc6f..03280328f3 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -1,6 +1,22 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; secondlife setup.nsi
-;; Copyright 2004-2010, Linden Research, Inc.
+;; Copyright 2004-2011, Linden Research, Inc.
+;;
+;; This library is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU Lesser General Public
+;; License as published by the Free Software Foundation;
+;; version 2.1 of the License only.
+;;
+;; This library is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; Lesser General Public License for more details.
+;;
+;; You should have received a copy of the GNU Lesser General Public
+;; License along with this library; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+;;
+;; Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
;;
;; NSIS Unicode 2.38.1 or higher required
;; http://www.scratchpaper.com/
@@ -293,6 +309,97 @@ Function CheckNetworkConnection
Return
FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Save files from cache
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function PreserveCacheFiles
+
+Push $0
+Push $1
+Push $2
+
+ RMDir /r "$TEMP\SecondLifeSettingsBackup"
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup"
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0"
+ CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+ CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+Pop $0
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Restore files from cache
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function RestoreCacheFiles
+
+Push $0
+Push $1
+Push $2
+
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ RMDir /r "$2\Application Data\SecondLifeRestore\"
+ CreateDirectory "$2\Application Data\SecondLifeRestore\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLifeRestore\"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ RMDir /r "$2\Application Data\SecondLifeRestore\"
+ CreateDirectory "$2\Application Data\SecondLifeRestore\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLifeRestore\"
+Pop $0
+
+FunctionEnd
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Delete files in Documents and Settings\\SecondLife\cache
; Delete files in Documents and Settings\All Users\SecondLife\cache
@@ -503,18 +610,15 @@ Push $2
; Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
- ; If uninstalling a normal install remove everything
- ; Otherwise (preview/dmz etc) just remove cache
- MessageBox MB_OK 'RM_ALL points at "$2\Application Data\SecondLife"'
- StrCmp $INSTFLAGS "" RM_ALL RM_CACHE
- RM_ALL:
- RMDir /r "$2\Application Data\SecondLife"
- RM_CACHE:
- # Local Settings directory is the cache, there is no "cache" subdir
- RMDir /r "$2\Local Settings\Application Data\SecondLife"
- # Vista version of the same
- RMDir /r "$2\AppData\Local\SecondLife"
- Delete "$2\Application Data\SecondLife\user_settings\settings_windlight.xml"
+ ; Remove all cache and settings files but leave any other .txt files to preserve the chat logs
+ RMDir /r "$2\Application Data\SecondLife\logs"
+ RMDir /r "$2\Application Data\SecondLife\browser_profile"
+ RMDir /r "$2\Application Data\SecondLife\user_settings"
+ Delete "$2\Application Data\SecondLife\*.xml"
+ Delete "$2\Application Data\SecondLife\*.bmp"
+ Delete "$2\Application Data\SecondLife\search_history.txt"
+ Delete "$2\Application Data\SecondLife\plugin_cookies.txt"
+ Delete "$2\Application Data\SecondLife\typed_locations.txt"
CONTINUE:
IntOp $0 $0 + 1
@@ -862,6 +966,10 @@ Call CloseSecondLife ; Make sure we're not running
Call CheckNetworkConnection ; ping secondlife.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Call PreserveCacheFiles
+
+Call RestoreCacheFiles
+
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
; VFS and cache files.
--
cgit v1.2.3
From 79912f9d3f0807529183521f69f989f947c1cff1 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 7 Oct 2011 03:12:11 -0500
Subject: SH-2031 Profile guided optimization of matrix ops - don't use F64
except where needed (should really factor out calls to gluProject) - get rid
of sorting by texture in favor of sorting by matrix (no sort needed, geometry
is already matrix sorted as a result of frustum cull tree traversal order) -
unroll matrix sync inner loop and cache MVP and normal matrices
---
indra/newview/llhudrender.cpp | 12 ++++++++-
indra/newview/llselectmgr.cpp | 2 +-
indra/newview/llviewercamera.cpp | 58 +++++++++++++++++++++++++++++-----------
indra/newview/pipeline.cpp | 28 +++++--------------
indra/newview/pipeline.h | 2 +-
5 files changed, 61 insertions(+), 41 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 607f7f7f4b..122711a86d 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -107,8 +107,18 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
viewport[1] = world_view_rect.mBottom;
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
gluProject(render_pos.mV[0], render_pos.mV[1], render_pos.mV[2],
- gGLModelView, gGLProjection, (GLint*) viewport,
+ mdlv, proj, (GLint*) viewport,
&winX, &winY, &winZ);
//fonts all render orthographically, set up projection``
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 3a50eeb1c9..2971ee710a 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -4838,7 +4838,7 @@ void LLSelectMgr::processForceObjectSelect(LLMessageSystem* msg, void**)
LLSelectMgr::getInstance()->highlightObjectAndFamily(objects);
}
-extern LLGLdouble gGLModelView[16];
+extern F32 gGLModelView[16];
void LLSelectMgr::updateSilhouettes()
{
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index c0ef4da1ff..a437a8b3b5 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -218,8 +218,15 @@ void LLViewerCamera::calcProjection(const F32 far_distance) const
void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zflip, BOOL no_hacks)
{
GLint* viewport = (GLint*) gGLViewport;
- GLdouble* model = gGLModelView;
- GLdouble* proj = gGLProjection;
+ F64 model[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ model[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
GLdouble objX,objY,objZ;
LLVector3 frust[8];
@@ -420,7 +427,6 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
if (!for_selection && mZoomFactor == 1.f)
{
// Save GL matrices for access elsewhere in code, especially project_world_to_screen
- //glGetDoublev(GL_MODELVIEW_MATRIX, gGLModelView);
for (U32 i = 0; i < 16; i++)
{
gGLModelView[i] = modelview.m[i];
@@ -428,14 +434,6 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
}
updateFrustumPlanes(*this);
-
- /*if (gSavedSettings.getBOOL("CameraOffset"))
- {
- gGL.matrixMode(LLRender::MM_PROJECTION);
- gGL.translatef(0,0,-50);
- gGL.rotatef(20.0,1,0,0);
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- }*/
}
@@ -443,11 +441,20 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
// screen coordinates to the agent's region.
void LLViewerCamera::projectScreenToPosAgent(const S32 screen_x, const S32 screen_y, LLVector3* pos_agent) const
{
-
GLdouble x, y, z;
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
gluUnProject(
GLdouble(screen_x), GLdouble(screen_y), 0.0,
- gGLModelView, gGLProjection, (GLint*)gGLViewport,
+ mdlv, proj, (GLint*)gGLViewport,
&x,
&y,
&z );
@@ -484,8 +491,17 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
if (GL_TRUE == gluProject(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ],
- gGLModelView, gGLProjection, (GLint*)viewport,
+ mdlv, proj, (GLint*)viewport,
&x, &y, &z))
{
// convert screen coordinates to virtual UI coordinates
@@ -587,9 +603,19 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
GLdouble x, y, z; // object's window coords, GL-style
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
if (GL_TRUE == gluProject(pos_agent.mV[VX], pos_agent.mV[VY],
- pos_agent.mV[VZ], gGLModelView,
- gGLProjection, (GLint*)viewport,
+ pos_agent.mV[VZ], mdlv,
+ proj, (GLint*)viewport,
&x, &y, &z))
{
x /= gViewerWindow->getDisplayScale().mV[VX];
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d28bb1f64e..42873dbca8 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -201,13 +201,10 @@ U32 nhpo2(U32 v)
return r;
}
-glh::matrix4f glh_copy_matrix(GLdouble* src)
+glh::matrix4f glh_copy_matrix(F32* src)
{
glh::matrix4f ret;
- for (U32 i = 0; i < 16; i++)
- {
- ret.m[i] = (F32) src[i];
- }
+ ret.set_value(src);
return ret;
}
@@ -231,7 +228,7 @@ glh::matrix4f glh_get_last_projection()
return glh_copy_matrix(gGLLastProjection);
}
-void glh_copy_matrix(const glh::matrix4f& src, GLdouble* dst)
+void glh_copy_matrix(const glh::matrix4f& src, F32* dst)
{
for (U32 i = 0; i < 16; i++)
{
@@ -3171,19 +3168,6 @@ void LLPipeline::postSort(LLCamera& camera)
if (!sShadowRender)
{
- //sort by texture or bump map
- for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; ++i)
- {
- if (i == LLRenderPass::PASS_BUMP)
- {
- std::sort(sCull->beginRenderMap(i), sCull->endRenderMap(i), LLDrawInfo::CompareBump());
- }
- else
- {
- std::sort(sCull->beginRenderMap(i), sCull->endRenderMap(i), LLDrawInfo::CompareTexturePtrMatrix());
- }
- }
-
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
}
llpushcallstacks ;
@@ -3503,8 +3487,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
assertInitialized();
- F64 saved_modelview[16];
- F64 saved_projection[16];
+ F32 saved_modelview[16];
+ F32 saved_projection[16];
//HACK: preserve/restore matrices around HUD render
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
@@ -6768,7 +6752,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
{
cube_map->enable(channel);
cube_map->bind();
- F64* m = gGLModelView;
+ F32* m = gGLModelView;
F32 mat[] = { m[0], m[1], m[2],
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index d24bab747b..86579261ca 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -72,7 +72,7 @@ BOOL compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn
bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon = 0);
BOOL setup_hud_matrices(); // use whole screen to render hud
BOOL setup_hud_matrices(const LLRect& screen_region); // specify portion of screen (in pixels) to render hud attachments from (for picking)
-glh::matrix4f glh_copy_matrix(GLdouble* src);
+glh::matrix4f glh_copy_matrix(F32* src);
glh::matrix4f glh_get_current_modelview();
void glh_set_current_modelview(const glh::matrix4f& mat);
glh::matrix4f glh_get_current_projection();
--
cgit v1.2.3
From 9cf4a4322b75a4d8fdc618c8f1edbf945c2f25b3 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 7 Oct 2011 16:45:21 -0500
Subject: SH-2240 No more assertions when rendering debug displays.
---
indra/newview/llspatialpartition.cpp | 100 ++++++++++++++++++-----------------
indra/newview/llviewerjoint.cpp | 2 +-
2 files changed, 52 insertions(+), 50 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 65a78d9048..ffb0ce4056 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -48,6 +48,7 @@
#include "llvolumemgr.h"
#include "lltextureatlas.h"
#include "llglslshader.h"
+#include "llviewershadermgr.h"
static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling");
static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound");
@@ -2543,7 +2544,7 @@ void renderOctree(LLSpatialGroup* group)
LLGLDepthTest gl_depth(FALSE, FALSE);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- gGL.color4f(1,0,0,group->mBuilt);
+ gGL.diffuseColor4f(1,0,0,group->mBuilt);
gGL.flush();
glLineWidth(5.f);
drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
@@ -2591,7 +2592,7 @@ void renderOctree(LLSpatialGroup* group)
}
}
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
}
}
else*/
@@ -2607,7 +2608,7 @@ void renderOctree(LLSpatialGroup* group)
}
}
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
LLVector4a fudge;
fudge.splat(0.001f);
LLVector4a size = group->mObjectBounds[1];
@@ -2624,16 +2625,16 @@ void renderOctree(LLSpatialGroup* group)
//if (group->mBuilt <= 0.f)
{
//draw opaque outline
- //gGL.color4f(col.mV[0], col.mV[1], col.mV[2], 1.f);
+ //gGL.diffuseColor4f(col.mV[0], col.mV[1], col.mV[2], 1.f);
//drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
- gGL.color4f(0,1,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
drawBoxOutline(group->mBounds[0],group->mBounds[1]);
//draw bounding box for draw info
/*if (group->mSpatialPartition->mRenderByGroup)
{
- gGL.color4f(1.0f, 0.75f, 0.25f, 0.6f);
+ gGL.diffuseColor4f(1.0f, 0.75f, 0.25f, 0.6f);
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
@@ -2652,7 +2653,7 @@ void renderOctree(LLSpatialGroup* group)
}
// LLSpatialGroup::OctreeNode* node = group->mOctreeNode;
-// gGL.color4f(0,1,0,1);
+// gGL.diffuseColor4f(0,1,0,1);
// drawBoxOutline(LLVector3(node->getCenter()), LLVector3(node->getSize()));
}
@@ -2665,11 +2666,12 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
BOOL render_objects = (!LLPipeline::sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) && group->isVisible() &&
!group->getData().empty();
+
if (render_objects)
{
LLGLDepthTest depth_under(GL_TRUE, GL_FALSE, GL_GREATER);
gGL.diffuseColor4f(0, 0.5f, 0, 0.5f);
- gGL.color4f(0, 0.5f, 0, 0.5f);
+ gGL.diffuseColor4f(0, 0.5f, 0, 0.5f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
@@ -2679,7 +2681,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
if (render_objects)
{
gGL.diffuseColor4f(0.f, 0.5f, 0.f,1.f);
- gGL.color4f(0.f, 0.5f, 0.f, 1.f);
+ gGL.diffuseColor4f(0.f, 0.5f, 0.f, 1.f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
@@ -2688,7 +2690,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
if (render_objects)
{
gGL.diffuseColor4f(0.f, 0.75f, 0.f,0.5f);
- gGL.color4f(0.f, 0.75f, 0.f, 0.5f);
+ gGL.diffuseColor4f(0.f, 0.75f, 0.f, 0.5f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
/*else if (camera && group->mOcclusionVerts.notNull())
@@ -2709,7 +2711,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
void renderCrossHairs(LLVector3 position, F32 size, LLColor4 color)
{
- gGL.color4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
gGL.begin(LLRender::LINES);
{
gGL.vertex3fv((position - LLVector3(size, 0.f, 0.f)).mV);
@@ -2881,17 +2883,17 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
{
if (drawable->isSpatialBridge())
{
- gGL.color4f(1,0.5f,0,1);
+ gGL.diffuseColor4f(1,0.5f,0,1);
}
else if (drawable->getVOVolume())
{
if (drawable->isRoot())
{
- gGL.color4f(1,1,0,1);
+ gGL.diffuseColor4f(1,1,0,1);
}
else
{
- gGL.color4f(0,1,0,1);
+ gGL.diffuseColor4f(0,1,0,1);
}
}
else if (drawable->getVObj())
@@ -2899,30 +2901,30 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
switch (drawable->getVObj()->getPCode())
{
case LLViewerObject::LL_VO_SURFACE_PATCH:
- gGL.color4f(0,1,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
break;
case LLViewerObject::LL_VO_CLOUDS:
// no longer used
break;
case LLViewerObject::LL_VO_PART_GROUP:
case LLViewerObject::LL_VO_HUD_PART_GROUP:
- gGL.color4f(0,0,1,1);
+ gGL.diffuseColor4f(0,0,1,1);
break;
case LLViewerObject::LL_VO_VOID_WATER:
case LLViewerObject::LL_VO_WATER:
- gGL.color4f(0,0.5f,1,1);
+ gGL.diffuseColor4f(0,0.5f,1,1);
break;
case LL_PCODE_LEGACY_TREE:
- gGL.color4f(0,0.5f,0,1);
+ gGL.diffuseColor4f(0,0.5f,0,1);
break;
default:
- gGL.color4f(1,0,1,1);
+ gGL.diffuseColor4f(1,0,1,1);
break;
}
}
else
{
- gGL.color4f(1,0,0,1);
+ gGL.diffuseColor4f(1,0,0,1);
}
}
@@ -2996,7 +2998,7 @@ void renderNormals(LLDrawable* drawablep)
n.setMul(face.mNormals[j], scale);
p.setAdd(face.mPositions[j], n);
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
gGL.vertex3fv(face.mPositions[j].getF32ptr());
gGL.vertex3fv(p.getF32ptr());
@@ -3005,7 +3007,7 @@ void renderNormals(LLDrawable* drawablep)
n.setMul(face.mBinormals[j], scale);
p.setAdd(face.mPositions[j], n);
- gGL.color4f(0,1,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
gGL.vertex3fv(face.mPositions[j].getF32ptr());
gGL.vertex3fv(p.getF32ptr());
}
@@ -3063,7 +3065,7 @@ void renderMeshBaseHull(LLVOVolume* volume, U32 data_mask, LLColor4& color, LLCo
}
else
{
- gGL.color3f(1,0,1);
+ gGL.diffuseColor3f(1,0,1);
drawBoxOutline(center, size);
}
}
@@ -3179,7 +3181,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
else
{
- gGL.color3f(1,1,0);
+ gGL.diffuseColor3f(1,1,0);
drawBoxOutline(center, size);
}
}
@@ -3315,7 +3317,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
LLVector3 vscale = volume->getScale()*2.f;
scale.set(scale[0]/vscale[0], scale[1]/vscale[1], scale[2]/vscale[2]);
- gGL.color4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
drawBox(center, scale);
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::SPHERE)
@@ -3385,7 +3387,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
else
{
- gGL.color3f(1,0,1);
+ gGL.diffuseColor3f(1,0,1);
drawBoxOutline(center, size);
gMeshRepo.buildHull(volume_params, detail);
}
@@ -3481,11 +3483,11 @@ void renderTexturePriority(LLDrawable* drawable)
F32 t = vsize/sLastMaxTexPriority;
LLVector4 col = lerp(cold, hot, t);
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
}
//else
//{
- // gGL.color4f(1,0,1,1);
+ // gGL.diffuseColor4f(1,0,1,1);
//}
LLVector4a center;
@@ -3504,7 +3506,7 @@ void renderTexturePriority(LLDrawable* drawable)
LLVector4 col = lerp(boost_cold, boost_hot, t);
LLGLEnable blend_on(GL_BLEND);
gGL.blendFunc(GL_SRC_ALPHA, GL_ONE);
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
drawBox(center, size);
gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}*/
@@ -3517,7 +3519,7 @@ void renderPoints(LLDrawable* drawablep)
if (drawablep->getNumFaces())
{
gGL.begin(LLRender::POINTS);
- gGL.color3f(1,1,1);
+ gGL.diffuseColor3f(1,1,1);
for (S32 i = 0; i < drawablep->getNumFaces(); i++)
{
gGL.vertex3fv(drawablep->getFace(i)->mCenterLocal.mV);
@@ -3542,7 +3544,7 @@ void renderBatchSize(LLDrawInfo* params)
{
LLGLEnable offset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.f, 1.f);
- glColor3ubv((GLubyte*) &(params->mDebugColor));
+ gGL.diffuseColor4ubv((GLubyte*) &(params->mDebugColor));
pushVerts(params, LLVertexBuffer::MAP_VERTEX);
}
@@ -3611,11 +3613,11 @@ void renderLights(LLDrawable* drawablep)
{
LLGLDepthTest depth(GL_FALSE, GL_TRUE);
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
drawBoxOutline(pos, size);
}
- gGL.color4f(1,1,0,1);
+ gGL.diffuseColor4f(1,1,0,1);
F32 rad = drawablep->getVOVolume()->getLightRadius();
drawBoxOutline(pos, LLVector4a(rad));
}
@@ -3640,13 +3642,13 @@ public:
if (branch->getData().empty())
{
- gGL.color3f(1.f,0.2f,0.f);
+ gGL.diffuseColor3f(1.f,0.2f,0.f);
center.set(branch->getCenter().getF32ptr());
size.set(branch->getSize().getF32ptr());
}
else
{
- gGL.color3f(0.75f, 1.f, 0.f);
+ gGL.diffuseColor3f(0.75f, 1.f, 0.f);
center.set(vl->mBounds[0].getF32ptr());
size.set(vl->mBounds[1].getF32ptr());
}
@@ -3659,11 +3661,11 @@ public:
if (i == 1)
{
- gGL.color4f(0,1,1,0.5f);
+ gGL.diffuseColor4f(0,1,1,0.5f);
}
else
{
- gGL.color4f(0,0.5f,0.5f, 0.25f);
+ gGL.diffuseColor4f(0,0.5f,0.5f, 0.25f);
drawBoxOutline(center, size);
}
@@ -3700,7 +3702,7 @@ void renderRaycast(LLDrawable* drawablep)
if (drawablep->getNumFaces())
{
LLGLEnable blend(GL_BLEND);
- gGL.color4f(0,1,1,0.5f);
+ gGL.diffuseColor4f(0,1,1,0.5f);
if (drawablep->getVOVolume())
{
@@ -3796,11 +3798,11 @@ void renderRaycast(LLDrawable* drawablep)
orient.getRotMatrixToParent(rotation);
gGL.multMatrix((float*)rotation.mMatrix);
- gGL.color4f(1,0,0,0.5f);
+ gGL.diffuseColor4f(1,0,0,0.5f);
drawBox(LLVector3(0, 0, 0), LLVector3(0.1f, 0.022f, 0.022f));
- gGL.color4f(0,1,0,0.5f);
+ gGL.diffuseColor4f(0,1,0,0.5f);
drawBox(LLVector3(0, 0, 0), LLVector3(0.021f, 0.1f, 0.021f));
- gGL.color4f(0,0,1,0.5f);
+ gGL.diffuseColor4f(0,0,1,0.5f);
drawBox(LLVector3(0, 0, 0), LLVector3(0.02f, 0.02f, 0.1f));
gGL.popMatrix();
@@ -3815,7 +3817,7 @@ void renderRaycast(LLDrawable* drawablep)
size.mul(0.5f);
LLGLDepthTest depth(GL_FALSE, GL_TRUE);
- gGL.color4f(0,0.5f,0.5f,1);
+ gGL.diffuseColor4f(0,0.5f,0.5f,1);
drawBoxOutline(pos, size);
}
}
@@ -3884,7 +3886,7 @@ public:
stop_glerror();
gGLLastMatrix = NULL;
gGL.popMatrix();
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
}
}
}
@@ -3908,7 +3910,7 @@ public:
{
if (!group->getData().empty())
{
- gGL.color3f(0,0,1);
+ gGL.diffuseColor3f(0,0,1);
drawBoxOutline(group->mObjectBounds[0],
group->mObjectBounds[1]);
}
@@ -3917,7 +3919,7 @@ public:
for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getData().begin(); i != branch->getData().end(); ++i)
{
LLDrawable* drawable = *i;
-
+
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BBOXES))
{
renderBoundingBox(drawable);
@@ -3932,7 +3934,7 @@ public:
{
if (drawable->isState(LLDrawable::IN_REBUILD_Q2))
{
- gGL.color4f(0.6f, 0.6f, 0.1f, 1.f);
+ gGL.diffuseColor4f(0.6f, 0.6f, 0.1f, 1.f);
const LLVector4a* ext = drawable->getSpatialExtents();
LLVector4a center;
center.setAdd(ext[0], ext[1]);
@@ -4227,7 +4229,7 @@ void LLSpatialPartition::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
- gUIProgram.bind();
+ gDebugProgram.bind();
}
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY))
@@ -4261,13 +4263,13 @@ void LLSpatialPartition::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
- gUIProgram.unbind();
+ gDebugProgram.unbind();
}
}
void LLSpatialGroup::drawObjectBox(LLColor4 col)
{
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
LLVector4a size;
size = mObjectBounds[1];
size.mul(1.01f);
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index f2e49ff270..a907f102f8 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -543,7 +543,7 @@ void LLViewerJointCollisionVolume::renderCollision()
gGL.pushMatrix();
gGL.multMatrix( &mXform.getWorldMatrix().mMatrix[0][0] );
- gGL.color3f( 0.f, 0.f, 1.f );
+ gGL.diffuseColor3f( 0.f, 0.f, 1.f );
gGL.begin(LLRender::LINES);
--
cgit v1.2.3
From cffcb414f57bcdc7de862d791f8f9c1fea91a7fb Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 7 Oct 2011 17:44:57 -0500
Subject: SH-2488 Fix for shiny and alpha not interacting well on rigged
attachments (and fix for assertion when rendering model import preview)
---
indra/newview/lldrawpoolavatar.cpp | 13 +++++++++++--
indra/newview/llfloatermodelpreview.cpp | 9 +++++++++
2 files changed, 20 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index d9b0b195f5..a710bdcdbd 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1275,10 +1275,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
U32 data_mask = face->getRiggedVertexBufferDataMask();
- S32 num_verts = (vol_face.mNumVertices + 0xF) & ~0xF;
if (buffer.isNull() ||
buffer->getTypeMask() != data_mask ||
- buffer->getRequestedVerts() != num_verts ||
+ buffer->getRequestedVerts() != vol_face.mNumVertices ||
buffer->getRequestedIndices() != vol_face.mNumIndices ||
(drawable && drawable->isState(LLDrawable::REBUILD_ALL)))
{
@@ -1318,6 +1317,16 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLMatrix3 mat_normal(mat3);
+ //let getGeometryVolume know if alpha should override shiny
+ if (face->getFaceColor().mV[3] < 1.f)
+ {
+ face->setPoolType(LLDrawPool::POOL_ALPHA);
+ }
+ else
+ {
+ face->setPoolType(LLDrawPool::POOL_AVATAR);
+ }
+
face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true);
buffer->flush();
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 2a834ea11f..d9ce72a2c2 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -5409,7 +5409,16 @@ BOOL LLModelPreview::render()
if (joint_positions)
{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ if (shader)
+ {
+ gDebugProgram.bind();
+ }
getPreviewAvatar()->renderCollisionVolumes();
+ if (shader)
+ {
+ shader->bind();
+ }
}
for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter)
--
cgit v1.2.3
From c686e8b46d5624f384456c7b099b1d97f003079d Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Sat, 8 Oct 2011 17:26:54 -0400
Subject: Preserve logs and user_settings on uninstall
---
indra/newview/installers/windows/installer_template.nsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 03280328f3..a4f7ab7c51 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -611,9 +611,9 @@ Push $2
ExpandEnvStrings $2 $2
; Remove all cache and settings files but leave any other .txt files to preserve the chat logs
- RMDir /r "$2\Application Data\SecondLife\logs"
+; RMDir /r "$2\Application Data\SecondLife\logs"
RMDir /r "$2\Application Data\SecondLife\browser_profile"
- RMDir /r "$2\Application Data\SecondLife\user_settings"
+; RMDir /r "$2\Application Data\SecondLife\user_settings"
Delete "$2\Application Data\SecondLife\*.xml"
Delete "$2\Application Data\SecondLife\*.bmp"
Delete "$2\Application Data\SecondLife\search_history.txt"
@@ -636,7 +636,7 @@ Push $0
RMDir /r "$0\SecondLife"
Pop $0
-; Delete filse in C:\Windows\Application Data\SecondLife
+; Delete files in C:\Windows\Application Data\SecondLife
; If the user is running on a pre-NT system, Application Data lives here instead of
; in Documents and Settings.
RMDir /r "$WINDIR\Application Data\SecondLife"
--
cgit v1.2.3
From 6180d571376ee6719bcc01804d0277d51359609e Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Sat, 8 Oct 2011 17:28:44 -0400
Subject: CHOP-280 FIX - remove settings on uninstall
---
indra/newview/installers/windows/installer_template.nsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index a4f7ab7c51..32ae2a8a15 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -613,7 +613,7 @@ Push $2
; Remove all cache and settings files but leave any other .txt files to preserve the chat logs
; RMDir /r "$2\Application Data\SecondLife\logs"
RMDir /r "$2\Application Data\SecondLife\browser_profile"
-; RMDir /r "$2\Application Data\SecondLife\user_settings"
+ RMDir /r "$2\Application Data\SecondLife\user_settings"
Delete "$2\Application Data\SecondLife\*.xml"
Delete "$2\Application Data\SecondLife\*.bmp"
Delete "$2\Application Data\SecondLife\search_history.txt"
--
cgit v1.2.3
From 44e5c8fdeac52ba4c9ba5414700ba54dcb363cd2 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Mon, 10 Oct 2011 08:30:18 -0400
Subject: SH-2515 WIP
---
.../installers/windows/installer_template.nsi | 29 +++++++++++-----------
1 file changed, 15 insertions(+), 14 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 32ae2a8a15..bbfd1881dc 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -1060,22 +1060,23 @@ StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" SLV2_DONE
IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SLV2_FOUND SLV2_DONE
SLV2_FOUND:
-ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S'
-
-; cheesy spin wait for uninstall to finish - uninstaller is supposed
-; to take _? argument which combined with ExecWait would avoid need
-; for this, but have not been able to get it to work.
-SPIN_LOOP:
- Sleep 500
- IntOp $0 $0 + 500
- IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
-SLV2_TIMEOUT:
+ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" _?=$PROGRAMFILES\SecondLifeViewer2'
+Sleep 1000
+Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe"
+
+;; cheesy spin wait for uninstall to finish - uninstaller is supposed
+;; to take _? argument which combined with ExecWait would avoid need
+;; for this, but have not been able to get it to work.
+;SPIN_LOOP:
+; IntOp $0 $0 + 500
+; IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
+;SLV2_TIMEOUT:
;; MessageBox /SD IDOK MB_OK "Error in uninstall of Second Life Viewer 2"
- Goto SLV2_DONE
+; Goto SLV2_DONE
-CONT:
- ; Do we know this is the last file removed?
- IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
+;CONT:
+; ; Do we know this is the last file removed?
+; IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
SLV2_DONE:
MessageBox MB_OK "Restoring Cache Files"
--
cgit v1.2.3
From 74a05b51fd8c217ef7520b3dd01323bc4e4618c7 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Mon, 10 Oct 2011 11:03:55 -0400
Subject: SH-2515 FIX - uninstall viewer 2 while preserving settings
---
.../installers/windows/installer_template.nsi | 162 +--------------------
1 file changed, 2 insertions(+), 160 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index bbfd1881dc..63e4b6be86 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -376,146 +376,6 @@ Push $2
; Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
- RMDir /r "$2\Application Data\SecondLifeRestore\"
- CreateDirectory "$2\Application Data\SecondLifeRestore\"
- CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLifeRestore\"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-; Copy files in Documents and Settings\All Users\SecondLife
-Push $0
- ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
- StrCmp $0 "" +2
- RMDir /r "$2\Application Data\SecondLifeRestore\"
- CreateDirectory "$2\Application Data\SecondLifeRestore\"
- CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLifeRestore\"
-Pop $0
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Delete files in Documents and Settings\\SecondLife\cache
-; Delete files in Documents and Settings\All Users\SecondLife\cache
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;Function RemoveCacheFiles
-;
-;; Delete files in Documents and Settings\\SecondLife
-;Push $0
-;Push $1
-;Push $2
-; DetailPrint $(RemoveCacheFilesDP)
-;
-; StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-;
-; LOOP:
-; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
-; StrCmp $1 "" DONE ; no more users
-;
-; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
-; StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-;
-; ; Required since ProfileImagePath is of type REG_EXPAND_SZ
-; ExpandEnvStrings $2 $2
-;
-; ; When explicitly uninstalling, everything goes away
-; RMDir /r "$2\Application Data\SecondLife\cache"
-;
-; CONTINUE:
-; IntOp $0 $0 + 1
-; Goto LOOP
-; DONE:
-;Pop $2
-;Pop $1
-;Pop $0
-;
-;; Delete files in Documents and Settings\All Users\SecondLife
-;Push $0
-; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
-; StrCmp $0 "" +2
-; RMDir /r "$0\SecondLife\cache"
-;Pop $0
-;
-;; Delete filse in C:\Windows\Application Data\SecondLife
-;; If the user is running on a pre-NT system, Application Data lives here instead of
-;; in Documents and Settings.
-;RMDir /r "$WINDIR\Application Data\SecondLife\cache"
-;
-;FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Save files from cache
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function PreserveCacheFiles
-
-Push $0
-Push $1
-Push $2
-
- RMDir /r "$TEMP\SecondLifeSettingsBackup"
- CreateDirectory "$TEMP\SecondLifeSettingsBackup"
- StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-
- LOOP:
- EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
- StrCmp $1 "" DONE ; no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-
- ; Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0"
- CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-; Copy files in Documents and Settings\All Users\SecondLife
-Push $0
- ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
- StrCmp $0 "" +2
- CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\"
- CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
-Pop $0
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Restore files from cache
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RestoreCacheFiles
-
-Push $0
-Push $1
-Push $2
-
- StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-
- LOOP:
- EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
- StrCmp $1 "" DONE ; no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-
- ; Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- RMDir /r "$2\Application Data\SecondLife\"
CreateDirectory "$2\Application Data\SecondLife\"
CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\"
@@ -532,14 +392,12 @@ Pop $0
Push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
StrCmp $0 "" +2
- RMDir /r "$2\Application Data\SecondLife\"
CreateDirectory "$2\Application Data\SecondLife\"
CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\"
Pop $0
FunctionEnd
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Delete the installed shader files
;;; Since shaders are in active development, we'll likely need to shuffle them
@@ -1056,30 +914,14 @@ WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" ""
WriteUninstaller "$INSTDIR\uninst.exe"
; Remove existing "Second Life Viewer 2" install if any.
-StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" SLV2_DONE
+StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" SLV2_DONE ; unless that's the install directory
IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SLV2_FOUND SLV2_DONE
SLV2_FOUND:
-ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" _?=$PROGRAMFILES\SecondLifeViewer2'
-Sleep 1000
+ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2'
Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe"
-;; cheesy spin wait for uninstall to finish - uninstaller is supposed
-;; to take _? argument which combined with ExecWait would avoid need
-;; for this, but have not been able to get it to work.
-;SPIN_LOOP:
-; IntOp $0 $0 + 500
-; IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
-;SLV2_TIMEOUT:
-;; MessageBox /SD IDOK MB_OK "Error in uninstall of Second Life Viewer 2"
-; Goto SLV2_DONE
-
-;CONT:
-; ; Do we know this is the last file removed?
-; IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
-
SLV2_DONE:
-MessageBox MB_OK "Restoring Cache Files"
Call RestoreCacheFiles
; end of default section
--
cgit v1.2.3
From cf7bc443b1a2229ea24cb1b2aa61c20f1ad65951 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Mon, 10 Oct 2011 11:54:27 -0400
Subject: SH-2515 FIX - some cleanup and test stuff
---
.../installers/windows/installer_template.nsi | 58 ++++++++++++++++++----
1 file changed, 48 insertions(+), 10 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 63e4b6be86..bd1d06c31f 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -311,9 +311,9 @@ FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Save files from cache
+; Save user files to temp location
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function PreserveCacheFiles
+Function PreserveUserFiles
Push $0
Push $1
@@ -356,9 +356,9 @@ Pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Restore files from cache
+; Restore user files from temp location
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RestoreCacheFiles
+Function RestoreUserFiles
Push $0
Push $1
@@ -398,6 +398,48 @@ Pop $0
FunctionEnd
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Clobber user files - TEST ONLY
+; This is here for testing, generally not desirable to call it.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;Function ClobberUserFilesTESTONLY
+
+;Push $0
+;Push $1
+;Push $2
+;
+; StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+;
+; LOOP:
+; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+; StrCmp $1 "" DONE ; no more users
+;
+; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+; StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+;
+; ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+; ExpandEnvStrings $2 $2
+;
+; RMDir /r "$2\Application Data\SecondLife\"
+;
+; CONTINUE:
+; IntOp $0 $0 + 1
+; Goto LOOP
+; DONE:
+;
+;Pop $2
+;Pop $1
+;Pop $0
+;
+;; Copy files in Documents and Settings\All Users\SecondLife
+;Push $0
+; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+; StrCmp $0 "" +2
+; RMDir /r "$2\Application Data\SecondLife\"
+;Pop $0
+;
+;FunctionEnd
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Delete the installed shader files
;;; Since shaders are in active development, we'll likely need to shuffle them
@@ -824,15 +866,11 @@ Call CloseSecondLife ; Make sure we're not running
Call CheckNetworkConnection ; ping secondlife.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Call PreserveCacheFiles
-
-Call RestoreCacheFiles
+Call PreserveUserFiles
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
; VFS and cache files.
-Call PreserveCacheFiles
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Need to clean out shader files from previous installs to fix DEV-5663
Call RemoveOldShaders
@@ -922,7 +960,7 @@ ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\Secon
Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe"
SLV2_DONE:
-Call RestoreCacheFiles
+Call RestoreUserFiles
; end of default section
SectionEnd
--
cgit v1.2.3
From 3fe27c61b85545d22188baf5050207f13f4985b2 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Mon, 10 Oct 2011 13:45:30 -0400
Subject: SH-2515 FIX - small tweaks to cleanup
---
indra/newview/installers/windows/installer_template.nsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index bd1d06c31f..98cc8fa702 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -957,7 +957,8 @@ IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SLV2_FOUND SLV2_DONE
SLV2_FOUND:
ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2'
-Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe"
+Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" ; with _? option above, uninst.exe will be left behind.
+RMDir "$PROGRAMFILES\SecondLifeViewer2" ; will remove only if empty.
SLV2_DONE:
Call RestoreUserFiles
--
cgit v1.2.3
From 3211c6e3089b03d73f2e260be4037304660f834d Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 11 Oct 2011 00:26:03 -0500
Subject: SH-2240 WIP on removing lots of string comparisons that were added to
deal with exploding amounts of non-built-in GL state
---
indra/newview/llviewercontrol.cpp | 1 +
indra/newview/llviewerdisplay.cpp | 1 +
indra/newview/llviewershadermgr.cpp | 77 +-----
indra/newview/llviewershadermgr.h | 45 ---
indra/newview/llwlparamset.cpp | 4 +
indra/newview/pipeline.cpp | 538 +++++++++++++++++++++++-------------
indra/newview/pipeline.h | 74 +++++
7 files changed, 428 insertions(+), 312 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 5b178f82d8..3692da64fc 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -388,6 +388,7 @@ static bool handleRenderDeferredChanged(const LLSD& newvalue)
LLRenderTarget::sUseFBO = newvalue.asBoolean();
if (gPipeline.isInit())
{
+ LLPipeline::refreshCachedSettings();
gPipeline.updateRenderDeferred();
gPipeline.releaseGLBuffers();
gPipeline.createGLBuffers();
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 7220f2a20f..1832416a4b 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -862,6 +862,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// gGL.popMatrix();
//}
+ LLPipeline::refreshCachedSettings();
LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
LLPipeline::refreshRenderDeferred();
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index ac489e0caf..8bc573135c 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -195,6 +195,7 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mMaxAvatarShaderLevel(0)
{
/// Make sure WL Sky is the first program
+ //ONLY shaders that need WL Param management should be added here
mShaderList.push_back(&gWLSkyProgram);
mShaderList.push_back(&gWLCloudProgram);
mShaderList.push_back(&gAvatarProgram);
@@ -209,16 +210,6 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gObjectFullbrightNoColorWaterProgram);
mShaderList.push_back(&gObjectSimpleAlphaMaskProgram);
mShaderList.push_back(&gObjectBumpProgram);
- mShaderList.push_back(&gUIProgram);
- mShaderList.push_back(&gCustomAlphaProgram);
- mShaderList.push_back(&gGlowCombineProgram);
- mShaderList.push_back(&gGlowCombineFXAAProgram);
- mShaderList.push_back(&gTwoTextureAddProgram);
- mShaderList.push_back(&gOneTextureNoColorProgram);
- mShaderList.push_back(&gSolidColorProgram);
- mShaderList.push_back(&gOcclusionProgram);
- mShaderList.push_back(&gDebugProgram);
- mShaderList.push_back(&gAlphaMaskProgram);
mShaderList.push_back(&gObjectEmissiveProgram);
mShaderList.push_back(&gObjectEmissiveWaterProgram);
mShaderList.push_back(&gObjectFullbrightProgram);
@@ -260,23 +251,16 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gObjectShinyNonIndexedWaterProgram);
mShaderList.push_back(&gUnderWaterProgram);
mShaderList.push_back(&gDeferredSunProgram);
- mShaderList.push_back(&gDeferredBlurLightProgram);
mShaderList.push_back(&gDeferredSoftenProgram);
- mShaderList.push_back(&gDeferredLightProgram);
- mShaderList.push_back(&gDeferredMultiLightProgram);
mShaderList.push_back(&gDeferredAlphaProgram);
mShaderList.push_back(&gDeferredSkinnedAlphaProgram);
mShaderList.push_back(&gDeferredFullbrightProgram);
mShaderList.push_back(&gDeferredEmissiveProgram);
mShaderList.push_back(&gDeferredAvatarEyesProgram);
- mShaderList.push_back(&gDeferredPostProgram);
- mShaderList.push_back(&gFXAAProgram);
mShaderList.push_back(&gDeferredWaterProgram);
mShaderList.push_back(&gDeferredAvatarAlphaProgram);
mShaderList.push_back(&gDeferredWLSkyProgram);
mShaderList.push_back(&gDeferredWLCloudProgram);
- mShaderList.push_back(&gDeferredStarProgram);
- mShaderList.push_back(&gNormalMapGenProgram);
}
LLViewerShaderMgr::~LLViewerShaderMgr()
@@ -300,70 +284,13 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void)
{
if (mReservedAttribs.empty())
{
- //MUST match order of enum in LLVertexBuffer.h
- mReservedAttribs.push_back("position");
- mReservedAttribs.push_back("normal");
- mReservedAttribs.push_back("texcoord0");
- mReservedAttribs.push_back("texcoord1");
- mReservedAttribs.push_back("texcoord2");
- mReservedAttribs.push_back("texcoord3");
- mReservedAttribs.push_back("diffuse_color");
- mReservedAttribs.push_back("emissive");
- mReservedAttribs.push_back("binormal");
- mReservedAttribs.push_back("weight");
- mReservedAttribs.push_back("weight4");
- mReservedAttribs.push_back("clothing");
- mReservedAttribs.push_back("texture_index");
+ LLShaderMgr::initAttribsAndUniforms();
mAvatarUniforms.push_back("matrixPalette");
mAvatarUniforms.push_back("gWindDir");
mAvatarUniforms.push_back("gSinWaveParams");
mAvatarUniforms.push_back("gGravity");
- mReservedUniforms.reserve(24);
- mReservedUniforms.push_back("diffuseMap");
- mReservedUniforms.push_back("specularMap");
- mReservedUniforms.push_back("bumpMap");
- mReservedUniforms.push_back("environmentMap");
- mReservedUniforms.push_back("cloude_noise_texture");
- mReservedUniforms.push_back("fullbright");
- mReservedUniforms.push_back("lightnorm");
- mReservedUniforms.push_back("sunlight_color");
- mReservedUniforms.push_back("ambient");
- mReservedUniforms.push_back("blue_horizon");
- mReservedUniforms.push_back("blue_density");
- mReservedUniforms.push_back("haze_horizon");
- mReservedUniforms.push_back("haze_density");
- mReservedUniforms.push_back("cloud_shadow");
- mReservedUniforms.push_back("density_multiplier");
- mReservedUniforms.push_back("distance_multiplier");
- mReservedUniforms.push_back("max_y");
- mReservedUniforms.push_back("glow");
- mReservedUniforms.push_back("cloud_color");
- mReservedUniforms.push_back("cloud_pos_density1");
- mReservedUniforms.push_back("cloud_pos_density2");
- mReservedUniforms.push_back("cloud_scale");
- mReservedUniforms.push_back("gamma");
- mReservedUniforms.push_back("scene_light_strength");
-
- mReservedUniforms.push_back("depthMap");
- mReservedUniforms.push_back("shadowMap0");
- mReservedUniforms.push_back("shadowMap1");
- mReservedUniforms.push_back("shadowMap2");
- mReservedUniforms.push_back("shadowMap3");
- mReservedUniforms.push_back("shadowMap4");
- mReservedUniforms.push_back("shadowMap5");
-
- mReservedUniforms.push_back("normalMap");
- mReservedUniforms.push_back("positionMap");
- mReservedUniforms.push_back("diffuseRect");
- mReservedUniforms.push_back("specularRect");
- mReservedUniforms.push_back("noiseMap");
- mReservedUniforms.push_back("lightFunc");
- mReservedUniforms.push_back("lightMap");
- mReservedUniforms.push_back("bloomMap");
- mReservedUniforms.push_back("projectionMap");
-
mWLUniforms.push_back("camPosLocal");
mTerrainUniforms.reserve(5);
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 5bcdf11be5..01f8c3987c 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -71,51 +71,6 @@ public:
SHADER_COUNT
};
- typedef enum
- {
- DIFFUSE_MAP = 0,
- SPECULAR_MAP,
- BUMP_MAP,
- ENVIRONMENT_MAP,
- CLOUD_NOISE_MAP,
- FULLBRIGHT,
- LIGHTNORM,
- SUNLIGHT_COLOR,
- AMBIENT,
- BLUE_HORIZON,
- BLUE_DENSITY,
- HAZE_HORIZON,
- HAZE_DENSITY,
- CLOUD_SHADOW,
- DENSITY_MULTIPLIER,
- DISTANCE_MULTIPLIER,
- MAX_Y,
- GLOW,
- CLOUD_COLOR,
- CLOUD_POS_DENSITY1,
- CLOUD_POS_DENSITY2,
- CLOUD_SCALE,
- GAMMA,
- SCENE_LIGHT_STRENGTH,
- DEFERRED_DEPTH,
- DEFERRED_SHADOW0,
- DEFERRED_SHADOW1,
- DEFERRED_SHADOW2,
- DEFERRED_SHADOW3,
- DEFERRED_SHADOW4,
- DEFERRED_SHADOW5,
- DEFERRED_NORMAL,
- DEFERRED_POSITION,
- DEFERRED_DIFFUSE,
- DEFERRED_SPECULAR,
- DEFERRED_NOISE,
- DEFERRED_LIGHTFUNC,
- DEFERRED_LIGHT,
- DEFERRED_BLOOM,
- DEFERRED_PROJECTION,
- END_RESERVED_UNIFORMS
- } eGLSLReservedUniforms;
-
typedef enum
{
SHINY_ORIGIN = END_RESERVED_UNIFORMS
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 22fba90f65..4a1db3d26c 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -69,12 +69,16 @@ LLWLParamSet::LLWLParamSet(void) :
*/
}
+static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update");
+
void LLWLParamSet::update(LLGLSLShader * shader) const
{
for(LLSD::map_const_iterator i = mParamValues.beginMap();
i != mParamValues.endMap();
++i)
{
+ LLFastTimer t(FTM_WL_PARAM_UPDATE);
+
const std::string& param = i->first;
if( param == "star_brightness" || param == "preset_num" || param == "sun_angle" ||
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 42873dbca8..e4125c8dc8 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -113,6 +113,79 @@
//#define DEBUG_INDICES
#endif
+//cached settings
+BOOL LLPipeline::RenderAvatarVP;
+BOOL LLPipeline::VertexShaderEnable;
+BOOL LLPipeline::WindLightUseAtmosShaders;
+BOOL LLPipeline::RenderDeferred;
+F32 LLPipeline::RenderDeferredSunWash;
+U32 LLPipeline::RenderFSAASamples;
+U32 LLPipeline::RenderResolutionDivisor;
+BOOL LLPipeline::RenderUIBuffer;
+S32 LLPipeline::RenderShadowDetail;
+BOOL LLPipeline::RenderDeferredSSAO;
+F32 LLPipeline::RenderShadowResolutionScale;
+BOOL LLPipeline::RenderLocalLights;
+BOOL LLPipeline::RenderDelayCreation;
+BOOL LLPipeline::RenderAnimateRes;
+BOOL LLPipeline::FreezeTime;
+S32 LLPipeline::DebugBeaconLineWidth;
+F32 LLPipeline::RenderHighlightBrightness;
+LLColor4 LLPipeline::RenderHighlightColor;
+F32 LLPipeline::RenderHighlightThickness;
+BOOL LLPipeline::RenderSpotLightsInNondeferred;
+LLColor4 LLPipeline::PreviewAmbientColor;
+LLColor4 LLPipeline::PreviewDiffuse0;
+LLColor4 LLPipeline::PreviewSpecular0;
+LLColor4 LLPipeline::PreviewDiffuse1;
+LLColor4 LLPipeline::PreviewSpecular1;
+LLColor4 LLPipeline::PreviewDiffuse2;
+LLColor4 LLPipeline::PreviewSpecular2;
+LLVector3 LLPipeline::PreviewDirection0;
+LLVector3 LLPipeline::PreviewDirection1;
+LLVector3 LLPipeline::PreviewDirection2;
+F32 LLPipeline::RenderGlowMinLuminance;
+F32 LLPipeline::RenderGlowMaxExtractAlpha;
+F32 LLPipeline::RenderGlowWarmthAmount;
+LLVector3 LLPipeline::RenderGlowLumWeights;
+LLVector3 LLPipeline::RenderGlowWarmthWeights;
+S32 LLPipeline::RenderGlowResolutionPow;
+S32 LLPipeline::RenderGlowIterations;
+F32 LLPipeline::RenderGlowWidth;
+F32 LLPipeline::RenderGlowStrength;
+BOOL LLPipeline::RenderDepthOfField;
+F32 LLPipeline::CameraFocusTransitionTime;
+F32 LLPipeline::CameraFNumber;
+F32 LLPipeline::CameraFocalLength;
+F32 LLPipeline::CameraFieldOfView;
+F32 LLPipeline::RenderShadowNoise;
+F32 LLPipeline::RenderShadowBlurSize;
+F32 LLPipeline::RenderSSAOScale;
+U32 LLPipeline::RenderSSAOMaxScale;
+F32 LLPipeline::RenderSSAOFactor;
+LLVector3 LLPipeline::RenderSSAOEffect;
+F32 LLPipeline::RenderShadowOffsetError;
+F32 LLPipeline::RenderShadowBiasError;
+F32 LLPipeline::RenderShadowOffset;
+F32 LLPipeline::RenderShadowBias;
+F32 LLPipeline::RenderSpotShadowOffset;
+F32 LLPipeline::RenderSpotShadowBias;
+F32 LLPipeline::RenderEdgeDepthCutoff;
+F32 LLPipeline::RenderEdgeNormCutoff;
+LLVector3 LLPipeline::RenderShadowGaussian;
+F32 LLPipeline::RenderShadowBlurDistFactor;
+BOOL LLPipeline::RenderDeferredAtmospheric;
+S32 LLPipeline::RenderReflectionDetail;
+F32 LLPipeline::RenderHighlightFadeTime;
+LLVector3 LLPipeline::RenderShadowClipPlanes;
+LLVector3 LLPipeline::RenderShadowOrthoClipPlanes;
+LLVector3 LLPipeline::RenderShadowNearDist;
+F32 LLPipeline::RenderFarClip;
+LLVector3 LLPipeline::RenderShadowSplitExponent;
+F32 LLPipeline::RenderShadowErrorCutoff;
+F32 LLPipeline::RenderShadowFOVCutoff;
+BOOL LLPipeline::CameraOffset;
+
const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f;
@@ -371,6 +444,8 @@ void LLPipeline::init()
{
LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT);
+ refreshCachedSettings();
+
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
@@ -588,7 +663,7 @@ void LLPipeline::allocatePhysicsBuffer()
void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
{
- U32 samples = gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples"));
+ U32 samples = gGLManager.getNumFBOFSAASamples(RenderFSAASamples);
//try to allocate screen buffers at requested resolution and samples
// - on failure, shrink number of samples and try again
@@ -638,7 +713,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mScreenWidth = resX;
mScreenHeight = resY;
- U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
+ U32 res_mod = RenderResolutionDivisor;
if (res_mod > 1 && res_mod < resX && res_mod < resY)
{
@@ -646,7 +721,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
resY /= res_mod;
}
- if (gSavedSettings.getBOOL("RenderUIBuffer"))
+ if (RenderUIBuffer)
{
if (!mUIScreen.allocate(resX,resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE))
{
@@ -656,8 +731,8 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
if (LLPipeline::sRenderDeferred)
{
- S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
- BOOL ssao = gSavedSettings.getBOOL("RenderDeferredSSAO");
+ S32 shadow_detail = RenderShadowDetail;
+ BOOL ssao = RenderDeferredSSAO;
//allocate deferred rendering color buffers
if (!mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
@@ -683,7 +758,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mDeferredLight.release();
}
- F32 scale = gSavedSettings.getF32("RenderShadowResolutionScale");
+ F32 scale = RenderShadowResolutionScale;
if (shadow_detail > 0)
{ //allocate 4 sun shadow maps
@@ -749,12 +824,12 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
//static
void LLPipeline::updateRenderDeferred()
{
- BOOL deferred = ((gSavedSettings.getBOOL("RenderDeferred") &&
+ BOOL deferred = ((RenderDeferred &&
LLRenderTarget::sUseFBO &&
- LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
- gSavedSettings.getBOOL("VertexShaderEnable") &&
- gSavedSettings.getBOOL("RenderAvatarVP") &&
- gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE) &&
+ LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ VertexShaderEnable &&
+ RenderAvatarVP &&
+ WindLightUseAtmosShaders) ? TRUE : FALSE) &&
!gUseWireframe;
sRenderDeferred = deferred;
@@ -770,6 +845,82 @@ void LLPipeline::refreshRenderDeferred()
updateRenderDeferred();
}
+//static
+void LLPipeline::refreshCachedSettings()
+{
+ VertexShaderEnable = gSavedSettings.getBOOL("VertexShaderEnable");
+ RenderAvatarVP = gSavedSettings.getBOOL("RenderAvatarVP");
+ WindLightUseAtmosShaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
+ RenderDeferred = gSavedSettings.getBOOL("RenderDeferred");
+ RenderDeferredSunWash = gSavedSettings.getF32("RenderDeferredSunWash");
+ RenderFSAASamples = gSavedSettings.getU32("RenderFSAASamples");
+ RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor");
+ RenderUIBuffer = gSavedSettings.getBOOL("RenderUIBuffer");
+ RenderShadowDetail = gSavedSettings.getS32("RenderShadowDetail");
+ RenderDeferredSSAO = gSavedSettings.getBOOL("RenderDeferredSSAO");
+ RenderShadowResolutionScale = gSavedSettings.getF32("RenderShadowResolutionScale");
+ RenderLocalLights = gSavedSettings.getBOOL("RenderLocalLights");
+ RenderDelayCreation = gSavedSettings.getBOOL("RenderDelayCreation");
+ RenderAnimateRes = gSavedSettings.getBOOL("RenderAnimateRes");
+ FreezeTime = gSavedSettings.getBOOL("FreezeTime");
+ DebugBeaconLineWidth = gSavedSettings.getS32("DebugBeaconLineWidth");
+ RenderHighlightBrightness = gSavedSettings.getF32("RenderHighlightBrightness");
+ RenderHighlightColor = gSavedSettings.getColor4("RenderHighlightColor");
+ RenderHighlightThickness = gSavedSettings.getF32("RenderHighlightThickness");
+ RenderSpotLightsInNondeferred = gSavedSettings.getBOOL("RenderSpotLightsInNondeferred");
+ PreviewAmbientColor = gSavedSettings.getColor4("PreviewAmbientColor");
+ PreviewDiffuse0 = gSavedSettings.getColor4("PreviewDiffuse0");
+ PreviewSpecular0 = gSavedSettings.getColor4("PreviewSpecular0");
+ PreviewDiffuse1 = gSavedSettings.getColor4("PreviewDiffuse1");
+ PreviewSpecular1 = gSavedSettings.getColor4("PreviewSpecular1");
+ PreviewDiffuse2 = gSavedSettings.getColor4("PreviewDiffuse2");
+ PreviewSpecular2 = gSavedSettings.getColor4("PreviewSpecular2");
+ PreviewDirection0 = gSavedSettings.getVector3("PreviewDirection0");
+ PreviewDirection1 = gSavedSettings.getVector3("PreviewDirection1");
+ PreviewDirection2 = gSavedSettings.getVector3("PreviewDirection2");
+ RenderGlowMinLuminance = gSavedSettings.getF32("RenderGlowMinLuminance");
+ RenderGlowMaxExtractAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha");
+ RenderGlowWarmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount");
+ RenderGlowLumWeights = gSavedSettings.getVector3("RenderGlowLumWeights");
+ RenderGlowWarmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights");
+ RenderGlowResolutionPow = gSavedSettings.getS32("RenderGlowResolutionPow");
+ RenderGlowIterations = gSavedSettings.getS32("RenderGlowIterations");
+ RenderGlowWidth = gSavedSettings.getF32("RenderGlowWidth");
+ RenderGlowStrength = gSavedSettings.getF32("RenderGlowStrength");
+ RenderDepthOfField = gSavedSettings.getBOOL("RenderDepthOfField");
+ CameraFocusTransitionTime = gSavedSettings.getF32("CameraFocusTransitionTime");
+ CameraFNumber = gSavedSettings.getF32("CameraFNumber");
+ CameraFocalLength = gSavedSettings.getF32("CameraFocalLength");
+ CameraFieldOfView = gSavedSettings.getF32("CameraFieldOfView");
+ RenderShadowNoise = gSavedSettings.getF32("RenderShadowNoise");
+ RenderShadowBlurSize = gSavedSettings.getF32("RenderShadowBlurSize");
+ RenderSSAOScale = gSavedSettings.getF32("RenderSSAOScale");
+ RenderSSAOMaxScale = gSavedSettings.getU32("RenderSSAOMaxScale");
+ RenderSSAOFactor = gSavedSettings.getF32("RenderSSAOFactor");
+ RenderSSAOEffect = gSavedSettings.getVector3("RenderSSAOEffect");
+ RenderShadowOffsetError = gSavedSettings.getF32("RenderShadowOffsetError");
+ RenderShadowBiasError = gSavedSettings.getF32("RenderShadowBiasError");
+ RenderShadowOffset = gSavedSettings.getF32("RenderShadowOffset");
+ RenderShadowBias = gSavedSettings.getF32("RenderShadowBias");
+ RenderSpotShadowOffset = gSavedSettings.getF32("RenderSpotShadowOffset");
+ RenderSpotShadowBias = gSavedSettings.getF32("RenderSpotShadowBias");
+ RenderEdgeDepthCutoff = gSavedSettings.getF32("RenderEdgeDepthCutoff");
+ RenderEdgeNormCutoff = gSavedSettings.getF32("RenderEdgeNormCutoff");
+ RenderShadowGaussian = gSavedSettings.getVector3("RenderShadowGaussian");
+ RenderShadowBlurDistFactor = gSavedSettings.getF32("RenderShadowBlurDistFactor");
+ RenderDeferredAtmospheric = gSavedSettings.getBOOL("RenderDeferredAtmospheric");
+ RenderReflectionDetail = gSavedSettings.getS32("RenderReflectionDetail");
+ RenderHighlightFadeTime = gSavedSettings.getF32("RenderHighlightFadeTime");
+ RenderShadowClipPlanes = gSavedSettings.getVector3("RenderShadowClipPlanes");
+ RenderShadowOrthoClipPlanes = gSavedSettings.getVector3("RenderShadowOrthoClipPlanes");
+ RenderShadowNearDist = gSavedSettings.getVector3("RenderShadowNearDist");
+ RenderFarClip = gSavedSettings.getF32("RenderFarClip");
+ RenderShadowSplitExponent = gSavedSettings.getVector3("RenderShadowSplitExponent");
+ RenderShadowErrorCutoff = gSavedSettings.getF32("RenderShadowErrorCutoff");
+ RenderShadowFOVCutoff = gSavedSettings.getF32("RenderShadowFOVCutoff");
+ CameraOffset = gSavedSettings.getBOOL("CameraOffset");
+}
+
void LLPipeline::releaseGLBuffers()
{
assertInitialized();
@@ -1041,7 +1192,7 @@ S32 LLPipeline::setLightingDetail(S32 level)
if (level < 0)
{
- if (gSavedSettings.getBOOL("RenderLocalLights"))
+ if (RenderLocalLights)
{
level = 1;
}
@@ -1362,7 +1513,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
{
LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT);
- if (gSavedSettings.getBOOL("RenderDelayCreation"))
+ if (RenderDelayCreation)
{
mCreateQ.push_back(vobj);
}
@@ -1425,7 +1576,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE);
- if (drawablep->getVOVolume() && gSavedSettings.getBOOL("RenderAnimateRes"))
+ if (drawablep->getVOVolume() && RenderAnimateRes)
{
// fun animated res
drawablep->updateXform(TRUE);
@@ -1464,7 +1615,7 @@ void LLPipeline::resetFrameStats()
//external functions for asynchronous updating
void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
{
- if (gSavedSettings.getBOOL("FreezeTime"))
+ if (FreezeTime)
{
return;
}
@@ -1494,7 +1645,7 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep)
{
- if (gSavedSettings.getBOOL("FreezeTime"))
+ if (FreezeTime)
{
return;
}
@@ -1551,7 +1702,7 @@ void LLPipeline::updateMove()
LLFastTimer t(FTM_UPDATE_MOVE);
LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE);
- if (gSavedSettings.getBOOL("FreezeTime"))
+ if (FreezeTime)
{
return;
}
@@ -2911,7 +3062,7 @@ void renderScriptedBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2937,7 +3088,7 @@ void renderScriptedTouchBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2962,7 +3113,7 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2998,7 +3149,7 @@ void renderMOAPBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 1.f, 1.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 1.f, 1.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -3023,7 +3174,7 @@ void renderParticleBeacons(LLDrawable* drawablep)
if (gPipeline.sRenderBeacons)
{
LLColor4 light_blue(0.5f, 0.5f, 1.f, 0.5f);
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -3216,7 +3367,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (gPipeline.sRenderBeacons)
{
//pos += LLVector3(0.f, 0.f, 0.2f);
- gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), DebugBeaconLineWidth);
}
}
// now deal with highlights for all those seeable sound sources
@@ -3281,7 +3432,7 @@ void render_hud_elements()
if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
// Draw the tracking overlays
@@ -3368,9 +3519,9 @@ void LLPipeline::renderHighlights()
gGL.begin(LLRender::TRIANGLES);
- F32 scale = gSavedSettings.getF32("RenderHighlightBrightness");
- LLColor4 color = gSavedSettings.getColor4("RenderHighlightColor");
- F32 thickness = gSavedSettings.getF32("RenderHighlightThickness");
+ F32 scale = RenderHighlightBrightness;
+ LLColor4 color = RenderHighlightColor;
+ F32 thickness = RenderHighlightThickness;
for (S32 pass = 0; pass < 2; ++pass)
{
@@ -3425,7 +3576,7 @@ void LLPipeline::renderHighlights()
if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
{
gHighlightProgram.bind();
- gHighlightProgram.uniform4f("highlight_color",1,1,1,0.5f);
+ gHighlightProgram.uniform4f(LLShaderMgr::HIGHLIGHT_COLOR,1,1,1,0.5f);
}
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
@@ -3457,7 +3608,7 @@ void LLPipeline::renderHighlights()
color.setVec(1.f, 0.f, 0.f, 0.5f);
if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
{
- gHighlightProgram.uniform4f("highlight_color",1,0,0,0.5f);
+ gHighlightProgram.uniform4f(LLShaderMgr::HIGHLIGHT_COLOR,1,0,0,0.5f);
}
int count = mHighlightFaces.size();
for (S32 i = 0; i < count; i++)
@@ -3530,7 +3681,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
gGL.matrixMode(LLRender::MM_MODELVIEW);
LLGLSPipeline gls_pipeline;
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
LLGLState gls_color_material(GL_COLOR_MATERIAL, mLightingDetail < 2);
@@ -3755,7 +3906,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
}
}
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
LLVertexBuffer::unbind();
@@ -3836,7 +3987,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
LLGLEnable cull(GL_CULL_FACE);
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
calcNearbyLights(camera);
setupHWLights(NULL);
@@ -5051,8 +5202,9 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
light_state->setQuadraticAttenuation(0.f);
}
+
if (light->isLightSpotlight() // directional (spot-)light
- && (LLPipeline::sRenderDeferred || gSavedSettings.getBOOL("RenderSpotLightsInNondeferred"))) // these are only rendered as GL spotlights if we're in deferred rendering mode *or* the setting forces them on
+ && (LLPipeline::sRenderDeferred || RenderSpotLightsInNondeferred)) // these are only rendered as GL spotlights if we're in deferred rendering mode *or* the setting forces them on
{
LLVector3 spotparams = light->getSpotLightParams();
LLQuaternion quat = light->getRenderRotation();
@@ -5233,19 +5385,19 @@ void LLPipeline::enableLightsPreview()
glEnable(GL_LIGHTING);
}
- LLColor4 ambient = gSavedSettings.getColor4("PreviewAmbientColor");
+ LLColor4 ambient = PreviewAmbientColor;
gGL.setAmbientLightColor(ambient);
- LLColor4 diffuse0 = gSavedSettings.getColor4("PreviewDiffuse0");
- LLColor4 specular0 = gSavedSettings.getColor4("PreviewSpecular0");
- LLColor4 diffuse1 = gSavedSettings.getColor4("PreviewDiffuse1");
- LLColor4 specular1 = gSavedSettings.getColor4("PreviewSpecular1");
- LLColor4 diffuse2 = gSavedSettings.getColor4("PreviewDiffuse2");
- LLColor4 specular2 = gSavedSettings.getColor4("PreviewSpecular2");
+ LLColor4 diffuse0 = PreviewDiffuse0;
+ LLColor4 specular0 = PreviewSpecular0;
+ LLColor4 diffuse1 = PreviewDiffuse1;
+ LLColor4 specular1 = PreviewSpecular1;
+ LLColor4 diffuse2 = PreviewDiffuse2;
+ LLColor4 specular2 = PreviewSpecular2;
- LLVector3 dir0 = gSavedSettings.getVector3("PreviewDirection0");
- LLVector3 dir1 = gSavedSettings.getVector3("PreviewDirection1");
- LLVector3 dir2 = gSavedSettings.getVector3("PreviewDirection2");
+ LLVector3 dir0 = PreviewDirection0;
+ LLVector3 dir1 = PreviewDirection1;
+ LLVector3 dir2 = PreviewDirection2;
dir0.normVec();
dir1.normVec();
@@ -6085,7 +6237,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
- U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
+ U32 res_mod = RenderResolutionDivisor;
LLVector2 tc1(0,0);
LLVector2 tc2((F32) gViewerWindow->getWorldViewWidthRaw()*2,
@@ -6124,16 +6276,18 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
gGlowExtractProgram.bind();
- F32 minLum = llmax(gSavedSettings.getF32("RenderGlowMinLuminance"), 0.0f);
- F32 maxAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha");
- F32 warmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount");
- LLVector3 lumWeights = gSavedSettings.getVector3("RenderGlowLumWeights");
- LLVector3 warmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights");
- gGlowExtractProgram.uniform1f("minLuminance", minLum);
- gGlowExtractProgram.uniform1f("maxExtractAlpha", maxAlpha);
- gGlowExtractProgram.uniform3f("lumWeights", lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]);
- gGlowExtractProgram.uniform3f("warmthWeights", warmthWeights.mV[0], warmthWeights.mV[1], warmthWeights.mV[2]);
- gGlowExtractProgram.uniform1f("warmthAmount", warmthAmount);
+ F32 minLum = llmax((F32) RenderGlowMinLuminance, 0.0f);
+ F32 maxAlpha = RenderGlowMaxExtractAlpha;
+ F32 warmthAmount = RenderGlowWarmthAmount;
+ LLVector3 lumWeights = RenderGlowLumWeights;
+ LLVector3 warmthWeights = RenderGlowWarmthWeights;
+
+
+ gGlowExtractProgram.uniform1f(LLShaderMgr::GLOW_MIN_LUMINANCE, minLum);
+ gGlowExtractProgram.uniform1f(LLShaderMgr::GLOW_MAX_EXTRACT_ALPHA, maxAlpha);
+ gGlowExtractProgram.uniform3f(LLShaderMgr::GLOW_LUM_WEIGHTS, lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]);
+ gGlowExtractProgram.uniform3f(LLShaderMgr::GLOW_WARMTH_WEIGHTS, warmthWeights.mV[0], warmthWeights.mV[1], warmthWeights.mV[2]);
+ gGlowExtractProgram.uniform1f(LLShaderMgr::GLOW_WARMTH_AMOUNT, warmthAmount);
LLGLEnable blend_on(GL_BLEND);
LLGLEnable test(GL_ALPHA_TEST);
@@ -6164,22 +6318,22 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
tc2.setVec(2,2);
// power of two between 1 and 1024
- U32 glowResPow = gSavedSettings.getS32("RenderGlowResolutionPow");
+ U32 glowResPow = RenderGlowResolutionPow;
const U32 glow_res = llmax(1,
llmin(1024, 1 << glowResPow));
- S32 kernel = gSavedSettings.getS32("RenderGlowIterations")*2;
- F32 delta = gSavedSettings.getF32("RenderGlowWidth") / glow_res;
+ S32 kernel = RenderGlowIterations*2;
+ F32 delta = RenderGlowWidth / glow_res;
// Use half the glow width if we have the res set to less than 9 so that it looks
// almost the same in either case.
if (glowResPow < 9)
{
delta *= 0.5f;
}
- F32 strength = gSavedSettings.getF32("RenderGlowStrength");
+ F32 strength = RenderGlowStrength;
gGlowProgram.bind();
- gGlowProgram.uniform1f("glowStrength", strength);
+ gGlowProgram.uniform1f(LLShaderMgr::GLOW_STRENGTH, strength);
for (S32 i = 0; i < kernel; i++)
{
@@ -6200,11 +6354,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (i%2 == 0)
{
- gGlowProgram.uniform2f("glowDelta", delta, 0);
+ gGlowProgram.uniform2f(LLShaderMgr::GLOW_DELTA, delta, 0);
}
else
{
- gGlowProgram.uniform2f("glowDelta", 0, delta);
+ gGlowProgram.uniform2f(LLShaderMgr::GLOW_DELTA, 0, delta);
}
gGL.begin(LLRender::TRIANGLE_STRIP);
@@ -6245,11 +6399,13 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (LLPipeline::sRenderDeferred)
{
+
bool dof_enabled = !LLViewerCamera::getInstance()->cameraUnderWater() &&
!LLToolMgr::getInstance()->inBuildMode() &&
- gSavedSettings.getBOOL("RenderDepthOfField");
+ RenderDepthOfField;
+
- bool multisample = gSavedSettings.getU32("RenderFSAASamples") > 1;
+ bool multisample = RenderFSAASamples > 1;
if (multisample)
{
@@ -6261,7 +6417,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
glViewport(0, 0, width, height);
gGlowCombineFXAAProgram.bind();
- gGlowCombineFXAAProgram.uniform2f("screen_res", width, height);
+ gGlowCombineFXAAProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, width, height);
gGL.getTexUnit(0)->bind(&mGlow[1]);
gGL.getTexUnit(1)->bind(&mScreen);
@@ -6284,7 +6440,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
LLGLSLShader* shader = &gFXAAProgram;
shader->bind();
- S32 channel = shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP, mFXAABuffer.getUsage());
+ S32 channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mFXAABuffer.getUsage());
if (channel > -1)
{
mFXAABuffer.bindTexture(0, channel);
@@ -6294,10 +6450,10 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
F32 scale_x = (F32) width/mFXAABuffer.getWidth();
F32 scale_y = (F32) height/mFXAABuffer.getHeight();
- shader->uniform2f("tc_scale", scale_x, scale_y);
- shader->uniform2f("rcp_screen_res", 1.f/width*scale_x, 1.f/height*scale_y);
- shader->uniform4f("rcp_frame_opt", -0.5f/width*scale_x, -0.5f/height*scale_y, 0.5f/width*scale_x, 0.5f/height*scale_y);
- shader->uniform4f("rcp_frame_opt2", -2.f/width*scale_x, -2.f/height*scale_y, 2.f/width*scale_x, 2.f/height*scale_y);
+ shader->uniform2f(LLShaderMgr::FXAA_TC_SCALE, scale_x, scale_y);
+ shader->uniform2f(LLShaderMgr::FXAA_RCP_SCREEN_RES, 1.f/width*scale_x, 1.f/height*scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT, -0.5f/width*scale_x, -0.5f/height*scale_y, 0.5f/width*scale_x, 0.5f/height*scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT2, -2.f/width*scale_x, -2.f/height*scale_y, 2.f/width*scale_x, 2.f/height*scale_y);
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.vertex2f(-1,-1);
@@ -6391,7 +6547,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
else if (transition_time < 1.f)
{ //currently in a transition, continue interpolating
- transition_time += 1.f/gSavedSettings.getF32("CameraFocusTransitionTime")*gFrameIntervalSeconds;
+ transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds;
transition_time = llmin(transition_time, 1.f);
F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f;
@@ -6404,12 +6560,12 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
//convert to mm
F32 subject_distance = current_distance*1000.f;
- F32 fnumber = gSavedSettings.getF32("CameraFNumber");
- F32 default_focal_length = gSavedSettings.getF32("CameraFocalLength");
+ F32 fnumber = CameraFNumber;
+ F32 default_focal_length = CameraFocalLength;
F32 fov = LLViewerCamera::getInstance()->getView();
- const F32 default_fov = gSavedSettings.getF32("CameraFieldOfView") * F_PI/180.f;
+ const F32 default_fov = CameraFieldOfView * F_PI/180.f;
//const F32 default_aspect_ratio = gSavedSettings.getF32("CameraAspectRatio");
//F32 aspect_ratio = (F32) mScreen.getWidth()/(F32)mScreen.getHeight();
@@ -6432,13 +6588,13 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
blur_constant /= 1000.f; //convert to meters for shader
F32 magnification = focal_length/(subject_distance-focal_length);
- shader->uniform1f("focal_distance", -subject_distance/1000.f);
- shader->uniform1f("blur_constant", blur_constant);
- shader->uniform1f("tan_pixel_angle", tanf(1.f/LLDrawable::sCurPixelAngle));
- shader->uniform1f("magnification", magnification);
+ shader->uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance/1000.f);
+ shader->uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
+ shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
+ shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
}
- S32 channel = shader->enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
if (channel > -1)
{
mScreen.bindTexture(0, channel);
@@ -6446,7 +6602,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (multisample)
{ //bloom has already been added, bind black
- channel = shader->enableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
+ channel = shader->enableTexture(LLShaderMgr::DEFERRED_BLOOM);
if (channel > -1)
{
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sBlackImagep);
@@ -6519,7 +6675,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.getTexUnit(0)->bind(&mGlow[1]);
gGL.getTexUnit(1)->bind(&mScreen);
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
buff->setBuffer(mask);
buff->drawArrays(LLRender::TRIANGLE_STRIP, 0, 3);
@@ -6611,28 +6767,28 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
shader.bind();
S32 channel = 0;
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(0,channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(1, channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(2, channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredDepth.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_DEPTH, mDeferredDepth.getUsage());
if (channel > -1)
{
gGL.getTexUnit(channel)->bind(&mDeferredDepth, TRUE);
@@ -6646,21 +6802,21 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
glh::matrix4f projection = glh_get_current_projection();
glh::matrix4f inv_proj = projection.inverse();
- shader.uniformMatrix4fv("inv_proj", 1, FALSE, inv_proj.m);
- shader.uniform4f("viewport", (F32) gGLViewport[0],
+ shader.uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.m);
+ shader.uniform4f(LLShaderMgr::VIEWPORT, (F32) gGLViewport[0],
(F32) gGLViewport[1],
(F32) gGLViewport[2],
(F32) gGLViewport[3]);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_NOISE);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_NOISE);
if (channel > -1)
{
gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, noise_map);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHTFUNC);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_LIGHTFUNC);
if (channel > -1)
{
gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);
@@ -6668,7 +6824,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
if (channel > -1)
{
if (light_index > 0)
@@ -6682,7 +6838,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_BLOOM);
if (channel > -1)
{
mGlow[1].bindTexture(0, channel);
@@ -6692,7 +6848,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
for (U32 i = 0; i < 4; i++)
{
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE);
stop_glerror();
if (channel > -1)
{
@@ -6710,7 +6866,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
for (U32 i = 4; i < 6; i++)
{
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i);
stop_glerror();
if (channel > -1)
{
@@ -6739,12 +6895,11 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
mat[i+80] = mSunShadowMatrix[5].m[i];
}
- shader.uniformMatrix4fv("shadow_matrix[0]", 6, FALSE, mat);
- shader.uniformMatrix4fv("shadow_matrix", 6, FALSE, mat);
+ shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_SHADOW_MATRIX, 6, FALSE, mat);
stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
+ channel = shader.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
if (channel > -1)
{
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
@@ -6759,24 +6914,23 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
m[4], m[5], m[6],
m[8], m[9], m[10] };
- shader.uniform3fv("env_mat[0]", 3, mat);
- shader.uniform3fv("env_mat", 3, mat);
+ shader.uniform3fv(LLShaderMgr::DEFERRED_ENV_MAT, 3, mat);
}
}
- shader.uniform4fv("shadow_clip", 1, mSunClipPlanes.mV);
- shader.uniform1f("sun_wash", gSavedSettings.getF32("RenderDeferredSunWash"));
- shader.uniform1f("shadow_noise", gSavedSettings.getF32("RenderShadowNoise"));
- shader.uniform1f("blur_size", gSavedSettings.getF32("RenderShadowBlurSize"));
+ shader.uniform4fv(LLShaderMgr::DEFERRED_SHADOW_CLIP, 1, mSunClipPlanes.mV);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SUN_WASH, RenderDeferredSunWash);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_NOISE, RenderShadowNoise);
+ shader.uniform1f(LLShaderMgr::DEFERRED_BLUR_SIZE, RenderShadowBlurSize);
- shader.uniform1f("ssao_radius", gSavedSettings.getF32("RenderSSAOScale"));
- shader.uniform1f("ssao_max_radius", gSavedSettings.getU32("RenderSSAOMaxScale"));
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_RADIUS, RenderSSAOScale);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_MAX_RADIUS, RenderSSAOMaxScale);
- F32 ssao_factor = gSavedSettings.getF32("RenderSSAOFactor");
- shader.uniform1f("ssao_factor", ssao_factor);
- shader.uniform1f("ssao_factor_inv", 1.0/ssao_factor);
+ F32 ssao_factor = RenderSSAOFactor;
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR, ssao_factor);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR_INV, 1.0/ssao_factor);
- LLVector3 ssao_effect = gSavedSettings.getVector3("RenderSSAOEffect");
+ LLVector3 ssao_effect = RenderSSAOEffect;
F32 matrix_diag = (ssao_effect[0] + 2.0*ssao_effect[1])/3.0;
F32 matrix_nondiag = (ssao_effect[0] - ssao_effect[1])/3.0;
// This matrix scales (proj of color onto <1/rt(3),1/rt(3),1/rt(3)>) by
@@ -6784,23 +6938,23 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
F32 ssao_effect_mat[] = { matrix_diag, matrix_nondiag, matrix_nondiag,
matrix_nondiag, matrix_diag, matrix_nondiag,
matrix_nondiag, matrix_nondiag, matrix_diag};
- shader.uniformMatrix3fv("ssao_effect_mat", 1, GL_FALSE, ssao_effect_mat);
-
- F32 shadow_offset_error = 1.f + gSavedSettings.getF32("RenderShadowOffsetError") * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
- F32 shadow_bias_error = 1.f + gSavedSettings.getF32("RenderShadowBiasError") * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
-
- shader.uniform2f("screen_res", mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
- shader.uniform1f("near_clip", LLViewerCamera::getInstance()->getNear()*2.f);
- shader.uniform1f ("shadow_offset", gSavedSettings.getF32("RenderShadowOffset")*shadow_offset_error);
- shader.uniform1f("shadow_bias", gSavedSettings.getF32("RenderShadowBias")*shadow_bias_error);
- shader.uniform1f ("spot_shadow_offset", gSavedSettings.getF32("RenderSpotShadowOffset"));
- shader.uniform1f("spot_shadow_bias", gSavedSettings.getF32("RenderSpotShadowBias"));
-
- shader.uniform3fv("sun_dir", 1, mTransformedSunDir.mV);
- shader.uniform2f("shadow_res", mShadow[0].getWidth(), mShadow[0].getHeight());
- shader.uniform2f("proj_shadow_res", mShadow[4].getWidth(), mShadow[4].getHeight());
- shader.uniform1f("depth_cutoff", gSavedSettings.getF32("RenderEdgeDepthCutoff"));
- shader.uniform1f("norm_cutoff", gSavedSettings.getF32("RenderEdgeNormCutoff"));
+ shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_SSAO_EFFECT_MAT, 1, GL_FALSE, ssao_effect_mat);
+
+ F32 shadow_offset_error = 1.f + RenderShadowOffsetError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
+ F32 shadow_bias_error = 1.f + RenderShadowBiasError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
+
+ shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
+ shader.uniform1f(LLShaderMgr::DEFERRED_NEAR_CLIP, LLViewerCamera::getInstance()->getNear()*2.f);
+ shader.uniform1f (LLShaderMgr::DEFERRED_SHADOW_OFFSET, RenderShadowOffset*shadow_offset_error);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, RenderShadowBias*shadow_bias_error);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_OFFSET, RenderSpotShadowOffset);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_BIAS, RenderSpotShadowBias);
+
+ shader.uniform3fv(LLShaderMgr::DEFERRED_SUN_DIR, 1, mTransformedSunDir.mV);
+ shader.uniform2f(LLShaderMgr::DEFERRED_SHADOW_RES, mShadow[0].getWidth(), mShadow[0].getHeight());
+ shader.uniform2f(LLShaderMgr::DEFERRED_PROJ_SHADOW_RES, mShadow[4].getWidth(), mShadow[4].getHeight());
+ shader.uniform1f(LLShaderMgr::DEFERRED_DEPTH_CUTOFF, RenderEdgeDepthCutoff);
+ shader.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff);
if (shader.getUniformLocation("norm_mat") >= 0)
@@ -6839,7 +6993,7 @@ void LLPipeline::renderDeferredLighting()
0, 0, mDeferredDepth.getWidth(), mDeferredDepth.getHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST);
}
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
{
@@ -6886,7 +7040,7 @@ void LLPipeline::renderDeferredLighting()
gGL.pushMatrix();
gGL.loadIdentity();
- if (gSavedSettings.getBOOL("RenderDeferredSSAO") || gSavedSettings.getS32("RenderShadowDetail") > 0)
+ if (RenderDeferredSSAO || RenderShadowDetail > 0)
{
mDeferredLight.bindTarget();
{ //paint shadow/SSAO light map (direct lighting lightmap)
@@ -6932,7 +7086,7 @@ void LLPipeline::renderDeferredLighting()
mDeferredLight.flush();
}
- if (gSavedSettings.getBOOL("RenderDeferredSSAO"))
+ if (RenderDeferredSSAO)
{ //soften direct lighting lightmap
LLFastTimer ftm(FTM_SOFTEN_SHADOW);
//blur lightmap
@@ -6943,10 +7097,10 @@ void LLPipeline::renderDeferredLighting()
bindDeferredShader(gDeferredBlurLightProgram);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- LLVector3 go = gSavedSettings.getVector3("RenderShadowGaussian");
+ LLVector3 go = RenderShadowGaussian;
const U32 kern_length = 4;
- F32 blur_size = gSavedSettings.getF32("RenderShadowBlurSize");
- F32 dist_factor = gSavedSettings.getF32("RenderShadowBlurDistFactor");
+ F32 blur_size = RenderShadowBlurSize;
+ F32 dist_factor = RenderShadowBlurDistFactor;
// sample symmetrically with the middle sample falling exactly on 0.0
F32 x = 0.f;
@@ -7011,7 +7165,7 @@ void LLPipeline::renderDeferredLighting()
glClearColor(0,0,0,0);
mScreen.clear(GL_COLOR_BUFFER_BIT);
- if (gSavedSettings.getBOOL("RenderDeferredAtmospheric"))
+ if (RenderDeferredAtmospheric)
{ //apply sunlight contribution
LLFastTimer ftm(FTM_ATMOSPHERICS);
bindDeferredShader(gDeferredSoftenProgram);
@@ -7056,7 +7210,7 @@ void LLPipeline::renderDeferredLighting()
gPipeline.popRenderTypeMask();
}
- BOOL render_local = gSavedSettings.getBOOL("RenderLocalLights");
+ BOOL render_local = RenderLocalLights;
if (render_local)
{
@@ -7162,10 +7316,10 @@ void LLPipeline::renderDeferredLighting()
LLFastTimer ftm(FTM_LOCAL_LIGHTS);
//glTexCoord4f(tc.v[0], tc.v[1], tc.v[2], s*s);
- gDeferredLightProgram.uniform3fv("center", 1, tc.v);
- gDeferredLightProgram.uniform1f("size", s*s);
- gDeferredLightProgram.uniform3fv("color", 1, col.mV);
- gDeferredLightProgram.uniform1f("falloff", volume->getLightFalloff()*0.5f);
+ gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
+ gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
+ gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
+ gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
//gGL.diffuseColor4f(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff()*0.5f);
gGL.syncMatrices();
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
@@ -7197,7 +7351,7 @@ void LLPipeline::renderDeferredLighting()
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- gDeferredSpotLightProgram.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredSpotLightProgram.enableTexture(LLShaderMgr::DEFERRED_PROJECTION);
for (LLDrawable::drawable_list_t::iterator iter = spot_lights.begin(); iter != spot_lights.end(); ++iter)
{
@@ -7236,16 +7390,16 @@ void LLPipeline::renderDeferredLighting()
v[6].set(c[0]+s,c[1]+s,c[2]-s); // 6 - 0110
v[7].set(c[0]+s,c[1]+s,c[2]+s); // 7 - 0111
- gDeferredSpotLightProgram.uniform3fv("center", 1, tc.v);
- gDeferredSpotLightProgram.uniform1f("size", s*s);
- gDeferredSpotLightProgram.uniform3fv("color", 1, col.mV);
- gDeferredSpotLightProgram.uniform1f("falloff", volume->getLightFalloff()*0.5f);
+ gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
+ gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
+ gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
+ gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
gGL.syncMatrices();
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glDrawRangeElements(GL_TRIANGLE_FAN, 0, 7, 8,
GL_UNSIGNED_SHORT, get_box_fan_indices_ptr(camera, center));
}
- gDeferredSpotLightProgram.disableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredSpotLightProgram.disableTexture(LLShaderMgr::DEFERRED_PROJECTION);
unbindDeferredShader(gDeferredSpotLightProgram);
}
@@ -7292,12 +7446,12 @@ void LLPipeline::renderDeferredLighting()
count++;
if (count == max_count || fullscreen_lights.empty())
{
- gDeferredMultiLightProgram.uniform1i("light_count", count);
- gDeferredMultiLightProgram.uniform4fv("light", count, (GLfloat*) light);
- gDeferredMultiLightProgram.uniform4fv("light_col", count, (GLfloat*) col);
- gDeferredMultiLightProgram.uniform1f("far_z", far_z);
+ gDeferredMultiLightProgram.uniform1i(LLShaderMgr::MULTI_LIGHT_COUNT, count);
+ gDeferredMultiLightProgram.uniform4fv(LLShaderMgr::MULTI_LIGHT, count, (GLfloat*) light);
+ gDeferredMultiLightProgram.uniform4fv(LLShaderMgr::MULTI_LIGHT_COL, count, (GLfloat*) col);
+ gDeferredMultiLightProgram.uniform1f(LLShaderMgr::MULTI_LIGHT_FAR_Z, far_z);
far_z = 0.f;
- count = 0;
+ count = 0;
mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
}
}
@@ -7306,7 +7460,7 @@ void LLPipeline::renderDeferredLighting()
bindDeferredShader(gDeferredMultiSpotLightProgram);
- gDeferredMultiSpotLightProgram.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredMultiSpotLightProgram.enableTexture(LLShaderMgr::DEFERRED_PROJECTION);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
@@ -7331,14 +7485,14 @@ void LLPipeline::renderDeferredLighting()
LLColor3 col = volume->getLightColor();
col *= volume->getLightIntensity();
- gDeferredMultiSpotLightProgram.uniform3fv("center", 1, tc.v);
- gDeferredMultiSpotLightProgram.uniform1f("size", s*s);
- gDeferredMultiSpotLightProgram.uniform3fv("color", 1, col.mV);
- gDeferredMultiSpotLightProgram.uniform1f("falloff", volume->getLightFalloff()*0.5f);
+ gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
+ gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
+ gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
+ gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
}
- gDeferredMultiSpotLightProgram.disableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredMultiSpotLightProgram.disableTexture(LLShaderMgr::DEFERRED_PROJECTION);
unbindDeferredShader(gDeferredMultiSpotLightProgram);
gGL.popMatrix();
@@ -7463,13 +7617,13 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
F32 proj_range = far_clip - near_clip;
glh::matrix4f light_proj = gl_perspective(fovy, aspect, near_clip, far_clip);
screen_to_light = trans * light_proj * screen_to_light;
- shader.uniformMatrix4fv("proj_mat", 1, FALSE, screen_to_light.m);
- shader.uniform1f("proj_near", near_clip);
- shader.uniform3fv("proj_p", 1, p1.v);
- shader.uniform3fv("proj_n", 1, n.v);
- shader.uniform3fv("proj_origin", 1, screen_origin.v);
- shader.uniform1f("proj_range", proj_range);
- shader.uniform1f("proj_ambiance", params.mV[2]);
+ shader.uniformMatrix4fv(LLShaderMgr::PROJECTOR_MATRIX, 1, FALSE, screen_to_light.m);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_NEAR, near_clip);
+ shader.uniform3fv(LLShaderMgr::PROJECTOR_P, 1, p1.v);
+ shader.uniform3fv(LLShaderMgr::PROJECTOR_N, 1, n.v);
+ shader.uniform3fv(LLShaderMgr::PROJECTOR_ORIGIN, 1, screen_origin.v);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_RANGE, proj_range);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_AMBIANCE, params.mV[2]);
S32 s_idx = -1;
for (U32 i = 0; i < 2; i++)
@@ -7480,15 +7634,15 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
}
}
- shader.uniform1i("proj_shadow_idx", s_idx);
+ shader.uniform1i(LLShaderMgr::PROJECTOR_SHADOW_INDEX, s_idx);
if (s_idx >= 0)
{
- shader.uniform1f("shadow_fade", 1.f-mSpotLightFade[s_idx]);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_SHADOW_FADE, 1.f-mSpotLightFade[s_idx]);
}
else
{
- shader.uniform1f("shadow_fade", 1.f);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_SHADOW_FADE, 1.f);
}
{
@@ -7522,7 +7676,7 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
img = LLViewerFetchedTexture::sWhiteImagep;
}
- S32 channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ S32 channel = shader.enableTexture(LLShaderMgr::DEFERRED_PROJECTION);
if (channel > -1)
{
@@ -7532,9 +7686,9 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
F32 lod_range = logf(img->getWidth())/logf(2.f);
- shader.uniform1f("proj_focus", focus);
- shader.uniform1f("proj_lod", lod_range);
- shader.uniform1f("proj_ambient_lod", llclamp((proj_range-focus)/proj_range*lod_range, 0.f, 1.f));
+ shader.uniform1f(LLShaderMgr::PROJECTOR_FOCUS, focus);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_LOD, lod_range);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_AMBIENT_LOD, llclamp((proj_range-focus)/proj_range*lod_range, 0.f, 1.f));
}
}
@@ -7543,17 +7697,17 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
{
stop_glerror();
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
+ shader.disableTexture(LLShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_DEPTH, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
+ shader.disableTexture(LLShaderMgr::DIFFUSE_MAP);
+ shader.disableTexture(LLShaderMgr::DEFERRED_BLOOM);
for (U32 i = 0; i < 4; i++)
{
- if (shader.disableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE) > -1)
+ if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE) > -1)
{
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
}
@@ -7561,16 +7715,16 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
for (U32 i = 4; i < 6; i++)
{
- if (shader.disableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i) > -1)
+ if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i) > -1)
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
}
}
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_NOISE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHTFUNC);
+ shader.disableTexture(LLShaderMgr::DEFERRED_NOISE);
+ shader.disableTexture(LLShaderMgr::DEFERRED_LIGHTFUNC);
- S32 channel = shader.disableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
+ S32 channel = shader.disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
if (channel > -1)
{
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
@@ -7718,7 +7872,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLPipeline::RENDER_TYPE_CLOUDS,
LLPipeline::END_RENDER_TYPES);
- S32 detail = gSavedSettings.getS32("RenderReflectionDetail");
+ S32 detail = RenderReflectionDetail;
if (detail > 0)
{ //mask out selected geometry based on reflection detail
if (detail < 4)
@@ -7742,7 +7896,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
if (LLDrawPoolWater::sNeedsDistortionUpdate)
{
- if (gSavedSettings.getS32("RenderReflectionDetail") > 0)
+ if (RenderReflectionDetail > 0)
{
gPipeline.grabReferences(ref_result);
LLGLUserClipPlane clip_plane(plane, mat, projection);
@@ -8233,7 +8387,7 @@ void LLPipeline::generateHighlight(LLCamera& camera)
if (!mHighlightSet.empty())
{
- F32 transition = gFrameIntervalSeconds/gSavedSettings.getF32("RenderHighlightFadeTime");
+ F32 transition = gFrameIntervalSeconds/RenderHighlightFadeTime;
LLGLDisable test(GL_ALPHA_TEST);
LLGLDepthTest depth(GL_FALSE);
@@ -8279,7 +8433,7 @@ void LLPipeline::generateHighlight(LLCamera& camera)
void LLPipeline::generateSunShadow(LLCamera& camera)
{
- if (!sRenderDeferred || gSavedSettings.getS32("RenderShadowDetail") <= 0)
+ if (!sRenderDeferred || RenderShadowDetail <= 0)
{
return;
}
@@ -8337,25 +8491,25 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
glh::matrix4f proj[6];
//clip contains parallel split distances for 3 splits
- LLVector3 clip = gSavedSettings.getVector3("RenderShadowClipPlanes");
+ LLVector3 clip = RenderShadowClipPlanes;
//F32 slope_threshold = gSavedSettings.getF32("RenderShadowSlopeThreshold");
//far clip on last split is minimum of camera view distance and 128
mSunClipPlanes = LLVector4(clip, clip.mV[2] * clip.mV[2]/clip.mV[1]);
- clip = gSavedSettings.getVector3("RenderShadowOrthoClipPlanes");
+ clip = RenderShadowOrthoClipPlanes;
mSunOrthoClipPlanes = LLVector4(clip, clip.mV[2]*clip.mV[2]/clip.mV[1]);
//currently used for amount to extrude frusta corners for constructing shadow frusta
- LLVector3 n = gSavedSettings.getVector3("RenderShadowNearDist");
+ LLVector3 n = RenderShadowNearDist;
//F32 nearDist[] = { n.mV[0], n.mV[1], n.mV[2], n.mV[2] };
//put together a universal "near clip" plane for shadow frusta
LLPlane shadow_near_clip;
{
LLVector3 p = gAgent.getPositionAgent();
- p += mSunDir * gSavedSettings.getF32("RenderFarClip")*2.f;
+ p += mSunDir * RenderFarClip*2.f;
shadow_near_clip.setVec(p, mSunDir);
}
@@ -8442,7 +8596,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
F32 range = far_clip-near_clip;
- LLVector3 split_exp = gSavedSettings.getVector3("RenderShadowSplitExponent");
+ LLVector3 split_exp = RenderShadowSplitExponent;
F32 da = 1.f-llmax( fabsf(lightDir*up), fabsf(lightDir*camera.getLeftAxis()) );
@@ -8653,7 +8807,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
mShadowError.mV[j] /= wpf.size();
mShadowError.mV[j] /= size.mV[0];
- if (mShadowError.mV[j] > gSavedSettings.getF32("RenderShadowErrorCutoff"))
+ if (mShadowError.mV[j] > RenderShadowErrorCutoff)
{ //just use ortho projection
mShadowFOV.mV[j] = -1.f;
origin.clearVec();
@@ -8696,7 +8850,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
fovx = acos(fovx);
fovz = acos(fovz);
- F32 cutoff = llmin(gSavedSettings.getF32("RenderShadowFOVCutoff"), 1.4f);
+ F32 cutoff = llmin((F32) RenderShadowFOVCutoff, 1.4f);
mShadowFOV.mV[j] = fovx;
@@ -8840,7 +8994,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
//hack to disable projector shadows
- bool gen_shadow = gSavedSettings.getS32("RenderShadowDetail") > 1;
+ bool gen_shadow = RenderShadowDetail > 1;
if (gen_shadow)
{
@@ -8979,7 +9133,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
}
- if (!gSavedSettings.getBOOL("CameraOffset"))
+ if (!CameraOffset)
{
glh_set_current_modelview(saved_view);
glh_set_current_projection(saved_proj);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 86579261ca..584e6e4c23 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -360,6 +360,7 @@ public:
static void updateRenderDeferred();
static void refreshRenderDeferred();
+ static void refreshCachedSettings();
static void throttleNewMemoryAllocation(BOOL disable);
@@ -771,6 +772,79 @@ public:
//debug use
static U32 sCurRenderPoolType ;
+
+ //cached settings
+ static BOOL WindLightUseAtmosShaders;
+ static BOOL VertexShaderEnable;
+ static BOOL RenderAvatarVP;
+ static BOOL RenderDeferred;
+ static F32 RenderDeferredSunWash;
+ static U32 RenderFSAASamples;
+ static U32 RenderResolutionDivisor;
+ static BOOL RenderUIBuffer;
+ static S32 RenderShadowDetail;
+ static BOOL RenderDeferredSSAO;
+ static F32 RenderShadowResolutionScale;
+ static BOOL RenderLocalLights;
+ static BOOL RenderDelayCreation;
+ static BOOL RenderAnimateRes;
+ static BOOL FreezeTime;
+ static S32 DebugBeaconLineWidth;
+ static F32 RenderHighlightBrightness;
+ static LLColor4 RenderHighlightColor;
+ static F32 RenderHighlightThickness;
+ static BOOL RenderSpotLightsInNondeferred;
+ static LLColor4 PreviewAmbientColor;
+ static LLColor4 PreviewDiffuse0;
+ static LLColor4 PreviewSpecular0;
+ static LLColor4 PreviewDiffuse1;
+ static LLColor4 PreviewSpecular1;
+ static LLColor4 PreviewDiffuse2;
+ static LLColor4 PreviewSpecular2;
+ static LLVector3 PreviewDirection0;
+ static LLVector3 PreviewDirection1;
+ static LLVector3 PreviewDirection2;
+ static F32 RenderGlowMinLuminance;
+ static F32 RenderGlowMaxExtractAlpha;
+ static F32 RenderGlowWarmthAmount;
+ static LLVector3 RenderGlowLumWeights;
+ static LLVector3 RenderGlowWarmthWeights;
+ static S32 RenderGlowResolutionPow;
+ static S32 RenderGlowIterations;
+ static F32 RenderGlowWidth;
+ static F32 RenderGlowStrength;
+ static BOOL RenderDepthOfField;
+ static F32 CameraFocusTransitionTime;
+ static F32 CameraFNumber;
+ static F32 CameraFocalLength;
+ static F32 CameraFieldOfView;
+ static F32 RenderShadowNoise;
+ static F32 RenderShadowBlurSize;
+ static F32 RenderSSAOScale;
+ static U32 RenderSSAOMaxScale;
+ static F32 RenderSSAOFactor;
+ static LLVector3 RenderSSAOEffect;
+ static F32 RenderShadowOffsetError;
+ static F32 RenderShadowBiasError;
+ static F32 RenderShadowOffset;
+ static F32 RenderShadowBias;
+ static F32 RenderSpotShadowOffset;
+ static F32 RenderSpotShadowBias;
+ static F32 RenderEdgeDepthCutoff;
+ static F32 RenderEdgeNormCutoff;
+ static LLVector3 RenderShadowGaussian;
+ static F32 RenderShadowBlurDistFactor;
+ static BOOL RenderDeferredAtmospheric;
+ static S32 RenderReflectionDetail;
+ static F32 RenderHighlightFadeTime;
+ static LLVector3 RenderShadowClipPlanes;
+ static LLVector3 RenderShadowOrthoClipPlanes;
+ static LLVector3 RenderShadowNearDist;
+ static F32 RenderFarClip;
+ static LLVector3 RenderShadowSplitExponent;
+ static F32 RenderShadowErrorCutoff;
+ static F32 RenderShadowFOVCutoff;
+ static BOOL CameraOffset;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);
--
cgit v1.2.3
From d7f123ab526df7dbef153e0de71f325ab1b69571 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Tue, 11 Oct 2011 13:37:46 -0400
Subject: CHOP-397 WIP - removed windows updater.exe, no longer used
---
indra/newview/app_settings/settings.xml | 2 +-
indra/newview/viewer_manifest.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
mode change 100644 => 100755 indra/newview/app_settings/settings.xml
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
old mode 100644
new mode 100755
index 8804c40aff..1b539fe0db
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5655,7 +5655,7 @@
Type
Boolean
Value
- 1
+ 0
MemProfiling
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 6165292457..0931c4ec9b 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -495,8 +495,9 @@ class WindowsManifest(ViewerManifest):
# tag:"crash-logger" here as a cue to the exporter
self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
dst="win_crash_logger.exe")
- self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
- dst="updater.exe")
+# For CHOP-397, windows updater no longer used.
+# self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
+# dst="updater.exe")
if not self.is_packaging_viewer():
self.package_file = "copied_deps"
--
cgit v1.2.3
From 694db7fc9a84ac1cc87e7dd6b0ff60f8c8433366 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Tue, 11 Oct 2011 15:35:33 -0400
Subject: CHOP-397 WIP - Removed accidental settings change
---
indra/newview/app_settings/settings.xml | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 12a8d297e7..8804c40aff 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5655,18 +5655,7 @@
Type
Boolean
Value
- 0
-
- MemoryPrivatePoolSize
-
- Comment
- Size of the private memory pool in MB (min. value is 256)
- Persist
1
- Type
- U32
- Value
- 512
MemProfiling
@@ -13575,7 +13564,7 @@
Type
Boolean
Value
- 1
+ 0
ShowOfferedInventory
--
cgit v1.2.3
From 2322c57b4dd2b4338eec2ca9db2425eff4bfd6d5 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 11 Oct 2011 14:55:33 -0500
Subject: SH-2545 Fix for transparent water option doing nothing when shaders
are enabled.
---
.../shaders/class1/objects/simpleTexGenV.glsl | 77 ++++++++++++++++++++++
indra/newview/lldrawpoolwater.cpp | 46 +++++++++----
indra/newview/llviewershadermgr.cpp | 43 +++++++++++-
indra/newview/llviewershadermgr.h | 2 +
indra/newview/llwlparamset.cpp | 4 +-
5 files changed, 159 insertions(+), 13 deletions(-)
create mode 100644 indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl
new file mode 100644
index 0000000000..d4dee78793
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl
@@ -0,0 +1,77 @@
+/**
+ * @file simpleV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 normal;
+
+uniform vec4 color;
+uniform vec4 object_plane_t;
+uniform vec4 object_plane_s;
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
+{
+ vec4 tcoord;
+
+ tcoord.x = dot(vpos, tp0);
+ tcoord.y = dot(vpos, tp1);
+ tcoord.z = tc.z;
+ tcoord.w = tc.w;
+
+ tcoord = mat * tcoord;
+
+ return tcoord;
+}
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(position.xyz,1.0);
+ passTextureIndex();
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+ vary_texcoord0.xy = texgen_object(vec4(position.xyz, 1.0), vec4(texcoord0,0,1), texture_matrix0, object_plane_s, object_plane_t).xy;
+
+ vec3 norm = normalize(normal_matrix * normal);
+
+ calcAtmospherics(pos.xyz);
+
+ vec4 color = calcLighting(pos.xyz, norm, color, vec4(0.));
+ vertex_color = color;
+
+
+}
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index f6fe96877d..4f6eaa5a5b 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -169,7 +169,7 @@ void LLDrawPoolWater::render(S32 pass)
std::sort(mDrawFace.begin(), mDrawFace.end(), LLFace::CompareDistanceGreater());
// See if we are rendering water as opaque or not
- if (!gSavedSettings.getBOOL("RenderTransparentWater") && !LLGLSLShader::sNoFixedFunction)
+ if (!gSavedSettings.getBOOL("RenderTransparentWater"))
{
// render water for low end hardware
renderOpaqueLegacyWater();
@@ -334,9 +334,19 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
{
LLVOSky *voskyp = gSky.mVOSkyp;
+ LLGLSLShader* shader = NULL;
if (LLGLSLShader::sNoFixedFunction)
{
- gObjectSimpleProgram.bind();
+ if (LLPipeline::sUnderWaterRender)
+ {
+ shader = &gObjectSimpleNonIndexedTexGenWaterProgram;
+ }
+ else
+ {
+ shader = &gObjectSimpleNonIndexedTexGenProgram;
+ }
+
+ shader->bind();
}
stop_glerror();
@@ -361,10 +371,13 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
gGL.getTexUnit(0)->bind(mOpaqueWaterImagep);
// Automatically generate texture coords for water texture
- glEnable(GL_TEXTURE_GEN_S); //texture unit 0
- glEnable(GL_TEXTURE_GEN_T); //texture unit 0
- glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ if (!shader)
+ {
+ glEnable(GL_TEXTURE_GEN_S); //texture unit 0
+ glEnable(GL_TEXTURE_GEN_T); //texture unit 0
+ glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ }
// Use the fact that we know all water faces are the same size
// to save some computation
@@ -387,8 +400,16 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
F32 tp0[4] = { 16.f / 256.f, 0.0f, 0.0f, offset };
F32 tp1[4] = { 0.0f, 16.f / 256.f, 0.0f, offset };
- glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1);
+ if (!shader)
+ {
+ glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0);
+ glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1);
+ }
+ else
+ {
+ shader->uniform4fv("object_plane_s", 1, tp0);
+ shader->uniform4fv("object_plane_t", 1, tp1);
+ }
gGL.diffuseColor3f(1.f, 1.f, 1.f);
@@ -406,9 +427,12 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
stop_glerror();
- // Reset the settings back to expected values
- glDisable(GL_TEXTURE_GEN_S); //texture unit 0
- glDisable(GL_TEXTURE_GEN_T); //texture unit 0
+ if (!shader)
+ {
+ // Reset the settings back to expected values
+ glDisable(GL_TEXTURE_GEN_S); //texture unit 0
+ glDisable(GL_TEXTURE_GEN_T); //texture unit 0
+ }
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 8bc573135c..80727764c1 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -96,6 +96,8 @@ LLGLSLShader gObjectFullbrightNoColorProgram;
LLGLSLShader gObjectFullbrightNoColorWaterProgram;
LLGLSLShader gObjectSimpleNonIndexedProgram;
+LLGLSLShader gObjectSimpleNonIndexedTexGenProgram;
+LLGLSLShader gObjectSimpleNonIndexedTexGenWaterProgram;
LLGLSLShader gObjectSimpleNonIndexedWaterProgram;
LLGLSLShader gObjectAlphaMaskNonIndexedProgram;
LLGLSLShader gObjectAlphaMaskNonIndexedWaterProgram;
@@ -217,6 +219,8 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gObjectFullbrightShinyProgram);
mShaderList.push_back(&gObjectFullbrightShinyWaterProgram);
mShaderList.push_back(&gObjectSimpleNonIndexedProgram);
+ mShaderList.push_back(&gObjectSimpleNonIndexedTexGenProgram);
+ mShaderList.push_back(&gObjectSimpleNonIndexedTexGenWaterProgram);
mShaderList.push_back(&gObjectSimpleNonIndexedWaterProgram);
mShaderList.push_back(&gObjectAlphaMaskNonIndexedProgram);
mShaderList.push_back(&gObjectAlphaMaskNonIndexedWaterProgram);
@@ -625,6 +629,8 @@ void LLViewerShaderMgr::unloadShaders()
gObjectShinyWaterProgram.unload();
gObjectSimpleNonIndexedProgram.unload();
+ gObjectSimpleNonIndexedTexGenProgram.unload();
+ gObjectSimpleNonIndexedTexGenWaterProgram.unload();
gObjectSimpleNonIndexedWaterProgram.unload();
gObjectAlphaMaskNonIndexedProgram.unload();
gObjectAlphaMaskNonIndexedWaterProgram.unload();
@@ -1505,7 +1511,8 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightShinyNonIndexedProgram.unload();
gObjectFullbrightShinyNonIndexedWaterProgram.unload();
gObjectShinyNonIndexedWaterProgram.unload();
- gObjectSimpleNonIndexedProgram.unload();
+ gObjectSimpleNonIndexedTexGenProgram.unload();
+ gObjectSimpleNonIndexedTexGenWaterProgram.unload();
gObjectSimpleNonIndexedWaterProgram.unload();
gObjectAlphaMaskNonIndexedProgram.unload();
gObjectAlphaMaskNonIndexedWaterProgram.unload();
@@ -1547,6 +1554,23 @@ BOOL LLViewerShaderMgr::loadShadersObject()
success = gObjectSimpleNonIndexedProgram.createShader(NULL, NULL);
}
+ if (success)
+ {
+ gObjectSimpleNonIndexedTexGenProgram.mName = "Non indexed tex-gen Shader";
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasGamma = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasLighting = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.disableTextureIndex = true;
+ gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.clear();
+ gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectSimpleNonIndexedTexGenProgram.createShader(NULL, NULL);
+ }
+
+
if (success)
{
gObjectSimpleNonIndexedWaterProgram.mName = "Non indexed Water Shader";
@@ -1564,6 +1588,23 @@ BOOL LLViewerShaderMgr::loadShadersObject()
success = gObjectSimpleNonIndexedWaterProgram.createShader(NULL, NULL);
}
+ if (success)
+ {
+ gObjectSimpleNonIndexedTexGenWaterProgram.mName = "Non indexed tex-gen Water Shader";
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasLighting = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.clear();
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectSimpleNonIndexedTexGenWaterProgram.createShader(NULL, NULL);
+ }
+
if (success)
{
gObjectAlphaMaskNonIndexedProgram.mName = "Non indexed alpha mask Shader";
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 01f8c3987c..26cef8cb3e 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -229,6 +229,8 @@ extern LLGLSLShader gObjectSimpleAlphaMaskProgram;
extern LLGLSLShader gObjectSimpleWaterProgram;
extern LLGLSLShader gObjectSimpleWaterAlphaMaskProgram;
extern LLGLSLShader gObjectSimpleNonIndexedProgram;
+extern LLGLSLShader gObjectSimpleNonIndexedTexGenProgram;
+extern LLGLSLShader gObjectSimpleNonIndexedTexGenWaterProgram;
extern LLGLSLShader gObjectSimpleNonIndexedWaterProgram;
extern LLGLSLShader gObjectAlphaMaskNonIndexedProgram;
extern LLGLSLShader gObjectAlphaMaskNonIndexedWaterProgram;
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 4a1db3d26c..5bb7025031 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -73,11 +73,13 @@ static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update");
void LLWLParamSet::update(LLGLSLShader * shader) const
{
+ LLFastTimer t(FTM_WL_PARAM_UPDATE);
+
for(LLSD::map_const_iterator i = mParamValues.beginMap();
i != mParamValues.endMap();
++i)
{
- LLFastTimer t(FTM_WL_PARAM_UPDATE);
+
const std::string& param = i->first;
--
cgit v1.2.3
From af0be560002d4de4d9d89709b5d3b4cc1aef31fc Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Tue, 11 Oct 2011 15:57:00 -0400
Subject: settings fix
---
indra/newview/app_settings/settings.xml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8804c40aff..15f1bbd1b1 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5657,6 +5657,17 @@
Value
1
+ MemoryPrivatePoolSize
+
+ Comment
+ Size of the private memory pool in MB (min. value is 256)
+ Persist
+ 1
+ Type
+ U32
+ Value
+ 512
+
MemProfiling
Comment
@@ -13564,7 +13575,7 @@
Type
Boolean
Value
- 0
+ 1
ShowOfferedInventory
--
cgit v1.2.3
From 9a0bb3d871d476d43edc6c7a29f6bedff1c45247 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 11 Oct 2011 15:11:52 -0500
Subject: SH-2510 Never use shaders if gl version < 2.0
---
indra/newview/llviewershadermgr.cpp | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 80727764c1..31ed210ae3 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -357,6 +357,7 @@ void LLViewerShaderMgr::setShaders()
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1);
+ reentrance = true;
if (LLRender::sGLCoreProfile || gGLManager.mGLVersion >= 2.f)
{ //ALWAYS use shaders where available
@@ -364,19 +365,15 @@ void LLViewerShaderMgr::setShaders()
{ //vertex shaders MUST be enabled to use core profile
gSavedSettings.setBOOL("VertexShaderEnable", TRUE);
}
-
- if (!gSavedSettings.getBOOL("RenderTransparentWater"))
- { //non-transparent water uses fixed function
- gSavedSettings.setBOOL("RenderTransparentWater", TRUE);
- }
}
-
-
+ else if (gGLManager.mGLVersion < 2.f)
+ { //NEVER use shaders on a pre 2.0 context
+ gSavedSettings.setBOOL("VertexShaderEnable", FALSE);
+ }
+
//setup preprocessor definitions
LLShaderMgr::instance()->mDefinitions["NUM_TEX_UNITS"] = llformat("%d", gGLManager.mNumTextureImageUnits);
-
- reentrance = true;
-
+
// Make sure the compiled shader map is cleared before we recompile shaders.
mShaderObjects.clear();
--
cgit v1.2.3
From 6c157557dc50806670dcf7fb5aa14bc5f9678282 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 12 Oct 2011 10:51:10 -0500
Subject: SH-2510 Potential fix for crash on startup on systems that don't have
GL_ARB_shader_objects
---
indra/newview/featuretable.txt | 1 +
indra/newview/featuretable_xp.txt | 1 +
2 files changed, 2 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 9379d336d0..22d76cb082 100755
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -65,6 +65,7 @@ RenderShadowDetail 1 2
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 32
//
// Low Graphics Settings
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index fffd30c0d8..a8e13ce65c 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -65,6 +65,7 @@ RenderShadowDetail 1 0
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 32
//
// Low Graphics Settings
--
cgit v1.2.3
From 7b6723d1e0158d5dc326266a0332e87f634f9755 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 13 Oct 2011 01:19:45 -0500
Subject: SH-1650 Mitigate memory fragmentation by holding onto and reusing
VBOs
---
indra/newview/lldrawpoolavatar.cpp | 6 +++---
indra/newview/lldrawpooltree.cpp | 4 ++--
indra/newview/llface.cpp | 13 +++++++++----
indra/newview/llfloatermodelpreview.cpp | 2 +-
indra/newview/llspatialpartition.cpp | 10 +++++-----
indra/newview/llviewerdisplay.cpp | 4 ----
indra/newview/llviewerwindow.cpp | 2 +-
indra/newview/llvoavatar.cpp | 4 ++--
indra/newview/llvowlsky.cpp | 4 ++--
indra/newview/pipeline.cpp | 26 +++++---------------------
10 files changed, 30 insertions(+), 45 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index a710bdcdbd..7290a48a1a 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1277,8 +1277,8 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
if (buffer.isNull() ||
buffer->getTypeMask() != data_mask ||
- buffer->getRequestedVerts() != vol_face.mNumVertices ||
- buffer->getRequestedIndices() != vol_face.mNumIndices ||
+ buffer->getNumVerts() != vol_face.mNumVertices ||
+ buffer->getNumIndices() != vol_face.mNumIndices ||
(drawable && drawable->isState(LLDrawable::REBUILD_ALL)))
{
face->setGeomIndex(0);
@@ -1366,7 +1366,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLMatrix4a bind_shape_matrix;
bind_shape_matrix.loadu(skin->mBindShapeMatrix);
- for (U32 j = 0; j < buffer->getRequestedVerts(); ++j)
+ for (U32 j = 0; j < buffer->getNumVerts(); ++j)
{
LLMatrix4a final_mat;
final_mat.clear();
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 3fe5b4d929..cdf6e1ab52 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -113,8 +113,8 @@ void LLDrawPoolTree::render(S32 pass)
if(buff)
{
buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
- buff->drawRange(LLRender::TRIANGLES, 0, buff->getRequestedVerts()-1, buff->getRequestedIndices(), 0);
- gPipeline.addTrianglesDrawn(buff->getRequestedIndices());
+ buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
+ gPipeline.addTrianglesDrawn(buff->getNumIndices());
}
}
}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 36b88ebbd4..eab3dcfadd 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -362,8 +362,8 @@ void LLFace::setSize(S32 num_vertices, S32 num_indices, bool align)
{
if (align)
{
- //allocate vertices in blocks of 16 for alignment
- num_vertices = (num_vertices + 0xF) & ~0xF;
+ //allocate vertices in blocks of 4 for alignment
+ num_vertices = (num_vertices + 0x3) & ~0x3;
}
if (mGeomCount != num_vertices ||
@@ -1073,6 +1073,11 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
S32 num_vertices = (S32)vf.mNumVertices;
S32 num_indices = (S32) vf.mNumIndices;
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCTREE))
+ {
+ updateRebuildFlags();
+ }
+
bool map_range = gGLManager.mHasMapBufferRange || gGLManager.mHasFlushBufferRange;
if (mVertexBuffer.notNull())
@@ -2055,7 +2060,7 @@ BOOL LLFace::verify(const U32* indices_array) const
}
// First, check whether the face data fits within the pool's range.
- if ((mGeomIndex + mGeomCount) > mVertexBuffer->getRequestedVerts())
+ if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts())
{
ok = FALSE;
llinfos << "Face references invalid vertices!" << llendl;
@@ -2074,7 +2079,7 @@ BOOL LLFace::verify(const U32* indices_array) const
llinfos << "Face has bogus indices count" << llendl;
}
- if (mIndicesIndex + mIndicesCount > mVertexBuffer->getRequestedIndices())
+ if (mIndicesIndex + mIndicesCount > mVertexBuffer->getNumIndices())
{
ok = FALSE;
llinfos << "Face references invalid indices!" << llendl;
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index d9ce72a2c2..8f6013f2d9 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -5457,7 +5457,7 @@ BOOL LLModelPreview::render()
}
}
- for (U32 j = 0; j < buffer->getRequestedVerts(); ++j)
+ for (U32 j = 0; j < buffer->getNumVerts(); ++j)
{
LLMatrix4 final_mat;
final_mat.mMatrix[0][0] = final_mat.mMatrix[1][1] = final_mat.mMatrix[2][2] = final_mat.mMatrix[3][3] = 0.f;
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index ffb0ce4056..2530f1f0d4 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2454,7 +2454,7 @@ void pushBufferVerts(LLVertexBuffer* buffer, U32 mask)
if (buffer)
{
buffer->setBuffer(mask);
- buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getRequestedVerts()-1, buffer->getRequestedIndices(), 0);
+ buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
}
}
@@ -2526,7 +2526,7 @@ void renderOctree(LLSpatialGroup* group)
//coded by buffer usage and activity
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
LLVector4 col;
- /*if (group->mBuilt > 0.f)
+ if (group->mBuilt > 0.f)
{
group->mBuilt -= 2.f * gFrameIntervalSeconds;
if (group->mBufferUsage == GL_STATIC_DRAW_ARB)
@@ -2595,7 +2595,7 @@ void renderOctree(LLSpatialGroup* group)
gGL.diffuseColor4f(1,1,1,1);
}
}
- else*/
+ else
{
if (group->mBufferUsage == GL_STATIC_DRAW_ARB && !group->getData().empty()
&& group->mSpatialPartition->mRenderByGroup)
@@ -3442,11 +3442,11 @@ void renderPhysicsShapes(LLSpatialGroup* group)
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
gGL.diffuseColor3f(0.2f, 0.5f, 0.3f);
- buff->draw(LLRender::TRIANGLES, buff->getRequestedIndices(), 0);
+ buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
gGL.diffuseColor3f(0.2f, 1.f, 0.3f);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- buff->draw(LLRender::TRIANGLES, buff->getRequestedIndices(), 0);
+ buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
}
}
}
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 1832416a4b..e0359cc61d 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -661,10 +661,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SWAP);
- {
- LLFastTimer ftm(FTM_CLIENT_COPY);
- LLVertexBuffer::clientCopy(0.016);
- }
if (gResizeScreenTexture)
{
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 2aac43d99e..f3e9bc711a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -532,7 +532,7 @@ public:
}
- addText(xpos, ypos, llformat("%d MB Vertex Data", LLVertexBuffer::sAllocatedBytes/(1024*1024)));
+ addText(xpos, ypos, llformat("%d MB Vertex Data (%d MB Pooled)", LLVertexBuffer::sAllocatedBytes/(1024*1024), LLVBOPool::sBytesPooled/(1024*1024)));
ypos += y_inc;
addText(xpos, ypos, llformat("%d Vertex Buffers", LLVertexBuffer::sGLCount));
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 5687ba5064..6506938766 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2117,8 +2117,8 @@ void LLVOAvatar::updateMeshData()
}
else
{
- if (buff->getRequestedIndices() == num_indices &&
- buff->getRequestedVerts() == num_vertices)
+ if (buff->getNumIndices() == num_indices &&
+ buff->getNumVerts() == num_vertices)
{
terse_update = true;
}
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index 14fd0a1eb1..f1c5499d84 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -516,9 +516,9 @@ void LLVOWLSky::drawDome(void)
strips_segment->drawRange(
LLRender::TRIANGLE_STRIP,
- 0, strips_segment->getRequestedVerts()-1, strips_segment->getRequestedIndices(),
+ 0, strips_segment->getNumVerts()-1, strips_segment->getNumIndices(),
0);
- gPipeline.addTrianglesDrawn(strips_segment->getRequestedIndices(), LLRender::TRIANGLE_STRIP);
+ gPipeline.addTrianglesDrawn(strips_segment->getNumIndices(), LLRender::TRIANGLE_STRIP);
}
#else
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index e4125c8dc8..5035e0197d 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -264,15 +264,7 @@ std::string gPoolNames[] =
void drawBox(const LLVector3& c, const LLVector3& r);
void drawBoxOutline(const LLVector3& pos, const LLVector3& size);
-
-U32 nhpo2(U32 v)
-{
- U32 r = 1;
- while (r < v) {
- r *= 2;
- }
- return r;
-}
+U32 nhpo2(U32 v);
glh::matrix4f glh_copy_matrix(F32* src)
{
@@ -2902,11 +2894,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
}
}
- {
- LLFastTimer ftm(FTM_CLIENT_COPY);
- LLVertexBuffer::clientCopy();
- }
-
+
postSort(camera);
}
@@ -6122,13 +6110,7 @@ void LLPipeline::resetVertexBuffers()
llwarns << "VBO wipe failed." << llendl;
}
- if (!LLVertexBuffer::sStreamIBOPool.mNameList.empty() ||
- !LLVertexBuffer::sStreamVBOPool.mNameList.empty() ||
- !LLVertexBuffer::sDynamicIBOPool.mNameList.empty() ||
- !LLVertexBuffer::sDynamicVBOPool.mNameList.empty())
- {
- llwarns << "VBO name pool cleanup failed." << llendl;
- }
+ llassert(LLVertexBuffer::sGLCount == 0);
LLVertexBuffer::unbind();
@@ -6142,6 +6124,8 @@ void LLPipeline::resetVertexBuffers()
sBakeSunlight = gSavedSettings.getBOOL("RenderBakeSunlight");
sNoAlpha = gSavedSettings.getBOOL("RenderNoAlpha");
LLPipeline::sTextureBindTest = gSavedSettings.getBOOL("RenderDebugTextureBind");
+
+ LLVertexBuffer::initClass(LLVertexBuffer::sEnableVBOs, LLVertexBuffer::sDisableVBOMapping);
}
void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture)
--
cgit v1.2.3
From 06367e6f453b50e768cca377c9829796ac00b771 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 14 Oct 2011 17:43:31 -0500
Subject: SH-2276 Clean up a shader warning.
---
.../app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
index dcd405716c..7059ff31ae 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
@@ -36,10 +36,8 @@ uniform vec3 light_diffuse[8];
vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
{
- vec4 col;
- col.a = color.a;
-
-
+ vec4 col = vec4(0,0,0, color.a);
+
vec3 view = normalize(pos);
/// collect all the specular values from each calcXXXLightSpecular() function
--
cgit v1.2.3
From 9f45495fc31e3f76036d164a43ce167d7cdc9feb Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 14 Oct 2011 17:56:17 -0500
Subject: Fix for crash when toggling shaders.
---
indra/newview/llviewerdisplay.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index e0359cc61d..3889c895aa 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -628,6 +628,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLPipeline::sUseOcclusion = 3;
}*/
+ LLPipeline::refreshCachedSettings();
+ LLPipeline::refreshRenderDeferred();
+
LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
@@ -858,9 +861,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// gGL.popMatrix();
//}
- LLPipeline::refreshCachedSettings();
LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
- LLPipeline::refreshRenderDeferred();
LLGLState::checkStates();
LLGLState::checkClientArrays();
--
cgit v1.2.3
From b32e6e094d1a6d2843b938448eee22ad1671052c Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Sun, 16 Oct 2011 00:58:16 -0500
Subject: SH-2276 Fix for TDR's on GTX 460 et al -- don't use texture units
above 16 (workaround for prevalent driver bug)
---
indra/newview/app_settings/settings.xml | 2 +-
indra/newview/featuretable.txt | 3 ++-
indra/newview/featuretable_linux.txt | 1 +
indra/newview/featuretable_mac.txt | 1 +
indra/newview/featuretable_xp.txt | 2 +-
5 files changed, 6 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index e7ff584b38..6567ad5e04 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7796,7 +7796,7 @@
Type
U32
Value
- 32
+ 16
RenderDebugTextureBind
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 22d76cb082..51065aacba 100755
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -65,7 +65,8 @@ RenderShadowDetail 1 2
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
-RenderMaxTextureIndex 1 32
+RenderMaxTextureIndex 1 16
+
//
// Low Graphics Settings
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 18efcf5665..2c29c3003e 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -63,6 +63,7 @@ RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 16
//
// Low Graphics Settings
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index c37e4e93ee..e2c35adaf1 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -65,6 +65,7 @@ RenderShadowDetail 1 2
WatchdogDisabled 1 1
RenderUseStreamVBO 1 0
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 16
//
// Low Graphics Settings
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index a8e13ce65c..4b6f86665e 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -65,7 +65,7 @@ RenderShadowDetail 1 0
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
-RenderMaxTextureIndex 1 32
+RenderMaxTextureIndex 1 16
//
// Low Graphics Settings
--
cgit v1.2.3
From a9aca58eaf847bb38f93a268da3aa024b60b38ba Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 18 Oct 2011 16:14:56 -0500
Subject: SH-2508 Fix for edit/rotate ring not showing up on Radeon X1950 pro
---
indra/newview/llcylinder.cpp | 10 +++++-----
indra/newview/llmaniprotate.cpp | 3 +--
2 files changed, 6 insertions(+), 7 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llcylinder.cpp b/indra/newview/llcylinder.cpp
index 2adc071d7a..f353851a25 100644
--- a/indra/newview/llcylinder.cpp
+++ b/indra/newview/llcylinder.cpp
@@ -53,22 +53,22 @@ void LLCone::render(S32 sides)
F32 a = (F32) i/sides * F_PI*2.f;
F32 x = cosf(a)*0.5f;
F32 y = sinf(a)*0.5f;
- gGL.vertex3f(x,y,0.f);
+ gGL.vertex3f(x,y,-.5f);
}
- gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, 0.f);
+ gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, -0.5f);
gGL.end();
gGL.begin(LLRender::TRIANGLE_FAN);
- gGL.vertex3f(0.f, 0.f, 1.f);
+ gGL.vertex3f(0.f, 0.f, 0.5f);
for (U32 i = 0; i < sides; i++)
{
F32 a = (F32) i/sides * F_PI*2.f;
F32 x = cosf(a)*0.5f;
F32 y = sinf(a)*0.5f;
- gGL.vertex3f(x,y,0.f);
+ gGL.vertex3f(x,y,-0.5f);
}
- gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, 0.f);
+ gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, -0.5f);
gGL.end();
}
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 19798ef752..04dd2be583 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -199,8 +199,7 @@ void LLManipRotate::render()
gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, TRUE );
}
- GLdouble plane_eqn[] = { 0, 0, 1, 0 };
- glClipPlane( GL_CLIP_PLANE0, plane_eqn );
+ gGL.flush();
}
gGL.popMatrix();
}
--
cgit v1.2.3
From c7b13d16190fcf1aacf7f1a54d97670cc4be75b6 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 18 Oct 2011 16:28:00 -0500
Subject: SH-2480 Anything GeForce 8 or later and anything Radeon HD or later
should be at least class 2 in order to get all 6 local lights available with
shaders on.
---
indra/newview/gpu_table.txt | 96 ++++++++++++++++++++++-----------------------
1 file changed, 48 insertions(+), 48 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index b7d951e018..5b4f52c7e6 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -106,18 +106,18 @@ ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1
ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1
ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1
ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1
-ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 1 1
+ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 2 1
ATI Mobility Radeon HD 540v .*ATI.*Mobility.*HD *540v.* 2 1
ATI Mobility Radeon HD 545v .*ATI.*Mobility.*HD *545v.* 2 1
ATI Mobility Radeon HD 550v .*ATI.*Mobility.*HD *550v.* 2 1
ATI Mobility Radeon HD 560v .*ATI.*Mobility.*HD *560v.* 2 1
ATI Mobility Radeon HD 565v .*ATI.*Mobility.*HD *565v.* 2 1
-ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 1 1
-ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 1 1
+ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 2 1
+ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 2 1
ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD *26.* 3 1
ATI Mobility Radeon HD 2700 .*ATI.*Mobility.*HD *27.* 3 1
-ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 0 1
-ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 0 1
+ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 2 1
+ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 2 1
ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD *34.* 2 1
ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD *36.* 3 1
ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD *38.* 3 1
@@ -140,23 +140,23 @@ ATI Mobility Radeon HD 6600M .*ATI.*Mobility.*HD *66.* 3 1
ATI Mobility Radeon HD 6700M .*ATI.*Mobility.*HD *67.* 3 1
ATI Mobility Radeon HD 6800M .*ATI.*Mobility.*HD *68.* 3 1
ATI Mobility Radeon HD 6900M .*ATI.*Mobility.*HD *69.* 3 1
-ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 0 1
-ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 1 1
+ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 2 1
+ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 2 1
ATI Radeon HD 2600 .*ATI.*Radeon HD *26.. 2 1
ATI Radeon HD 2900 .*ATI.*Radeon HD *29.. 3 1
-ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 0 1
-ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 1 1
-ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 1 1
-ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 1 1
-ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 1 1
-ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 1 1
+ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 2 1
+ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 2 1
+ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 2 1
+ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 2 1
+ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 2 1
+ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 2 1
ATI Radeon HD 3600 .*ATI.*Radeon HD *36.. 3 1
ATI Radeon HD 3700 .*ATI.*Radeon HD *37.. 3 1
ATI Radeon HD 3800 .*ATI.*Radeon HD *38.. 3 1
-ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 1 1
-ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 1 1
-ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 1 1
-ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 1 1
+ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 2 1
+ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 2 1
+ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 2 1
+ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 2 1
ATI Radeon HD 4500 .*ATI.*Radeon HD *45.. 3 1
ATI Radeon HD 4600 .*ATI.*Radeon HD *46.. 3 1
ATI Radeon HD 4700 .*ATI.*Radeon HD *47.. 3 1
@@ -290,27 +290,27 @@ Matrox .*Matrox.* 0 0
Mesa .*Mesa.* 0 0
NVIDIA 205 .*NVIDIA .*GeForce 205.* 2 1
NVIDIA 210 .*NVIDIA .*GeForce 210.* 2 1
-NVIDIA 310M .*NVIDIA .*GeForce 310M.* 1 1
+NVIDIA 310M .*NVIDIA .*GeForce 310M.* 2 1
NVIDIA 310 .*NVIDIA .*GeForce 310.* 3 1
NVIDIA 315M .*NVIDIA .*GeForce 315M.* 2 1
NVIDIA 315 .*NVIDIA .*GeForce 315.* 3 1
NVIDIA 320M .*NVIDIA .*GeForce 320M.* 2 1
-NVIDIA G100M .*NVIDIA .*100M.* 0 1
-NVIDIA G100 .*NVIDIA .*100.* 0 1
-NVIDIA G102M .*NVIDIA .*102M.* 0 1
-NVIDIA G103M .*NVIDIA .*103M.* 0 1
-NVIDIA G105M .*NVIDIA .*105M.* 0 1
-NVIDIA G 110M .*NVIDIA .*110M.* 0 1
-NVIDIA G 120M .*NVIDIA .*120M.* 1 1
-NVIDIA G 200 .*NVIDIA .*200(M)?.* 0 1
-NVIDIA G 205M .*NVIDIA .*205(M)?.* 0 1
-NVIDIA G 210 .*NVIDIA .*210(M)?.* 1 1
-NVIDIA 305M .*NVIDIA .*305(M)?.* 1 1
+NVIDIA G100M .*NVIDIA .*100M.* 2 1
+NVIDIA G100 .*NVIDIA .*100.* 2 1
+NVIDIA G102M .*NVIDIA .*102M.* 2 1
+NVIDIA G103M .*NVIDIA .*103M.* 2 1
+NVIDIA G105M .*NVIDIA .*105M.* 2 1
+NVIDIA G 110M .*NVIDIA .*110M.* 2 1
+NVIDIA G 120M .*NVIDIA .*120M.* 2 1
+NVIDIA G 200 .*NVIDIA .*200(M)?.* 2 1
+NVIDIA G 205M .*NVIDIA .*205(M)?.* 2 1
+NVIDIA G 210 .*NVIDIA .*210(M)?.* 2 1
+NVIDIA 305M .*NVIDIA .*305(M)?.* 2 1
NVIDIA G 310M .*NVIDIA .*310(M)?.* 2 1
NVIDIA G 315 .*NVIDIA .*315(M)?.* 2 1
NVIDIA G 320M .*NVIDIA .*320(M)?.* 2 1
-NVIDIA G 405 .*NVIDIA .*405(M)?.* 1 1
-NVIDIA G 410M .*NVIDIA .*410(M)?.* 1 1
+NVIDIA G 405 .*NVIDIA .*405(M)?.* 2 1
+NVIDIA G 410M .*NVIDIA .*410(M)?.* 2 1
NVIDIA GT 120M .*NVIDIA .*GT *120(M)?.* 2 1
NVIDIA GT 120 .*NVIDIA .*GT.*120 2 1
NVIDIA GT 130M .*NVIDIA .*GT *130(M)?.* 2 1
@@ -323,9 +323,9 @@ NVIDIA GT 240M .*NVIDIA .*GT *240(M)?.* 2 1
NVIDIA GT 250M .*NVIDIA .*GT *250(M)?.* 2 1
NVIDIA GT 260M .*NVIDIA .*GT *260(M)?.* 2 1
NVIDIA GT 320M .*NVIDIA .*GT *320(M)?.* 2 1
-NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 0 1
+NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 2 1
NVIDIA GT 330M .*NVIDIA .*GT *330(M)?.* 3 1
-NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 1 1
+NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 2 1
NVIDIA GT 340M .*NVIDIA .*GT *340(M)?.* 2 1
NVIDIA GT 415M .*NVIDIA .*GT *415(M)?.* 2 1
NVIDIA GT 420M .*NVIDIA .*GT *420(M)?.* 2 1
@@ -398,27 +398,27 @@ NVIDIA GeForce 7500 .*NVIDIA .*GeForce 75.* 1 1
NVIDIA GeForce 7600 .*NVIDIA .*GeForce 76.* 2 1
NVIDIA GeForce 7800 .*NVIDIA .*GeForce 78.* 2 1
NVIDIA GeForce 7900 .*NVIDIA .*GeForce 79.* 2 1
-NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 1 1
-NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 1 1
-NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 1 1
-NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 1 1
-NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 1 1
-NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 1 1
+NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 2 1
+NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 2 1
+NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 2 1
+NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 2 1
+NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 2 1
+NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 2 1
NVIDIA GeForce 8500 .*NVIDIA .*GeForce 85.* 3 1
-NVIDIA GeForce 8600M .*NVIDIA .*GeForce 8600M.* 1 1
+NVIDIA GeForce 8600M .*NVIDIA .*GeForce 8600M.* 2 1
NVIDIA GeForce 8600 .*NVIDIA .*GeForce 86.* 3 1
NVIDIA GeForce 8700M .*NVIDIA .*GeForce 8700M.* 3 1
NVIDIA GeForce 8700 .*NVIDIA .*GeForce 87.* 3 1
NVIDIA GeForce 8800M .*NVIDIA .*GeForce 8800M.* 3 1
NVIDIA GeForce 8800 .*NVIDIA .*GeForce 88.* 3 1
-NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 0 1
-NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 0 1
-NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 1 1
-NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 1 1
-NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 1 1
-NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 1 1
-NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 1 1
-NVIDIA GeForce 9400 .*NVIDIA .*GeForce 94.* 1 1
+NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 2 1
+NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 2 1
+NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 2 1
+NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 2 1
+NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 2 1
+NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 2 1
+NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 2 1
+NVIDIA GeForce 9400 .*NVIDIA .*GeForce 94.* 2 1
NVIDIA GeForce 9500M .*NVIDIA .*GeForce 9500M.* 2 1
NVIDIA GeForce 9500 .*NVIDIA .*GeForce 95.* 2 1
NVIDIA GeForce 9600M .*NVIDIA .*GeForce 9600M.* 3 1
--
cgit v1.2.3
From 2b234bc087bd703ff97ce5630175d5d06198c592 Mon Sep 17 00:00:00 2001
From: Oz Linden
Date: Wed, 19 Oct 2011 10:10:59 -0400
Subject: storm-1622: fix viewer-side wind turbulence simulation
---
indra/newview/llglsandbox.cpp | 4 +-
indra/newview/llviewermenu.cpp | 8 ++
indra/newview/llwind.cpp | 115 +++------------------
indra/newview/llwind.h | 7 +-
indra/newview/pipeline.cpp | 5 +
indra/newview/pipeline.h | 2 +-
indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++
7 files changed, 40 insertions(+), 111 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index fa3f546157..cc4d9f8692 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -259,8 +259,8 @@ void LLWind::renderVectors()
{
for (i = 0; i < mSize; i++)
{
- x = mCloudVelX[i + j*mSize] * WIND_SCALE_HACK;
- y = mCloudVelY[i + j*mSize] * WIND_SCALE_HACK;
+ x = mVelX[i + j*mSize] * WIND_SCALE_HACK;
+ y = mVelY[i + j*mSize] * WIND_SCALE_HACK;
gGL.pushMatrix();
gGL.translatef((F32)i * region_width_meters/mSize, (F32)j * region_width_meters/mSize, 0.0);
gGL.color3f(0,1,0);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2345fbfd6a..0909714951 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -968,6 +968,10 @@ U32 info_display_from_string(std::string info_display)
{
return LLPipeline::RENDER_DEBUG_SCULPTED;
}
+ else if ("wind vectors" == info_display)
+ {
+ return LLPipeline::RENDER_DEBUG_WIND_VECTORS;
+ }
else
{
return 0;
@@ -980,6 +984,8 @@ class LLAdvancedToggleInfoDisplay : public view_listener_t
{
U32 info_display = info_display_from_string( userdata.asString() );
+ LL_INFOS("ViewerMenu") << "toggle " << userdata.asString() << LL_ENDL;
+
if ( info_display != 0 )
{
LLPipeline::toggleRenderDebug( (void*)info_display );
@@ -997,6 +1003,8 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t
U32 info_display = info_display_from_string( userdata.asString() );
bool new_value = false;
+ LL_INFOS("ViewerMenu") << "check " << userdata.asString() << LL_ENDL;
+
if ( info_display != 0 )
{
new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display );
diff --git a/indra/newview/llwind.cpp b/indra/newview/llwind.cpp
index 69d3090442..4c39fb5b74 100644
--- a/indra/newview/llwind.cpp
+++ b/indra/newview/llwind.cpp
@@ -46,16 +46,12 @@
#include "llworld.h"
-const F32 CLOUD_DIVERGENCE_COEF = 0.5f;
-
-
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
LLWind::LLWind()
-: mSize(16),
- mCloudDensityp(NULL)
+: mSize(16)
{
init();
}
@@ -65,8 +61,6 @@ LLWind::~LLWind()
{
delete [] mVelX;
delete [] mVelY;
- delete [] mCloudVelX;
- delete [] mCloudVelY;
}
@@ -77,31 +71,23 @@ LLWind::~LLWind()
void LLWind::init()
{
+ LL_DEBUGS("Wind") << "initializing wind size: "<< mSize << LL_ENDL;
+
// Initialize vector data
mVelX = new F32[mSize*mSize];
mVelY = new F32[mSize*mSize];
- mCloudVelX = new F32[mSize*mSize];
- mCloudVelY = new F32[mSize*mSize];
-
S32 i;
for (i = 0; i < mSize*mSize; i++)
{
mVelX[i] = 0.5f;
mVelY[i] = 0.5f;
- mCloudVelX[i] = 0.0f;
- mCloudVelY[i] = 0.0f;
}
}
void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
{
- if (!mCloudDensityp)
- {
- return;
- }
-
LLPatchHeader patch_header;
S32 buffer[16*16];
@@ -122,22 +108,15 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
decode_patch(bitpack, buffer);
decompress_patch(mVelY, buffer, &patch_header);
-
-
S32 i, j, k;
- // HACK -- mCloudVelXY is the same as mVelXY, except we add a divergence
- // that is proportional to the gradient of the cloud density
- // ==> this helps to clump clouds together
- // NOTE ASSUMPTION: cloud density has the same dimensions as the wind field
- // This needs to be fixed... causes discrepency at region boundaries
for (j=1; jgetRegionWidthInMeters();
-
- if (pos_clamped_region.mV[VX] < 0.f)
- {
- pos_clamped_region.mV[VX] = 0.f;
- }
- else if (pos_clamped_region.mV[VX] >= region_width_meters)
- {
- pos_clamped_region.mV[VX] = (F32) fmod(pos_clamped_region.mV[VX], region_width_meters);
- }
-
- if (pos_clamped_region.mV[VY] < 0.f)
- {
- pos_clamped_region.mV[VY] = 0.f;
- }
- else if (pos_clamped_region.mV[VY] >= region_width_meters)
- {
- pos_clamped_region.mV[VY] = (F32) fmod(pos_clamped_region.mV[VY], region_width_meters);
- }
-
-
- S32 i = llfloor(pos_clamped_region.mV[VX] * mSize / region_width_meters);
- S32 j = llfloor(pos_clamped_region.mV[VY] * mSize / region_width_meters);
- k = i + j*mSize;
- dx = ((pos_clamped_region.mV[VX] * mSize / region_width_meters) - (F32) i);
- dy = ((pos_clamped_region.mV[VY] * mSize / region_width_meters) - (F32) j);
-
- if ((i < mSize-1) && (j < mSize-1))
- {
- // Interior points, no edges
- r_val.mV[VX] = mCloudVelX[k]*(1.0f - dx)*(1.0f - dy) +
- mCloudVelX[k + 1]*dx*(1.0f - dy) +
- mCloudVelX[k + mSize]*dy*(1.0f - dx) +
- mCloudVelX[k + mSize + 1]*dx*dy;
- r_val.mV[VY] = mCloudVelY[k]*(1.0f - dx)*(1.0f - dy) +
- mCloudVelY[k + 1]*dx*(1.0f - dy) +
- mCloudVelY[k + mSize]*dy*(1.0f - dx) +
- mCloudVelY[k + mSize + 1]*dx*dy;
- }
- else
- {
- r_val.mV[VX] = mCloudVelX[k];
- r_val.mV[VY] = mCloudVelY[k];
- }
-
- r_val.mV[VZ] = 0.f;
- return r_val * WIND_SCALE_HACK;
-}
-
-
-void LLWind::setCloudDensityPointer(F32 *densityp)
-{
- mCloudDensityp = densityp;
-}
-
void LLWind::setOriginGlobal(const LLVector3d &origin_global)
{
mOriginGlobal = origin_global;
diff --git a/indra/newview/llwind.h b/indra/newview/llwind.h
index 925cb6d642..3b57f07124 100644
--- a/indra/newview/llwind.h
+++ b/indra/newview/llwind.h
@@ -27,7 +27,6 @@
#ifndef LL_LLWIND_H
#define LL_LLWIND_H
-//#include "vmath.h"
#include "llmath.h"
#include "v3math.h"
#include "v3dmath.h"
@@ -44,25 +43,21 @@ public:
~LLWind();
void renderVectors();
LLVector3 getVelocity(const LLVector3 &location); // "location" is region-local
- LLVector3 getCloudVelocity(const LLVector3 &location); // "location" is region-local
LLVector3 getVelocityNoisy(const LLVector3 &location, const F32 dim); // "location" is region-local
void decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp);
LLVector3 getAverage();
- void setCloudDensityPointer(F32 *densityp);
void setOriginGlobal(const LLVector3d &origin_global);
private:
S32 mSize;
F32 * mVelX;
F32 * mVelY;
- F32 * mCloudVelX;
- F32 * mCloudVelY;
- F32 * mCloudDensityp;
LLVector3d mOriginGlobal;
void init();
+ LOG_CLASS(LLWind);
};
#endif
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index a50f66f282..93354e6579 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4383,6 +4383,11 @@ void LLPipeline::renderDebug()
}
}
+ if (mRenderDebugMask & RENDER_DEBUG_WIND_VECTORS)
+ {
+ gAgent.getRegion()->mWind.renderVectors();
+ }
+
if (mRenderDebugMask & RENDER_DEBUG_COMPOSITION)
{
// Debug composition layers
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 27ee2745b5..0661de8cec 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -438,7 +438,7 @@ public:
RENDER_DEBUG_VERIFY = 0x0000002,
RENDER_DEBUG_BBOXES = 0x0000004,
RENDER_DEBUG_OCTREE = 0x0000008,
- RENDER_DEBUG_PICKING = 0x0000010,
+ RENDER_DEBUG_WIND_VECTORS = 0x0000010,
RENDER_DEBUG_OCCLUSION = 0x0000020,
RENDER_DEBUG_POINTS = 0x0000040,
RENDER_DEBUG_TEXTURE_PRIORITY = 0x0000080,
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 63e50b0b9f..01f9c23afd 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2437,6 +2437,16 @@
parameter="raycast" />
+
+
+
+
Date: Wed, 19 Oct 2011 13:21:17 -0500
Subject: SH-2276 Force RenderMaxTextureIndex to be <= 16 regardless of
settings
---
indra/newview/llviewershadermgr.cpp | 3 +++
indra/newview/llvovolume.cpp | 2 ++
2 files changed, 5 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 31ed210ae3..50910e26e5 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -357,6 +357,9 @@ void LLViewerShaderMgr::setShaders()
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1);
+ //NEVER use more than 16 texture channels (work around for prevalent driver bug)
+ LLGLSLShader::sIndexedTextureChannels = llmin(LLGLSLShader::sIndexedTextureChannels, 16);
+
reentrance = true;
if (LLRender::sGLCoreProfile || gGLManager.mGLVersion >= 2.f)
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 2fadc795fd..b75a0a799a 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4666,6 +4666,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
texture_index_channels = llmin(texture_index_channels, (S32) gSavedSettings.getU32("RenderMaxTextureIndex"));
+ //NEVER use more than 16 texture index channels (workaround for prevalent driver bug)
+ texture_index_channels = llmin(texture_index_channels, 16);
while (face_iter != faces.end())
{
--
cgit v1.2.3
From 37993bbba1f7e245ba1b10c2c2752cb62faa02ef Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 13:22:58 -0500
Subject: SH-2480 Redo the previous gpu_table change, being a little more
conservative about which chips get bumped to class 2
---
indra/newview/gpu_table.txt | 62 ++++++++++++++++++++++-----------------------
1 file changed, 31 insertions(+), 31 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 5b4f52c7e6..198e702459 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -106,7 +106,7 @@ ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1
ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1
ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1
ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1
-ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 2 1
+ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 1 1
ATI Mobility Radeon HD 540v .*ATI.*Mobility.*HD *540v.* 2 1
ATI Mobility Radeon HD 545v .*ATI.*Mobility.*HD *545v.* 2 1
ATI Mobility Radeon HD 550v .*ATI.*Mobility.*HD *550v.* 2 1
@@ -116,8 +116,8 @@ ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 2 1
ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 2 1
ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD *26.* 3 1
ATI Mobility Radeon HD 2700 .*ATI.*Mobility.*HD *27.* 3 1
-ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 2 1
-ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 2 1
+ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 0 1
+ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 0 1
ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD *34.* 2 1
ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD *36.* 3 1
ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD *38.* 3 1
@@ -144,17 +144,17 @@ ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 2 1
ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 2 1
ATI Radeon HD 2600 .*ATI.*Radeon HD *26.. 2 1
ATI Radeon HD 2900 .*ATI.*Radeon HD *29.. 3 1
-ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 2 1
-ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 2 1
-ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 2 1
+ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 0 1
+ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 1 1
+ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 1 1
ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 2 1
ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 2 1
ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 2 1
ATI Radeon HD 3600 .*ATI.*Radeon HD *36.. 3 1
ATI Radeon HD 3700 .*ATI.*Radeon HD *37.. 3 1
ATI Radeon HD 3800 .*ATI.*Radeon HD *38.. 3 1
-ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 2 1
-ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 2 1
+ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 1 1
+ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 1 1
ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 2 1
ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 2 1
ATI Radeon HD 4500 .*ATI.*Radeon HD *45.. 3 1
@@ -290,27 +290,27 @@ Matrox .*Matrox.* 0 0
Mesa .*Mesa.* 0 0
NVIDIA 205 .*NVIDIA .*GeForce 205.* 2 1
NVIDIA 210 .*NVIDIA .*GeForce 210.* 2 1
-NVIDIA 310M .*NVIDIA .*GeForce 310M.* 2 1
+NVIDIA 310M .*NVIDIA .*GeForce 310M.* 1 1
NVIDIA 310 .*NVIDIA .*GeForce 310.* 3 1
NVIDIA 315M .*NVIDIA .*GeForce 315M.* 2 1
NVIDIA 315 .*NVIDIA .*GeForce 315.* 3 1
NVIDIA 320M .*NVIDIA .*GeForce 320M.* 2 1
-NVIDIA G100M .*NVIDIA .*100M.* 2 1
-NVIDIA G100 .*NVIDIA .*100.* 2 1
-NVIDIA G102M .*NVIDIA .*102M.* 2 1
-NVIDIA G103M .*NVIDIA .*103M.* 2 1
-NVIDIA G105M .*NVIDIA .*105M.* 2 1
-NVIDIA G 110M .*NVIDIA .*110M.* 2 1
-NVIDIA G 120M .*NVIDIA .*120M.* 2 1
-NVIDIA G 200 .*NVIDIA .*200(M)?.* 2 1
-NVIDIA G 205M .*NVIDIA .*205(M)?.* 2 1
-NVIDIA G 210 .*NVIDIA .*210(M)?.* 2 1
-NVIDIA 305M .*NVIDIA .*305(M)?.* 2 1
+NVIDIA G100M .*NVIDIA .*100M.* 0 1
+NVIDIA G100 .*NVIDIA .*100.* 0 1
+NVIDIA G102M .*NVIDIA .*102M.* 0 1
+NVIDIA G103M .*NVIDIA .*103M.* 0 1
+NVIDIA G105M .*NVIDIA .*105M.* 0 1
+NVIDIA G 110M .*NVIDIA .*110M.* 0 1
+NVIDIA G 120M .*NVIDIA .*120M.* 1 1
+NVIDIA G 200 .*NVIDIA .*200(M)?.* 0 1
+NVIDIA G 205M .*NVIDIA .*205(M)?.* 0 1
+NVIDIA G 210 .*NVIDIA .*210(M)?.* 1 1
+NVIDIA 305M .*NVIDIA .*305(M)?.* 1 1
NVIDIA G 310M .*NVIDIA .*310(M)?.* 2 1
NVIDIA G 315 .*NVIDIA .*315(M)?.* 2 1
NVIDIA G 320M .*NVIDIA .*320(M)?.* 2 1
-NVIDIA G 405 .*NVIDIA .*405(M)?.* 2 1
-NVIDIA G 410M .*NVIDIA .*410(M)?.* 2 1
+NVIDIA G 405 .*NVIDIA .*405(M)?.* 1 1
+NVIDIA G 410M .*NVIDIA .*410(M)?.* 1 1
NVIDIA GT 120M .*NVIDIA .*GT *120(M)?.* 2 1
NVIDIA GT 120 .*NVIDIA .*GT.*120 2 1
NVIDIA GT 130M .*NVIDIA .*GT *130(M)?.* 2 1
@@ -323,9 +323,9 @@ NVIDIA GT 240M .*NVIDIA .*GT *240(M)?.* 2 1
NVIDIA GT 250M .*NVIDIA .*GT *250(M)?.* 2 1
NVIDIA GT 260M .*NVIDIA .*GT *260(M)?.* 2 1
NVIDIA GT 320M .*NVIDIA .*GT *320(M)?.* 2 1
-NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 2 1
+NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 0 1
NVIDIA GT 330M .*NVIDIA .*GT *330(M)?.* 3 1
-NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 2 1
+NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 1 1
NVIDIA GT 340M .*NVIDIA .*GT *340(M)?.* 2 1
NVIDIA GT 415M .*NVIDIA .*GT *415(M)?.* 2 1
NVIDIA GT 420M .*NVIDIA .*GT *420(M)?.* 2 1
@@ -398,9 +398,9 @@ NVIDIA GeForce 7500 .*NVIDIA .*GeForce 75.* 1 1
NVIDIA GeForce 7600 .*NVIDIA .*GeForce 76.* 2 1
NVIDIA GeForce 7800 .*NVIDIA .*GeForce 78.* 2 1
NVIDIA GeForce 7900 .*NVIDIA .*GeForce 79.* 2 1
-NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 2 1
-NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 2 1
-NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 2 1
+NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 1 1
+NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 1 1
+NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 1 1
NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 2 1
NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 2 1
NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 2 1
@@ -411,10 +411,10 @@ NVIDIA GeForce 8700M .*NVIDIA .*GeForce 8700M.* 3 1
NVIDIA GeForce 8700 .*NVIDIA .*GeForce 87.* 3 1
NVIDIA GeForce 8800M .*NVIDIA .*GeForce 8800M.* 3 1
NVIDIA GeForce 8800 .*NVIDIA .*GeForce 88.* 3 1
-NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 2 1
-NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 2 1
-NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 2 1
-NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 2 1
+NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 0 1
+NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 0 1
+NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 1 1
+NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 1 1
NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 2 1
NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 2 1
NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 2 1
--
cgit v1.2.3
From b17023e3b071f5e49b3a18c28fc8e1bc73c15b73 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 14:18:49 -0500
Subject: SH-2593 Fix for crash when jumping from "Low" to "Ultra" with Debug
GL on.
---
indra/newview/llviewerdisplay.cpp | 19 +++++--------------
indra/newview/pipeline.cpp | 12 ++++++++++++
2 files changed, 17 insertions(+), 14 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 3889c895aa..894c409ad6 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -229,6 +229,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gGL.flush();
glClear(GL_COLOR_BUFFER_BIT);
gViewerWindow->mWindow->swapBuffers();
+ LLPipeline::refreshCachedSettings();
+ LLPipeline::refreshRenderDeferred();
gPipeline.resizeScreenTexture();
gResizeScreenTexture = FALSE;
gWindowResized = FALSE;
@@ -615,12 +617,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//Increment drawable frame counter
LLDrawable::incrementVisible();
+ LLPipeline::refreshCachedSettings();
+ LLPipeline::refreshRenderDeferred();
+
LLSpatialGroup::sNoDelete = TRUE;
- LLPipeline::sUseOcclusion =
- (!gUseWireframe
- && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
- && gSavedSettings.getBOOL("UseOcclusion")
- && gGLManager.mHasOcclusionQuery) ? 2 : 0;
LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
/*if (LLPipeline::sUseOcclusion && LLPipeline::sRenderDeferred)
@@ -628,15 +628,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLPipeline::sUseOcclusion = 3;
}*/
- LLPipeline::refreshCachedSettings();
- LLPipeline::refreshRenderDeferred();
-
- LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
- LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
- LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
- LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
- LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
-
S32 occlusion = LLPipeline::sUseOcclusion;
if (gDepthDirty)
{ //depth buffer is invalid, don't overwrite occlusion state
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5035e0197d..3246ec648e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -840,6 +840,18 @@ void LLPipeline::refreshRenderDeferred()
//static
void LLPipeline::refreshCachedSettings()
{
+ LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
+ LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
+ LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
+ LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
+ LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
+
+ LLPipeline::sUseOcclusion =
+ (!gUseWireframe
+ && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
+ && gSavedSettings.getBOOL("UseOcclusion")
+ && gGLManager.mHasOcclusionQuery) ? 2 : 0;
+
VertexShaderEnable = gSavedSettings.getBOOL("VertexShaderEnable");
RenderAvatarVP = gSavedSettings.getBOOL("RenderAvatarVP");
WindLightUseAtmosShaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
--
cgit v1.2.3
From 850bd75c46eb3b8416e8c9e02040171e8adad963 Mon Sep 17 00:00:00 2001
From: Oz Linden
Date: Wed, 19 Oct 2011 15:22:19 -0400
Subject: storm-1622 modify wind vector visualization to always be 25m over
avatar
---
indra/newview/llglsandbox.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index cc4d9f8692..2b9c113a72 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -240,7 +240,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
gViewerWindow->setup3DRender();
}
-const F32 WIND_ALTITUDE = 180.f;
+const F32 WIND_RELATIVE_ALTITUDE = 25.f;
void LLWind::renderVectors()
{
@@ -254,7 +254,7 @@ void LLWind::renderVectors()
gGL.pushMatrix();
LLVector3 origin_agent;
origin_agent = gAgent.getPosAgentFromGlobal(mOriginGlobal);
- gGL.translatef(origin_agent.mV[VX], origin_agent.mV[VY], WIND_ALTITUDE);
+ gGL.translatef(origin_agent.mV[VX], origin_agent.mV[VY], gAgent.getPositionAgent().mV[VZ] + WIND_RELATIVE_ALTITUDE);
for (j = 0; j < mSize; j++)
{
for (i = 0; i < mSize; i++)
--
cgit v1.2.3
From 4ec72ed0a61157dd5fcc1bc4cc91054664ee75b5 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 16:19:00 -0500
Subject: Fix for VBO pools not getting cleared appropriately.
---
indra/newview/pipeline.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3246ec648e..acd708e800 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6109,11 +6109,8 @@ void LLPipeline::resetVertexBuffers()
gSky.resetVertexBuffers();
- if (LLVertexBuffer::sGLCount > 0)
- {
- LLVertexBuffer::cleanupClass();
- }
-
+ LLVertexBuffer::cleanupClass();
+
//delete all name pool caches
LLGLNamePool::cleanupPools();
--
cgit v1.2.3
From 250ab43e4e70ccd9218d32c5dcbde35599c9735b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 17:41:02 -0500
Subject: SH-2571 Add shader driven render for low detail terrain.
---
indra/newview/llappviewer.cpp | 5 +--
indra/newview/lldrawpoolterrain.cpp | 69 ++++++++++++++++++++++++-----------
indra/newview/llfloaterpreference.cpp | 12 +-----
3 files changed, 51 insertions(+), 35 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 31a2ff33f2..2ef55e8a49 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -773,10 +773,7 @@ bool LLAppViewer::init()
LLViewerAssetStatsFF::init();
}
- // init main thread's local data pool before initializing the threads - Nyx
- LLThreadLocalData::init();
-
- initThreads();
+ initThreads();
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ;
// Initialize settings early so that the defaults for ignorable dialogs are
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index d503d935d0..e14d0c5f9d 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -122,14 +122,7 @@ U32 LLDrawPoolTerrain::getVertexDataMask()
void LLDrawPoolTerrain::prerender()
{
mVertexShaderLevel = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT);
- if (mVertexShaderLevel > 0)
- {
- sDetailMode = 1;
- }
- else
- {
- sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
- }
+ sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
}
void LLDrawPoolTerrain::beginRenderPass( S32 pass )
@@ -137,9 +130,24 @@ void LLDrawPoolTerrain::beginRenderPass( S32 pass )
LLFastTimer t(FTM_RENDER_TERRAIN);
LLFacePool::beginRenderPass(pass);
- sShader = LLPipeline::sUnderWaterRender ?
- &gTerrainWaterProgram :
- &gTerrainProgram;
+ if (sDetailMode > 0)
+ {
+ sShader = LLPipeline::sUnderWaterRender ?
+ &gTerrainWaterProgram :
+ &gTerrainProgram;
+ }
+ else
+ {
+ if (LLPipeline::sUnderWaterRender)
+ {
+ sShader = &gObjectSimpleNonIndexedTexGenWaterProgram;
+ }
+ else
+ {
+ sShader = &gObjectSimpleNonIndexedTexGenProgram;
+ }
+ }
+
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0)
{
@@ -200,7 +208,15 @@ void LLDrawPoolTerrain::render(S32 pass)
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0)
{
gPipeline.enableLightsDynamic();
- renderFullShader();
+
+ if (sDetailMode > 0)
+ {
+ renderFullShader();
+ }
+ else
+ {
+ renderSimple();
+ }
}
else
{
@@ -827,13 +843,21 @@ void LLDrawPoolTerrain::renderSimple()
tp0.setVec(tscale, 0.f, 0.0f, -1.f*(origin_agent.mV[0]/256.f));
tp1.setVec(0.f, tscale, 0.0f, -1.f*(origin_agent.mV[1]/256.f));
- glEnable(GL_TEXTURE_GEN_S);
- glEnable(GL_TEXTURE_GEN_T);
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV);
-
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ sShader->uniform4fv("object_plane_s", 1, tp0.mV);
+ sShader->uniform4fv("object_plane_t", 1, tp1.mV);
+ }
+ else
+ {
+ glEnable(GL_TEXTURE_GEN_S);
+ glEnable(GL_TEXTURE_GEN_T);
+ glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV);
+ glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV);
+ }
+
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR);
drawLoop();
@@ -843,8 +867,11 @@ void LLDrawPoolTerrain::renderSimple()
gGL.getTexUnit(0)->activate();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glDisable(GL_TEXTURE_GEN_S);
+ glDisable(GL_TEXTURE_GEN_T);
+ }
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
gGL.matrixMode(LLRender::MM_MODELVIEW);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 7f6d0155e2..92c4214fdb 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1039,16 +1039,8 @@ void LLFloaterPreference::refreshEnabledState()
BOOL shaders = gGLManager.mGLVersion >= 2.f;
- if (shaders)
- {
- mRadioTerrainDetail->setValue(1);
- mRadioTerrainDetail->setEnabled(FALSE);
- }
- else
- {
- mRadioTerrainDetail->setEnabled(TRUE);
- }
-
+ mRadioTerrainDetail->setEnabled(TRUE);
+
// WindLight
LLCheckBoxCtrl* ctrl_wind_light = getChild("WindLightUseAtmosShaders");
--
cgit v1.2.3
From 7fef84ca755b3f07eb9841fc1b904b185402317e Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 18:06:32 -0500
Subject: SH-2571 Make low detail terrain stick when choosing "low" from
preferences.
---
indra/newview/llviewercontrol.cpp | 6 ------
1 file changed, 6 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 5ab2877869..d9210877dd 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -118,12 +118,6 @@ static bool handleSetShaderChanged(const LLSD& newvalue)
gBumpImageList.destroyGL();
gBumpImageList.restoreGL();
- // Changing shader also changes the terrain detail to high, reflect that change here
- if (newvalue.asBoolean())
- {
- // shaders enabled, set terrain detail to high
- gSavedSettings.setS32("RenderTerrainDetail", 1);
- }
// else, leave terrain detail as is
LLViewerShaderMgr::instance()->setShaders();
return true;
--
cgit v1.2.3
From 1762cc49395d2596ab0788b2a4504abaefbe64db Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 14:20:12 -0500
Subject: SH-2570 Don't minimize viewer when reloading shaders (revert hack
that didn't work) and pause shader loading until after all feature masks have
been applied when switching detail levels
---
indra/newview/llfeaturemanager.cpp | 8 +++++++-
indra/newview/llviewershadermgr.cpp | 6 ++----
indra/newview/llviewershadermgr.h | 1 +
3 files changed, 10 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index db9a0424c0..eb0cdf28c0 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -51,6 +51,7 @@
#include "llcontrol.h"
#include "llboost.h"
#include "llweb.h"
+#include "llviewershadermgr.h"
#if LL_WINDOWS
#include "lldxhardware.h"
@@ -662,8 +663,10 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
{
- applyBaseMasks();
+ LLViewerShaderMgr::sSkipReload = true;
+ applyBaseMasks();
+
switch (level)
{
case 0:
@@ -684,6 +687,9 @@ void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
}
applyFeatures(skipFeatures);
+
+ LLViewerShaderMgr::sSkipReload = false;
+ LLViewerShaderMgr::instance()->setShaders();
}
void LLFeatureManager::applyBaseMasks()
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 50910e26e5..e50625af60 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -59,6 +59,7 @@ using std::make_pair;
using std::string;
BOOL LLViewerShaderMgr::sInitialized = FALSE;
+bool LLViewerShaderMgr::sSkipReload = false;
LLVector4 gShinyOrigin;
@@ -350,7 +351,7 @@ void LLViewerShaderMgr::setShaders()
//setShaders might be called redundantly by gSavedSettings, so return on reentrance
static bool reentrance = false;
- if (!gPipeline.mInitialized || !sInitialized || reentrance)
+ if (!gPipeline.mInitialized || !sInitialized || reentrance || sSkipReload)
{
return;
}
@@ -401,9 +402,6 @@ void LLViewerShaderMgr::setShaders()
if (gViewerWindow)
{
gViewerWindow->setCursor(UI_CURSOR_WAIT);
- //VICIOUS HACK -- some drivers will time out if we don't redraw the window within 2 seconds, and this operation can take awhile
- //minimizing tells the driver we won't be updating the window for a bit
- gViewerWindow->getWindow()->minimize();
}
// Lighting
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 26cef8cb3e..3f670dfb14 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -33,6 +33,7 @@ class LLViewerShaderMgr: public LLShaderMgr
{
public:
static BOOL sInitialized;
+ static bool sSkipReload;
LLViewerShaderMgr();
/* virtual */ ~LLViewerShaderMgr();
--
cgit v1.2.3
From 4e894bfa316ff4bc2fa64f711b8442b228573f90 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 14:33:36 -0500
Subject: SH-2600 Fix for busted texture animation on bump mapped objects.
---
indra/newview/app_settings/shaders/class1/objects/bumpV.glsl | 3 +--
indra/newview/lldrawpoolbump.cpp | 5 ++---
2 files changed, 3 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
index 09ec6ff792..a7738087dc 100644
--- a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
@@ -24,7 +24,6 @@
*/
uniform mat4 texture_matrix0;
-uniform mat4 texture_matrix1;
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
@@ -39,5 +38,5 @@ void main()
//transform vertex
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vary_texcoord1 = (texture_matrix1 * vec4(texcoord1,0,1)).xy;
+ vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy;
}
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index be12eb800f..610d3f9f99 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1453,11 +1453,10 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
}
else
{
- gGL.getTexUnit(1)->activate();
+ gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
gPipeline.mTextureMatrixOps++;
- gGL.getTexUnit(0)->activate();
}
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
@@ -1470,7 +1469,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
{
if (params.mTexture.notNull())
{
- gGL.getTexUnit(diffuse_channel)->bind(params.mTexture) ;
+ gGL.getTexUnit(diffuse_channel)->bind(params.mTexture);
params.mTexture->addTextureStats(params.mVSize);
}
else
--
cgit v1.2.3
From ae31a6f4a7928e4f1be75451ec7dd16c5283ed5b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 15:14:16 -0500
Subject: SH-2240 GL 1.2 compatibility pass
---
indra/newview/lldrawpoolbump.cpp | 16 ++++++++++++++--
indra/newview/pipeline.cpp | 1 +
2 files changed, 15 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 610d3f9f99..774ca2e8e7 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1453,6 +1453,13 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
}
else
{
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.getTexUnit(1)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
+ }
+
gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
@@ -1494,9 +1501,14 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
}
else
{
- gGL.getTexUnit(1)->activate();
- gGL.loadIdentity();
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.getTexUnit(1)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ }
gGL.getTexUnit(0)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
}
gGL.loadIdentity();
gGL.matrixMode(LLRender::MM_MODELVIEW);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index acd708e800..cef4c649d7 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -5090,6 +5090,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
// Ambient
if (!LLGLSLShader::sNoFixedFunction)
{
+ gGL.syncMatrices();
LLColor4 ambient = gSky.getTotalAmbientColor();
gGL.setAmbientLightColor(ambient);
}
--
cgit v1.2.3
From 281b71300d0296f54809948d16c778b6bf08ef19 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 15:14:51 -0500
Subject: SH-2521 Force terrain to render as simple when GL version < 2.0
---
indra/newview/lldrawpoolterrain.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index e14d0c5f9d..ce601325c8 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -196,7 +196,7 @@ void LLDrawPoolTerrain::render(S32 pass)
return;
}
// Render simplified land if video card can't do sufficient multitexturing
- if (!gGLManager.mHasARBEnvCombine || (gGLManager.mNumTextureUnits < 2))
+ if (!LLGLSLShader::sNoFixedFunction || !gGLManager.mHasARBEnvCombine || (gGLManager.mNumTextureUnits < 2))
{
renderSimple(); // Render without multitexture
return;
--
cgit v1.2.3
From 34c01b6b1ff758463dcdff19782e5af668699304 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 18:53:12 -0500
Subject: SH-2564 Fix for bad frustum culling on visible region list
---
indra/newview/llworld.cpp | 43 +++++++++++++++++++++++--------------------
1 file changed, 23 insertions(+), 20 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index a7ae456f3c..6f6e0d2334 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -589,22 +589,22 @@ void LLWorld::updateVisibilities()
{
F32 cur_far_clip = LLViewerCamera::getInstance()->getFar();
- LLViewerCamera::getInstance()->setFar(mLandFarClip);
-
- F32 diagonal_squared = F_SQRT2 * F_SQRT2 * mWidth * mWidth;
- // Go through the culled list and check for visible regions
+ // Go through the culled list and check for visible regions (region is visible if land is visible)
for (region_list_t::iterator iter = mCulledRegionList.begin();
iter != mCulledRegionList.end(); )
{
region_list_t::iterator curiter = iter++;
LLViewerRegion* regionp = *curiter;
- F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
- F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
- if (!regionp->getLand().hasZData()
- || LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
+
+ LLSpatialPartition* part = regionp->getSpatialPartition(LLViewerRegion::PARTITION_TERRAIN);
+ if (part)
{
- mCulledRegionList.erase(curiter);
- mVisibleRegionList.push_back(regionp);
+ LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
+ if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ {
+ mCulledRegionList.erase(curiter);
+ mVisibleRegionList.push_back(regionp);
+ }
}
}
@@ -619,17 +619,20 @@ void LLWorld::updateVisibilities()
continue;
}
- F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
- F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
- if (LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
+ LLSpatialPartition* part = regionp->getSpatialPartition(LLViewerRegion::PARTITION_TERRAIN);
+ if (part)
{
- regionp->calculateCameraDistance();
- regionp->getLand().updatePatchVisibilities(gAgent);
- }
- else
- {
- mVisibleRegionList.erase(curiter);
- mCulledRegionList.push_back(regionp);
+ LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
+ if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ {
+ regionp->calculateCameraDistance();
+ regionp->getLand().updatePatchVisibilities(gAgent);
+ }
+ else
+ {
+ mVisibleRegionList.erase(curiter);
+ mCulledRegionList.push_back(regionp);
+ }
}
}
--
cgit v1.2.3
From 84a6a3a9d69cc6c9a0cccdff01f80c82b8543efa Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 19:02:56 -0500
Subject: SH-2240 Default Debug GL to false in prep for QART
---
indra/newview/app_settings/settings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c5cae63fd4..39cefbf199 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7763,7 +7763,7 @@
Type
Boolean
Value
- 1
+ 0
RenderDebugNormalScale
--
cgit v1.2.3
From 0297f55c6d4be505fe6831a593ed2630d565e14a Mon Sep 17 00:00:00 2001
From: Seth ProductEngine
Date: Fri, 21 Oct 2011 17:26:47 +0200
Subject: EXP-1416 FIXED "Speak" and "Voice controls" buttons added as control
views in LLTransientFloaterMgr to prevent hiding the transient IM floater.
---
indra/newview/lltoolbarview.cpp | 20 +++++++++++++++++++
indra/newview/lltoolbarview.h | 2 ++
indra/newview/lltransientfloatermgr.cpp | 34 +++++++++++++++++++++++----------
indra/newview/lltransientfloatermgr.h | 9 +++++----
4 files changed, 51 insertions(+), 14 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 619d17efad..affa7241d1 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -35,6 +35,7 @@
#include "lltoolbar.h"
#include "llbutton.h"
#include "lltooldraganddrop.h"
+#include "lltransientfloatermgr.h"
#include "llclipboard.h"
#include "llagent.h" // HACK for destinations guide on startup
@@ -96,14 +97,17 @@ BOOL LLToolBarView::postBuild()
mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbarLeft->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbarRight->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbarBottom->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup));
@@ -314,6 +318,22 @@ void LLToolBarView::addToToolset(command_id_list_t& command_list, Toolbar& toolb
}
}
+void LLToolBarView::onToolBarButtonAdded(LLView* button)
+{
+ if (button && button->getName() == "speak")
+ {
+ // Add the "Speak" button as a control view in LLTransientFloaterMgr
+ // to prevent hiding the transient IM floater upon pressing "Speak".
+ LLTransientFloaterMgr::getInstance()->addControlView(button);
+ }
+ else if (button && button->getName() == "voice")
+ {
+ // Add the "Voice controls" button as a control view in LLTransientFloaterMgr
+ // to prevent hiding the transient IM floater upon pressing "Voice controls".
+ LLTransientFloaterMgr::getInstance()->addControlView(button);
+ }
+}
+
void LLToolBarView::draw()
{
//LLPanel* sizer_left = getChild("sizer_left");
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 60ad6316f8..8cafbc9308 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -94,6 +94,8 @@ private:
bool addCommand(const LLCommandId& commandId, LLToolBar* toolbar);
void addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const;
+ static void onToolBarButtonAdded(LLView* button);
+
// Pointers to the toolbars handled by the toolbar view
LLToolBar* mToolbarLeft;
LLToolBar* mToolbarRight;
diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp
index c648a6a28a..d15efb048b 100644
--- a/indra/newview/lltransientfloatermgr.cpp
+++ b/indra/newview/lltransientfloatermgr.cpp
@@ -42,9 +42,9 @@ LLTransientFloaterMgr::LLTransientFloaterMgr()
&LLTransientFloaterMgr::leftMouseClickCallback, this, _2, _3, _4));
}
- mGroupControls.insert(std::pair >(GLOBAL, std::set()));
- mGroupControls.insert(std::pair >(DOCKED, std::set()));
- mGroupControls.insert(std::pair >(IM, std::set()));
+ mGroupControls.insert(std::pair(GLOBAL, controls_set_t()));
+ mGroupControls.insert(std::pair(DOCKED, controls_set_t()));
+ mGroupControls.insert(std::pair(IM, controls_set_t()));
}
void LLTransientFloaterMgr::registerTransientFloater(LLTransientFloater* floater)
@@ -59,12 +59,16 @@ void LLTransientFloaterMgr::unregisterTransientFloater(LLTransientFloater* float
void LLTransientFloaterMgr::addControlView(ETransientGroup group, LLView* view)
{
- mGroupControls.find(group)->second.insert(view);
+ if (!view) return;
+
+ mGroupControls.find(group)->second.insert(view->getHandle());
}
void LLTransientFloaterMgr::removeControlView(ETransientGroup group, LLView* view)
{
- mGroupControls.find(group)->second.erase(view);
+ if (!view) return;
+
+ mGroupControls.find(group)->second.erase(view->getHandle());
}
void LLTransientFloaterMgr::addControlView(LLView* view)
@@ -89,7 +93,7 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)
{
ETransientGroup group = floater->getGroup();
- bool hide = isControlClicked(mGroupControls.find(group)->second, x, y);
+ bool hide = isControlClicked(group, mGroupControls.find(group)->second, x, y);
if (hide)
{
floater->setTransientVisible(FALSE);
@@ -98,13 +102,23 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)
}
}
-bool LLTransientFloaterMgr::isControlClicked(std::set& set, S32 x, S32 y)
+bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set_t& set, S32 x, S32 y)
{
bool res = true;
for (controls_set_t::iterator it = set.begin(); it
!= set.end(); it++)
{
- LLView* control_view = *it;
+ LLView* control_view = NULL;
+
+ LLHandle handle = *it;
+ if (handle.isDead())
+ {
+ mGroupControls.find(group)->second.erase(handle);
+ continue;
+ }
+
+ control_view = handle.get();
+
if (!control_view->getVisible())
{
continue;
@@ -130,8 +144,8 @@ void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y,
return;
}
- bool hide = isControlClicked(mGroupControls.find(DOCKED)->second, x, y)
- && isControlClicked(mGroupControls.find(GLOBAL)->second, x, y);
+ bool hide = isControlClicked(DOCKED, mGroupControls.find(DOCKED)->second, x, y)
+ && isControlClicked(GLOBAL, mGroupControls.find(GLOBAL)->second, x, y);
if (hide)
{
hideTransientFloaters(x, y);
diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h
index 2919244121..b4611c8c87 100644
--- a/indra/newview/lltransientfloatermgr.h
+++ b/indra/newview/lltransientfloatermgr.h
@@ -56,14 +56,15 @@ public:
void removeControlView(LLView* view);
private:
+ typedef std::set > controls_set_t;
+ typedef std::map group_controls_t;
+
void hideTransientFloaters(S32 x, S32 y);
void leftMouseClickCallback(S32 x, S32 y, MASK mask);
- bool isControlClicked(std::set& set, S32 x, S32 y);
-private:
+ bool isControlClicked(ETransientGroup group, controls_set_t& set, S32 x, S32 y);
+
std::set mTransSet;
- typedef std::set controls_set_t;
- typedef std::map > group_controls_t;
group_controls_t mGroupControls;
};
--
cgit v1.2.3
From 2456573925567ed91d4cc227d7fc97b90248a1fa Mon Sep 17 00:00:00 2001
From: Paul ProductEngine
Date: Fri, 21 Oct 2011 19:14:10 +0200
Subject: EXP-1404 FIXED (Dock icon shown in lower left corner of call dialog
when user has speak icon hidden)
- Don't draw tongue of dockable call dialog floater in case speak button is not present in any tool bar.
---
indra/newview/llimview.cpp | 2 ++
1 file changed, 2 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 6e9baed5f2..33c6b2218c 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1683,6 +1683,8 @@ BOOL LLCallDialog::postBuild()
LLView *anchor_panel = gToolBarView->findChildView("speak");
setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP));
+ setUseTongue(anchor_panel);
+
return TRUE;
}
--
cgit v1.2.3
From b0c1d877a18956714b9885291819c692a67c6913 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 21 Oct 2011 12:40:06 -0500
Subject: SH-2240 Fix for flickering due to artifacting when rendering
occlusion query geometry
---
indra/newview/llspatialpartition.cpp | 1 +
1 file changed, 1 insertion(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 2530f1f0d4..7bf4e901c1 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -322,6 +322,7 @@ void LLSpatialGroup::buildOcclusion()
{
mOcclusionVerts->flush();
+ LLVertexBuffer::unbind();
}
clearState(LLSpatialGroup::OCCLUSION_DIRTY);
--
cgit v1.2.3
From e32227e90b8911200bfd103ff466ddb9231c6619 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Fri, 21 Oct 2011 13:49:35 -0400
Subject: SH-2557 WIP - some cleanup, added error message to try to isolate
causes of translation failure
---
indra/newview/lltranslate.cpp | 39 +++++++++++++++++++++++++++++++++++++++
indra/newview/lltranslate.h | 39 +++------------------------------------
indra/newview/llviewermessage.cpp | 2 +-
3 files changed, 43 insertions(+), 37 deletions(-)
mode change 100644 => 100755 indra/newview/lltranslate.cpp
mode change 100644 => 100755 indra/newview/lltranslate.h
mode change 100644 => 100755 indra/newview/llviewermessage.cpp
(limited to 'indra/newview')
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
old mode 100644
new mode 100755
index 2f60b6b90b..3692f67a8d
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -53,6 +53,45 @@ const char* LLTranslate::m_GoogleData = "responseData";
const char* LLTranslate::m_GoogleTranslation = "translatedText";
const char* LLTranslate::m_GoogleLanguage = "detectedSourceLanguage";
+// virtual
+void LLTranslate::TranslationReceiver::completedRaw( U32 status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
+{
+ if (200 <= status && status < 300)
+ {
+ LLBufferStream istr(channels, buffer.get());
+ std::stringstream strstrm;
+ strstrm << istr.rdbuf();
+
+ const std::string result = strstrm.str();
+ std::string translation;
+ std::string detected_language;
+
+ if (!parseGoogleTranslate(result, translation, detected_language))
+ {
+ handleFailure();
+ return;
+ }
+
+ // Fix up the response
+ LLStringUtil::replaceString(translation, "<", "<");
+ LLStringUtil::replaceString(translation, ">",">");
+ LLStringUtil::replaceString(translation, ""","\"");
+ LLStringUtil::replaceString(translation, "'","'");
+ LLStringUtil::replaceString(translation, "&","&");
+ LLStringUtil::replaceString(translation, "'","'");
+
+ handleResponse(translation, detected_language);
+ }
+ else
+ {
+ LL_WARNS("Translate") << "HTTP request for Google Translate failed with status " << status << ", reason: " << reason << LL_ENDL;
+ handleFailure();
+ }
+}
+
//static
void LLTranslate::translateMessage(LLHTTPClient::ResponderPtr &result, const std::string &from_lang, const std::string &to_lang, const std::string &mesg)
{
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
old mode 100644
new mode 100755
index e85a42e878..c7d6eac33f
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -43,8 +43,8 @@ public :
{
}
- virtual void handleResponse(const std::string &translation, const std::string &recognized_lang) {};
- virtual void handleFailure() {};
+ virtual void handleResponse(const std::string &translation, const std::string &recognized_lang) = 0;
+ virtual void handleFailure() = 0;
public:
~TranslationReceiver()
@@ -54,40 +54,7 @@ public :
virtual void completedRaw( U32 status,
const std::string& reason,
const LLChannelDescriptors& channels,
- const LLIOPipe::buffer_ptr_t& buffer)
- {
- if (200 <= status && status < 300)
- {
- LLBufferStream istr(channels, buffer.get());
- std::stringstream strstrm;
- strstrm << istr.rdbuf();
-
- const std::string result = strstrm.str();
- std::string translation;
- std::string detected_language;
-
- if (!parseGoogleTranslate(result, translation, detected_language))
- {
- handleFailure();
- return;
- }
-
- // Fix up the response
- LLStringUtil::replaceString(translation, "<", "<");
- LLStringUtil::replaceString(translation, ">",">");
- LLStringUtil::replaceString(translation, ""","\"");
- LLStringUtil::replaceString(translation, "'","'");
- LLStringUtil::replaceString(translation, "&","&");
- LLStringUtil::replaceString(translation, "'","'");
-
- handleResponse(translation, detected_language);
- }
- else
- {
- LL_WARNS("Translate") << "HTTP request for Google Translate failed with status " << status << ", reason: " << reason << LL_ENDL;
- handleFailure();
- }
- }
+ const LLIOPipe::buffer_ptr_t& buffer);
protected:
const std::string m_toLang;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
old mode 100644
new mode 100755
index 369d2d757d..04b901ed0e
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3129,7 +3129,7 @@ protected:
void handleFailure()
{
- LLTranslate::TranslationReceiver::handleFailure();
+ llwarns << "translation failed for mesg " << m_origMesg << llendl;
m_chat.mText += " (?)";
LLNotificationsUI::LLNotificationManager::instance().onChat(m_chat, m_toastArgs);
--
cgit v1.2.3
From dbb353d3b0e5cf3aa9d4d8062c527bb52171ef15 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao
Date: Fri, 21 Oct 2011 11:53:29 -0600
Subject: fix for SH-2516: Full Bright Geometry Rendering Increases Rapidly,
Destroying Frame Rate.
---
indra/newview/llappviewer.cpp | 2 ++
indra/newview/llviewertexture.cpp | 47 +++++++++++++++++++++++++++++++++++
indra/newview/llviewertexture.h | 1 +
indra/newview/llviewertexturelist.cpp | 7 ++++++
4 files changed, 57 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 4e1ef59765..152ee34bbc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3160,6 +3160,8 @@ void LLAppViewer::handleViewerCrash()
llinfos << "Last render pool type: " << LLPipeline::sCurRenderPoolType << llendl ;
+ LLMemory::logMemoryInfo(true) ;
+
//print out recorded call stacks if there are any.
LLError::LLCallStacks::print();
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 280337be0f..786e2b73b1 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -417,6 +417,48 @@ const S32 min_non_tex_system_mem = (128<<20); // 128 MB
F32 texmem_lower_bound_scale = 0.85f;
F32 texmem_middle_bound_scale = 0.925f;
+//static
+bool LLViewerTexture::isMemoryForTextureLow()
+{
+ const static S32 MIN_FREE_TEXTURE_MEMORY = 5 ; //MB
+ const static S32 MIN_FREE_MAIN_MEMORy = 100 ; //MB
+
+ bool low_mem = false ;
+ if (gGLManager.mHasATIMemInfo)
+ {
+ S32 meminfo[4];
+ glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, meminfo);
+
+ if(meminfo[0] / 1024 < MIN_FREE_TEXTURE_MEMORY)
+ {
+ low_mem = true ;
+ }
+ }
+#if 0 //ignore nVidia cards
+ else if (gGLManager.mHasNVXMemInfo)
+ {
+ S32 free_memory;
+ glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &free_memory);
+
+ if(free_memory / 1024 < MIN_FREE_TEXTURE_MEMORY)
+ {
+ low_mem = true ;
+ }
+ }
+#endif
+
+ if(!low_mem) //check main memory, only works for windows.
+ {
+ LLMemory::updateMemoryInfo() ;
+ if(LLMemory::getAvailableMemKB() / 1024 < MIN_FREE_MAIN_MEMORy)
+ {
+ low_mem = true ;
+ }
+ }
+
+ return low_mem ;
+}
+
//static
void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity)
{
@@ -449,6 +491,11 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
sEvaluationTimer.reset();
}
}
+ else if(sEvaluationTimer.getElapsedTimeF32() > discard_delta_time && isMemoryForTextureLow())
+ {
+ sDesiredDiscardBias += discard_bias_delta;
+ sEvaluationTimer.reset();
+ }
else if (sDesiredDiscardBias > 0.0f &&
BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < sMaxBoundTextureMemInMegaBytes * texmem_lower_bound_scale &&
BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < sMaxTotalTextureMemInMegaBytes * texmem_lower_bound_scale)
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index a4a5ae0a5b..b96441127d 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -267,6 +267,7 @@ private:
/*virtual*/ LLImageGL* getGLTexture() const ;
virtual void switchToCachedImage();
+ static bool isMemoryForTextureLow() ;
protected:
LLUUID mID;
S32 mBoostLevel; // enum describing priority level
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 30ef8b8a29..92d2762ef3 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1053,6 +1053,13 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
// Treat any card with < 32 MB (shudder) as having 32 MB
// - it's going to be swapping constantly regardless
S32 max_vram = gGLManager.mVRAM;
+
+ if(gGLManager.mIsATI)
+ {
+ //shrink the availabe vram for ATI cards because some of them do not handel texture swapping well.
+ max_vram *= 0.75f;
+ }
+
max_vram = llmax(max_vram, getMinVideoRamSetting());
max_texmem = max_vram;
if (!get_recommended)
--
cgit v1.2.3
From 004cc9107bd48166d87b239fb506532ac6330ef9 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 21 Oct 2011 15:51:49 -0500
Subject: SH-2240 Fix for OSX GLSL compiler not liking #ifndef gl_FragData
---
indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl | 2 +-
.../app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl | 2 +-
.../shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl | 2 +-
.../shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl | 2 +-
.../newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/skyF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/starsF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/treeF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/waterF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl | 4 ++--
15 files changed, 16 insertions(+), 16 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
index 945a1e71a5..9a3b2e3e8a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
index 463c61090f..6cc5f23aca 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
index 73e726fe15..db272cf601 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
@@ -24,7 +24,7 @@
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
index f3351c08bf..14b79c37fd 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
index 7d83b9a72c..381fba8813 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
index a24623d7b5..b582ba7f9c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
@@ -24,7 +24,7 @@
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
index a8e5ae4a62..7bde49eb86 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
index 9a0e511bef..75b45111e0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index a929c0e4f5..5decddebbb 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index dac1ee1294..96ad0aa93a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
index 7986320c38..03fccd2766 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
index 3112a1ea7f..e014e53d25 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
index 06071056ac..b934bc6991 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 43cd4c2eed..4c9ea24a24 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -25,7 +25,7 @@
#extension GL_ARB_texture_rectangle : enable
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
index 0fab5e5001..d2de1980a6 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
+ * $/LicenseInfo$F
*/
@@ -28,6 +28,6 @@
void fullbright_lighting();
void main()
-{
+{F
fullbright_lighting();
}
--
cgit v1.2.3
From f19ee13c0450e0e16e7c8c9d7f700e11c36886ef Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Fri, 21 Oct 2011 14:43:16 -0700
Subject: EXP-1430 FIX -- Minimizing voice settings floater corrupts layout
throughout rest of session
* Added minimum size for layout panel that holds voice morphing and removed
user resizability.
Reviewed by Richard.
---
indra/newview/skins/default/xui/en/floater_voice_controls.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
index 93a04050b6..6807b01fa3 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
@@ -89,7 +89,7 @@
visible="true"
width="20" />
-
+
Date: Fri, 21 Oct 2011 17:54:34 -0400
Subject: SH-2557 WIP - more warning message details
---
indra/newview/llviewermessage.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 04b901ed0e..3eed7edafa 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3129,7 +3129,7 @@ protected:
void handleFailure()
{
- llwarns << "translation failed for mesg " << m_origMesg << llendl;
+ llwarns << "translation failed for mesg " << m_origMesg << " toLang " << m_toLang << " fromLang " << m_fromLang << llendl;
m_chat.mText += " (?)";
LLNotificationsUI::LLNotificationManager::instance().onChat(m_chat, m_toastArgs);
--
cgit v1.2.3
From 92fd54c6c6c337b5b7d46f038075a5a28ebb03b3 Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Fri, 21 Oct 2011 16:29:36 -0700
Subject: EXP-1434 FIX -- Mini-location bar disappears after
maximizing/restoring viewer window
* The topinfo bar no longer follows the right edge of the window so it doesn't
scale down and disappear.
---
indra/newview/skins/default/xui/en/panel_topinfo_bar.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
index 79f29777ce..fc527f5f9d 100644
--- a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
@@ -4,7 +4,7 @@
background_opaque="false"
bg_opaque_color="Black_50"
bg_alpha_color="Black_50"
- follows="left|top|right"
+ follows="left|top"
height="19"
layout="topleft"
name="topinfo_bar"
--
cgit v1.2.3
From 5676e4a62efd2636840395a0667e3df3a48f1989 Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Fri, 21 Oct 2011 18:36:06 -0700
Subject: EXP-1439 : Modify DaD on the Favorite toolbar so that reordering
visible landmarks don't send any back to the end of the list
---
indra/newview/llfavoritesbar.cpp | 65 ++++++++++++++++++++++++--------------
indra/newview/llfavoritesbar.h | 2 +-
indra/newview/llinventorymodel.cpp | 50 +++++++++++++++++++++--------
indra/newview/llinventorymodel.h | 11 +++++--
4 files changed, 86 insertions(+), 42 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 98de418878..4e0c838454 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -504,20 +504,29 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
{
+ // Identify the button hovered and the side to drop
LLFavoriteLandmarkButton* dest = dynamic_cast(mLandingTab);
+ bool insert_before = true;
+ if (!dest)
+ {
+ insert_before = false;
+ dest = dynamic_cast(mLastTab);
+ }
- // there is no need to handle if an item was dragged onto itself
+ // There is no need to handle if an item was dragged onto itself
if (dest && dest->getLandmarkId() == mDragItemId)
{
return;
}
+ // Insert the dragged item in the right place
if (dest)
{
- LLInventoryModel::updateItemsOrder(mItems, mDragItemId, dest->getLandmarkId());
+ LLInventoryModel::updateItemsOrder(mItems, mDragItemId, dest->getLandmarkId(), insert_before);
}
else
{
+ // This can happen when the item list is empty
mItems.push_back(gInventory.getItem(mDragItemId));
}
@@ -534,22 +543,31 @@ void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, const LLUUID& favorites_id, S32 x, S32 y)
{
+ // Identify the button hovered and the side to drop
LLFavoriteLandmarkButton* dest = dynamic_cast(mLandingTab);
-
- // there is no need to handle if an item was dragged onto itself
+ bool insert_before = true;
+ if (!dest)
+ {
+ insert_before = false;
+ dest = dynamic_cast(mLastTab);
+ }
+
+ // There is no need to handle if an item was dragged onto itself
if (dest && dest->getLandmarkId() == mDragItemId)
{
return;
}
-
+
LLPointer viewer_item = new LLViewerInventoryItem(item);
+ // Insert the dragged item in the right place
if (dest)
{
- insertBeforeItem(mItems, dest->getLandmarkId(), viewer_item);
+ insertItem(mItems, dest->getLandmarkId(), viewer_item, insert_before);
}
else
{
+ // This can happen when the item list is empty
mItems.push_back(viewer_item);
}
@@ -1337,29 +1355,28 @@ BOOL LLFavoritesBarCtrl::needToSaveItemsOrder(const LLInventoryModel::item_array
return result;
}
-LLInventoryModel::item_array_t::iterator LLFavoritesBarCtrl::findItemByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id)
+void LLFavoritesBarCtrl::insertItem(LLInventoryModel::item_array_t& items, const LLUUID& dest_item_id, LLViewerInventoryItem* insertedItem, bool insert_before)
{
- LLInventoryModel::item_array_t::iterator result = items.end();
+ // Get the iterator to the destination item
+ LLInventoryModel::item_array_t::iterator it_dest = LLInventoryModel::findItemIterByUUID(items, dest_item_id);
+ if (it_dest == items.end())
+ return;
- for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
+ // Go to the next element if one wishes to insert after the dest element
+ if (!insert_before)
{
- if ((*i)->getUUID() == id)
- {
- result = i;
- break;
- }
+ ++it_dest;
}
-
- return result;
-}
-
-void LLFavoritesBarCtrl::insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem)
-{
- LLViewerInventoryItem* beforeItem = gInventory.getItem(beforeItemId);
- llassert(beforeItem);
- if (beforeItem)
+
+ // Insert the source item in the right place
+ if (it_dest != items.end())
+ {
+ items.insert(it_dest, insertedItem);
+ }
+ else
{
- items.insert(findItemByUUID(items, beforeItem->getUUID()), insertedItem);
+ // Append to the list if it_dest reached the end
+ items.push_back(insertedItem);
}
}
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 1b11d6196e..2f75b3bb0e 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -130,7 +130,7 @@ private:
* inserts an item identified by insertedItemId BEFORE an item identified by beforeItemId.
* this function assumes that an item identified by insertedItemId doesn't exist in items array.
*/
- void insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem);
+ void insertItem(LLInventoryModel::item_array_t& items, const LLUUID& dest_item_id, LLViewerInventoryItem* insertedItem, bool insert_before);
// finds an item by it's UUID in the items array
LLInventoryModel::item_array_t::iterator findItemByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id);
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index e86c427ae2..fb02fe0ff7 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2879,40 +2879,62 @@ BOOL LLInventoryModel::getIsFirstTimeInViewer2()
return sFirstTimeInViewer2;
}
-static LLInventoryModel::item_array_t::iterator find_item_iter_by_uuid(LLInventoryModel::item_array_t& items, const LLUUID& id)
+LLInventoryModel::item_array_t::iterator LLInventoryModel::findItemIterByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id)
{
- LLInventoryModel::item_array_t::iterator result = items.end();
+ LLInventoryModel::item_array_t::iterator curr_item = items.begin();
- for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
+ while (curr_item != items.end())
{
- if ((*i)->getUUID() == id)
+ if ((*curr_item)->getUUID() == id)
{
- result = i;
break;
}
+ ++curr_item;
}
- return result;
+ return curr_item;
}
// static
// * @param[in, out] items - vector with items to be updated. It should be sorted in a right way
// * before calling this method.
// * @param src_item_id - LLUUID of inventory item to be moved in new position
-// * @param dest_item_id - LLUUID of inventory item before which source item should be placed.
-void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id)
+// * @param dest_item_id - LLUUID of inventory item before (or after) which source item should
+// * be placed.
+// * @param insert_before - bool indicating if src_item_id should be placed before or after
+// * dest_item_id. Default is true.
+void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id, bool insert_before)
{
- LLInventoryModel::item_array_t::iterator it_src = find_item_iter_by_uuid(items, src_item_id);
- LLInventoryModel::item_array_t::iterator it_dest = find_item_iter_by_uuid(items, dest_item_id);
+ LLInventoryModel::item_array_t::iterator it_src = findItemIterByUUID(items, src_item_id);
+ LLInventoryModel::item_array_t::iterator it_dest = findItemIterByUUID(items, dest_item_id);
- if (it_src == items.end() || it_dest == items.end()) return;
+ // If one of the passed UUID is not in the item list, bail out
+ if ((it_src == items.end()) || (it_dest == items.end()))
+ return;
+ // Erase the source element from the list, keep a copy before erasing.
LLViewerInventoryItem* src_item = *it_src;
items.erase(it_src);
- // target iterator can not be valid because the container was changed, so update it.
- it_dest = find_item_iter_by_uuid(items, dest_item_id);
- items.insert(it_dest, src_item);
+ // Note: Target iterator is not valid anymore because the container was changed, so update it.
+ it_dest = findItemIterByUUID(items, dest_item_id);
+
+ // Go to the next element if one wishes to insert after the dest element
+ if (!insert_before)
+ {
+ ++it_dest;
+ }
+
+ // Reinsert the source item in the right place
+ if (it_dest != items.end())
+ {
+ items.insert(it_dest, src_item);
+ }
+ else
+ {
+ // Append to the list if it_dest reached the end
+ items.push_back(src_item);
+ }
}
//* @param[in] items vector of items in order to be saved.
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index e0e81f1006..a0fd455cf3 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -332,11 +332,16 @@ protected:
//--------------------------------------------------------------------
public:
// Changes items order by insertion of the item identified by src_item_id
- // before the item identified by dest_item_id. Both items must exist in items array.
- // Sorting is stored after method is finished. Only src_item_id is moved before dest_item_id.
+ // before (or after) the item identified by dest_item_id. Both items must exist in items array.
+ // Sorting is stored after method is finished. Only src_item_id is moved before (or after) dest_item_id.
+ // The parameter "insert_before" controls on which side of dest_item_id src_item_id gets rensinserted.
static void updateItemsOrder(LLInventoryModel::item_array_t& items,
const LLUUID& src_item_id,
- const LLUUID& dest_item_id);
+ const LLUUID& dest_item_id,
+ bool insert_before = true);
+ // Gets an iterator on an item vector knowing only the item UUID.
+ // Returns end() of the vector if not found.
+ static LLInventoryModel::item_array_t::iterator findItemIterByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id);
// Saves current order of the passed items using inventory item sort field.
// Resets 'items' sort fields and saves them on server.
--
cgit v1.2.3
From 443d1b08b22262566dc4d476ca0bdef665518721 Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Fri, 21 Oct 2011 18:51:39 -0700
Subject: EXP-1439 : Fix potential crash when the favorites bar is empty
---
indra/newview/llfavoritesbar.cpp | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 4e0c838454..c48b809114 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -544,12 +544,16 @@ void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, const LLUUID& favorites_id, S32 x, S32 y)
{
// Identify the button hovered and the side to drop
- LLFavoriteLandmarkButton* dest = dynamic_cast(mLandingTab);
- bool insert_before = true;
- if (!dest)
+ LLFavoriteLandmarkButton* dest = NULL;
+ bool insert_before = true;
+ if (!mItems.empty())
{
- insert_before = false;
- dest = dynamic_cast(mLastTab);
+ dest = dynamic_cast(mLandingTab);
+ if (!dest)
+ {
+ insert_before = false;
+ dest = dynamic_cast(mLastTab);
+ }
}
// There is no need to handle if an item was dragged onto itself
--
cgit v1.2.3
From 7534c4efefec53548cb8e2f232c7269cfa8c9e06 Mon Sep 17 00:00:00 2001
From: Oz Linden
Date: Sun, 23 Oct 2011 07:53:45 -0400
Subject: storm-1663: allow wider range of pitch, make range the same for
sitting and otherwise
---
indra/newview/llagent.cpp | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index f8b204eca0..37bf856662 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1101,20 +1101,11 @@ F32 LLAgent::clampPitchToLimits(F32 angle)
LLVector3 skyward = getReferenceUpVector();
- F32 look_down_limit;
- F32 look_up_limit = 10.f * DEG_TO_RAD;
+ const F32 look_down_limit = 179.f * DEG_TO_RAD;;
+ const F32 look_up_limit = 1.f * DEG_TO_RAD;
F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward );
- if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
- {
- look_down_limit = 130.f * DEG_TO_RAD;
- }
- else
- {
- look_down_limit = 170.f * DEG_TO_RAD;
- }
-
// clamp pitch to limits
if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit))
{
--
cgit v1.2.3
From 338914bd7d7e776d3ca5a4eb9a579fcbe53cf1b9 Mon Sep 17 00:00:00 2001
From: Paul ProductEngine
Date: Mon, 24 Oct 2011 14:17:15 +0200
Subject: EXP-1400 FIXED (Call request docking icon overlays other toolbar
buttons when speak button in side toolbar)
- LLDockableFloater::getDockTongue to init dock tongue with proper image depending on floater dock side, also added images for left and right tongues.
- Added proper call floater positioning relatively to the speak button
---
indra/newview/llimview.cpp | 19 ++++++++++++++++++-
indra/newview/llimview.h | 5 ++++-
.../skins/default/textures/windows/Flyout_Left.png | Bin 0 -> 271 bytes
.../skins/default/textures/windows/Flyout_Right.png | Bin 0 -> 280 bytes
.../skins/default/xui/en/floater_outgoing_call.xml | 1 +
5 files changed, 23 insertions(+), 2 deletions(-)
create mode 100644 indra/newview/skins/default/textures/windows/Flyout_Left.png
create mode 100644 indra/newview/skins/default/textures/windows/Flyout_Right.png
(limited to 'indra/newview')
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 33c6b2218c..c751394455 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1681,7 +1681,8 @@ BOOL LLCallDialog::postBuild()
return FALSE;
LLView *anchor_panel = gToolBarView->findChildView("speak");
- setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP));
+ LLDockControl::DocAt dock_pos = getDockControlPos();
+ setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(dock_pos), dock_pos));
setUseTongue(anchor_panel);
@@ -1751,6 +1752,22 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id)
}
}
+LLDockControl::DocAt LLCallDialog::getDockControlPos()
+{
+ LLToolBar* tool_bar = NULL;
+
+ if((tool_bar = gToolBarView->getChild("toolbar_left")) && tool_bar->hasChild("speak", true))
+ {
+ return LLDockControl::RIGHT; // Speak button in the left toolbar so the call floater should be to the right of the speak button
+ }
+ else if((tool_bar = gToolBarView->getChild("toolbar_right")) && tool_bar->hasChild("speak", true))
+ {
+ return LLDockControl::LEFT; // Speak button in the right toolbar so the call floater should be to the left of the speak button
+ }
+
+ return LLDockControl::TOP;
+}
+
bool LLCallDialog::lifetimeHasExpired()
{
if (mLifetimeTimer.getStarted())
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 93b604d36a..33c7ae9e54 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -491,7 +491,7 @@ class LLCallDialog : public LLDockableFloater
{
public:
LLCallDialog(const LLSD& payload);
- ~LLCallDialog();
+ virtual ~LLCallDialog();
virtual BOOL postBuild();
@@ -519,6 +519,9 @@ protected:
void setIcon(const LLSD& session_id, const LLSD& participant_id);
LLSD mPayload;
+
+private:
+ LLDockControl::DocAt getDockControlPos();
};
class LLIncomingCallDialog : public LLCallDialog
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Left.png b/indra/newview/skins/default/textures/windows/Flyout_Left.png
new file mode 100644
index 0000000000..6ac9fe2efd
Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Flyout_Left.png differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Right.png b/indra/newview/skins/default/textures/windows/Flyout_Right.png
new file mode 100644
index 0000000000..aa1f0625aa
Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Flyout_Right.png differ
diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
index 9db6568ee3..ffbb6aa28b 100644
--- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
@@ -8,6 +8,7 @@
layout="topleft"
name="outgoing call"
help_topic="outgoing_call"
+ save_dock_state="true"
title="CALLING"
width="410">
Date: Mon, 24 Oct 2011 10:53:17 -0500
Subject: F ?
---
indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
index d2de1980a6..a54c0caf81 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
@@ -28,6 +28,6 @@
void fullbright_lighting();
void main()
-{F
+{
fullbright_lighting();
}
--
cgit v1.2.3
From dfe75ba0ebfe01928d9daba76f6e8b864f770e59 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 24 Oct 2011 12:35:53 -0500
Subject: SH-2610 Fix for black terrain when bump map is visible and shaders
are not supported.
---
indra/newview/lldrawpoolbump.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 774ca2e8e7..7b9fb2b34b 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -786,7 +786,7 @@ void LLDrawPoolBump::endBump(U32 pass)
{
// Disable texture blending on unit 1
gGL.getTexUnit(1)->activate();
- //gGL.getTexUnit(1)->disable();
+ gGL.getTexUnit(1)->disable();
gGL.getTexUnit(1)->setTextureBlendType(LLTexUnit::TB_MULT);
// Disable texture blending on unit 0
--
cgit v1.2.3
From 51ba2f5fbc379f58d64f8850cd438cc95d7b89f7 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 24 Oct 2011 12:58:51 -0500
Subject: SH-2240 Fix for crash on enabling shadows when Debug GL is enabled
---
indra/newview/pipeline.cpp | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index cef4c649d7..04edc90be9 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -701,6 +701,9 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
+ refreshCachedSettings();
+ refreshRenderDeferred();
+
// remember these dimensions
mScreenWidth = resX;
mScreenHeight = resY;
@@ -8435,6 +8438,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
BOOL skip_avatar_update = FALSE;
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
+
skip_avatar_update = TRUE;
}
--
cgit v1.2.3
From f5b10238aff1fe0332ed0253d2fbb07be54acd14 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 24 Oct 2011 13:10:26 -0500
Subject: SH-2240 Forcibly disable shaders on hardware that's specifically
flagged as unsupported.
---
indra/newview/gpu_table.txt | 2 +-
indra/newview/llfeaturemanager.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 198e702459..bb85551205 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -367,7 +367,7 @@ NVIDIA GTX 550 .*NVIDIA .*GTX *55.* 3 1
NVIDIA GTX 560 .*NVIDIA .*GTX *56.* 3 1
NVIDIA GTX 570 .*NVIDIA .*GTX *57.* 3 1
NVIDIA GTX 580M .*NVIDIA .*GTX *580M.* 3 1
-NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 3 1
+NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 3 0
NVIDIA GTX 590 .*NVIDIA .*GTX *59.* 3 1
NVIDIA C51 .*NVIDIA .*C51.* 0 1
NVIDIA G72 .*NVIDIA .*G72.* 1 1
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index eb0cdf28c0..08f9d26705 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -731,7 +731,7 @@ void LLFeatureManager::applyBaseMasks()
{
maskFeatures("NoPixelShaders");
}
- if (!gGLManager.mHasVertexShader)
+ if (!gGLManager.mHasVertexShader || !mGPUSupported)
{
maskFeatures("NoVertexShaders");
}
--
cgit v1.2.3
From 6a48cec381bf007f48819c2f4f9f041d36c53cd0 Mon Sep 17 00:00:00 2001
From: eli
Date: Mon, 24 Oct 2011 11:11:04 -0700
Subject: sync with viewer-development
---
.../skins/default/xui/en/floater_avatar.xml | 3 +
.../skins/default/xui/en/floater_camera.xml | 5 +-
.../skins/default/xui/en/floater_destinations.xml | 2 +
.../skins/default/xui/en/floater_how_to.xml | 1 +
indra/newview/skins/default/xui/en/floater_hud.xml | 1 +
indra/newview/skins/default/xui/en/floater_map.xml | 1 +
.../skins/default/xui/en/floater_moveview.xml | 3 +-
.../skins/default/xui/en/floater_my_appearance.xml | 1 +
.../skins/default/xui/en/floater_my_inventory.xml | 1 +
.../skins/default/xui/en/floater_people.xml | 1 +
.../newview/skins/default/xui/en/floater_picks.xml | 1 +
.../skins/default/xui/en/floater_places.xml | 1 +
.../skins/default/xui/en/floater_sound_devices.xml | 1 +
.../default/xui/en/floater_voice_controls.xml | 11 +-
.../skins/default/xui/en/menu_bottomtray.xml | 163 ---------------------
.../newview/skins/default/xui/en/notifications.xml | 20 +--
.../skins/default/xui/en/panel_chat_item.xml | 3 +-
.../skins/default/xui/en/panel_chiclet_bar.xml | 12 +-
.../skins/default/xui/en/panel_notification.xml | 2 +
indra/newview/skins/default/xui/en/strings.xml | 6 +-
.../default/xui/en/widgets/joystick_rotate.xml | 7 +
.../xui/zh_CN/floater_buy_currency_html.xml | 2 -
22 files changed, 55 insertions(+), 193 deletions(-)
delete mode 100644 indra/newview/skins/default/xui/en/menu_bottomtray.xml
create mode 100644 indra/newview/skins/default/xui/en/widgets/joystick_rotate.xml
delete mode 100644 indra/newview/skins/default/xui/zh_CN/floater_buy_currency_html.xml
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
index 3c7de6f334..2d973e7d90 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -1,5 +1,7 @@
- Nearby voice
+ VOICE SETTINGS
- Group call with [GROUP]
+ GROUP CALL WITH [GROUP]
- Conference call
+ CONFERENCE CALL
- Call with [NAME]
+ CALL WITH [NAME]
@@ -51,6 +52,7 @@
user_resize="false"
auto_resize="false"
layout="topleft"
+ min_height="20"
height="20"
name="my_panel">
-
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 6720d8131e..3ed8c30ca8 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5432,21 +5432,23 @@ Your calling card was declined.
-You can teleport to locations like '[NAME]' by opening the Places panel on the right side of your screen, and then select the Landmarks tab.
-Click on any landmark to select it, then click 'Teleport' at the bottom of the panel.
-(You can also double-click on the landmark, or right-click it and choose 'Teleport'.)
+ icon="notifytip.tga"
+ name="TeleportToLandmark"
+ type="notifytip">
+ To teleport to locations like '[NAME]', click on the "Places" button,
+ then select the Landmarks tab in the window that opens. Click on any
+ landmark to select it, then click 'Teleport' at the bottom of the window.
+ (You can also double-click on the landmark, or right-click it and
+ choose 'Teleport'.)
-You can contact Residents like '[NAME]' by opening the People panel on the right side of your screen.
-Select the Resident from the list, then click 'IM' at the bottom of the panel.
-(You can also double-click on their name in the list, or right-click and choose 'IM').
+ To contact Residents like '[NAME]', click on the "People" button , select a Resident from the window that opens, then click 'IM' at the
+ bottom of the window.
+ (You can also double-click on their name in the list, or right-click and choose 'IM').
diff --git a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml
index 355a76e05f..41d1036a4d 100644
--- a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml
@@ -42,7 +42,7 @@
top="7"
width="189">
+ width="12" />
+ width="12" />
InventoryDisplayOutbox
--
cgit v1.2.3
From dbf7bdfe8f266ffb95a6a1def58ccbf46f63eb1c Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Mon, 24 Oct 2011 14:14:55 -0700
Subject: EXP-1354 : Fixed. Toolbars now saved whenever changing their config
and only if initialized correctly.
---
indra/newview/lltoolbarview.cpp | 14 +++++++++++++-
indra/newview/lltoolbarview.h | 1 +
2 files changed, 14 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 619d17efad..5d2cebe031 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -72,7 +72,8 @@ LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
mToolbarRight(NULL),
mToolbarBottom(NULL),
mDragStarted(false),
- mDragToolbarButton(NULL)
+ mDragToolbarButton(NULL),
+ mToolbarsLoaded(false)
{
}
@@ -240,6 +241,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
}
}
}
+ mToolbarsLoaded = true;
return true;
}
@@ -251,6 +253,10 @@ bool LLToolBarView::loadDefaultToolbars()
if (gToolBarView)
{
retval = gToolBarView->loadToolbars(true);
+ if (retval)
+ {
+ gToolBarView->saveToolbars();
+ }
}
return retval;
@@ -258,6 +264,9 @@ bool LLToolBarView::loadDefaultToolbars()
void LLToolBarView::saveToolbars() const
{
+ if (!mToolbarsLoaded)
+ return;
+
// Build the parameter tree from the toolbar data
LLToolBarView::ToolbarSet toolbar_set;
if (mToolbarLeft)
@@ -440,6 +449,9 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
int new_rank = toolbar->getRankFromPosition(x,y);
toolbar->addCommand(command_id, new_rank);
}
+
+ // Save the new toolbars configuration
+ gToolBarView->saveToolbars();
}
else
{
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 60ad6316f8..2b26db3802 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -98,6 +98,7 @@ private:
LLToolBar* mToolbarLeft;
LLToolBar* mToolbarRight;
LLToolBar* mToolbarBottom;
+ bool mToolbarsLoaded;
bool mDragStarted;
LLToolBarButton* mDragToolbarButton;
--
cgit v1.2.3
From c6c15aacb394f6ccff77625653591927e450c897 Mon Sep 17 00:00:00 2001
From: eli
Date: Mon, 24 Oct 2011 14:36:41 -0700
Subject: WIP INTL-78 Turkish translation for FUI
---
.../newview/skins/default/xui/tr/floater_about.xml | 5 +-
.../skins/default/xui/tr/floater_about_land.xml | 6 +-
.../skins/default/xui/tr/floater_avatar.xml | 2 +
.../skins/default/xui/tr/floater_camera.xml | 2 +-
.../skins/default/xui/tr/floater_chat_bar.xml | 7 +
.../skins/default/xui/tr/floater_destinations.xml | 2 +
.../skins/default/xui/tr/floater_fast_timers.xml | 10 +
.../skins/default/xui/tr/floater_how_to.xml | 2 +
indra/newview/skins/default/xui/tr/floater_map.xml | 4 +-
.../skins/default/xui/tr/floater_model_preview.xml | 376 +++++++++++----------
.../skins/default/xui/tr/floater_model_wizard.xml | 122 ++-----
.../skins/default/xui/tr/floater_moveview.xml | 2 +-
.../skins/default/xui/tr/floater_my_appearance.xml | 4 +
.../skins/default/xui/tr/floater_my_inventory.xml | 2 +
.../default/xui/tr/floater_object_weights.xml | 28 ++
.../default/xui/tr/floater_outfit_save_as.xml | 2 +-
.../skins/default/xui/tr/floater_people.xml | 7 +
.../newview/skins/default/xui/tr/floater_picks.xml | 2 +
.../skins/default/xui/tr/floater_places.xml | 4 +
.../skins/default/xui/tr/floater_sound_devices.xml | 2 +-
.../newview/skins/default/xui/tr/floater_stats.xml | 12 +-
.../newview/skins/default/xui/tr/floater_tools.xml | 11 +-
.../skins/default/xui/tr/floater_toybox.xml | 10 +
.../default/xui/tr/floater_voice_controls.xml | 8 +-
.../skins/default/xui/tr/menu_bottomtray.xml | 2 +-
.../skins/default/xui/tr/menu_hide_navbar.xml | 2 +-
indra/newview/skins/default/xui/tr/menu_login.xml | 2 +-
.../newview/skins/default/xui/tr/menu_toolbars.xml | 6 +
indra/newview/skins/default/xui/tr/menu_viewer.xml | 27 +-
.../newview/skins/default/xui/tr/notifications.xml | 14 +-
.../skins/default/xui/tr/panel_chiclet_bar.xml | 15 +
indra/newview/skins/default/xui/tr/panel_me.xml | 5 +-
.../skins/default/xui/tr/panel_navigation_bar.xml | 35 +-
.../skins/default/xui/tr/panel_nearby_chat.xml | 4 +
.../default/xui/tr/panel_preferences_chat.xml | 2 +-
.../default/xui/tr/panel_preferences_general.xml | 4 +-
.../default/xui/tr/panel_preferences_move.xml | 31 +-
.../skins/default/xui/tr/panel_status_bar.xml | 7 +-
.../skins/default/xui/tr/sidepanel_inventory.xml | 14 +-
indra/newview/skins/default/xui/tr/strings.xml | 189 ++++++++++-
40 files changed, 628 insertions(+), 363 deletions(-)
create mode 100644 indra/newview/skins/default/xui/tr/floater_avatar.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_chat_bar.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_destinations.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_fast_timers.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_how_to.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_my_appearance.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_my_inventory.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_object_weights.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_people.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_picks.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_places.xml
create mode 100644 indra/newview/skins/default/xui/tr/floater_toybox.xml
create mode 100644 indra/newview/skins/default/xui/tr/menu_toolbars.xml
create mode 100644 indra/newview/skins/default/xui/tr/panel_chiclet_bar.xml
create mode 100644 indra/newview/skins/default/xui/tr/panel_nearby_chat.xml
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/tr/floater_about.xml b/indra/newview/skins/default/xui/tr/floater_about.xml
index 2fdbafdfb4..998890b85c 100644
--- a/indra/newview/skins/default/xui/tr/floater_about.xml
+++ b/indra/newview/skins/default/xui/tr/floater_about.xml
@@ -10,7 +10,7 @@
<nolink>[HOSTNAME]</nolink> ([HOSTIP]) üzerinde bulunan [REGION] içerisinde [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] konumundasınız
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [Sürüm Notları]]
+[SERVER_RELEASE_NOTES_URL]
CPU: [CPU]
@@ -37,6 +37,9 @@ Ses Sunucusu Sürümü: [VOICE_VERSION]
Kaybolan Paketler: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%)
+
+ Sunucu sürümü notları URL'si alınırken hata oluştu.
+
diff --git a/indra/newview/skins/default/xui/tr/floater_about_land.xml b/indra/newview/skins/default/xui/tr/floater_about_land.xml
index 6256f954b2..c44722f4ba 100644
--- a/indra/newview/skins/default/xui/tr/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/tr/floater_about_land.xml
@@ -212,19 +212,19 @@
Bölge Nesne Bonusu Faktörü: [BONUS]
- İlkel Kullanım:
+ Bölge kapasitesi:
[COUNT] / [MAX] ([AVAILABLE]) uygun
- Prim parsel desteği:
+ Parsel arazi kapasitesi:
[COUNT]
- Parseldeki prims:
+ Parsel arazi etkisi:
[COUNT]
diff --git a/indra/newview/skins/default/xui/tr/floater_avatar.xml b/indra/newview/skins/default/xui/tr/floater_avatar.xml
new file mode 100644
index 0000000000..fc9e3c8a9b
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_avatar.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_camera.xml b/indra/newview/skins/default/xui/tr/floater_camera.xml
index 066b7cc933..33b4338e21 100644
--- a/indra/newview/skins/default/xui/tr/floater_camera.xml
+++ b/indra/newview/skins/default/xui/tr/floater_camera.xml
@@ -1,5 +1,5 @@
-
+
Odak Etrafında Kamerayı Döndür
diff --git a/indra/newview/skins/default/xui/tr/floater_chat_bar.xml b/indra/newview/skins/default/xui/tr/floater_chat_bar.xml
new file mode 100644
index 0000000000..d2385e6be3
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_chat_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_destinations.xml b/indra/newview/skins/default/xui/tr/floater_destinations.xml
new file mode 100644
index 0000000000..4504366d63
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_destinations.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_fast_timers.xml b/indra/newview/skins/default/xui/tr/floater_fast_timers.xml
new file mode 100644
index 0000000000..5736bda45e
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_fast_timers.xml
@@ -0,0 +1,10 @@
+
+
+
+ Duraklat
+
+
+ Koş
+
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_how_to.xml b/indra/newview/skins/default/xui/tr/floater_how_to.xml
new file mode 100644
index 0000000000..a42fe0b122
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_how_to.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_map.xml b/indra/newview/skins/default/xui/tr/floater_map.xml
index 36ec097cc4..7d6c314f04 100644
--- a/indra/newview/skins/default/xui/tr/floater_map.xml
+++ b/indra/newview/skins/default/xui/tr/floater_map.xml
@@ -1,5 +1,5 @@
-
+
[REGION](Haritayı açmak için çift tıkla, yatay hareket için shift çek)
@@ -7,7 +7,7 @@
[REGION](Işınlamak için çift tıkla, yatay hareket için shift çek)
- MİNİHARİTA
+ Mini-harita
K
diff --git a/indra/newview/skins/default/xui/tr/floater_model_preview.xml b/indra/newview/skins/default/xui/tr/floater_model_preview.xml
index 7388d236ed..339545f96e 100644
--- a/indra/newview/skins/default/xui/tr/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/tr/floater_model_preview.xml
@@ -1,10 +1,8 @@
-
-
- Boşta
-
+
+
- Dae ayrıştırma sorunu - ayrıntılar için günlüğe bakın.
+ Hata: Tarih ayrıştırma sorunu - ayrıntılar için günlüğe bakın.
Yükleniyor...
@@ -51,6 +49,9 @@
Gereken ayrıntı seviyesi eksik.
+
+ Ayrıntı seviyesi malzemeleri, referans modelin bir alt kümesi değil.
+
Tümü
@@ -63,188 +64,211 @@
ileride belirlenecektir
-
- Ad:
-
-
- Önizleme:
-
-
-
- Ayrıntı Seviyesi: Yüksek
-
-
- Ayrıntı Seviyesi: Orta
-
-
- Ayrıntı Seviyesi: Düşük
-
-
- Ayrıntı Seviyesi: En Düşük
-
-
-
- UYARI:
-
-
- Bu modelin Second Life sunucularına nihai karşıya yüklemesini tamamlayamayacaksınız. Örgü modellerinin karşıya yüklenmesi için etkinleştirmenin [[VURL] nasıl yapılacağını öğrenin].
-
-
- Karşıdan Yükle:
-Fizik:
-Sunucu:
-
-Prim eşdeğerleri:
-
-
- [ST]
-[PH]
-[SIM]
-
-[EQ]
-
-
-
-
- Ayrıntı Seviyesini Seç:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Ayrıntı Seviyesi: [DETAIL]
-
-
-
-
-
-
-
-
-
- Üçgen Limiti
-
-
- Hata Eşiği
-
-
-
- İnşa İşleci:
+
+
+
+ Model adı:
-
- Kuyruk Modu:
+
+ Bu modelin temsil ettiği...
-
-
- Kenar Bütünleştirme
-
-
- Yarım Kenar Bütünleştirme
-
-
-
-
- Açgözlü
-
-
- Tembel
-
-
- Bağımsız
-
+
+
+
+
+
+
+
+
+
-
- Sınır Modu:
-
-
- Paylaşma Toleransı:
-
-
-
- Kilidi Kaldır
-
-
- Kilitle
-
-
-
- Kıvrım Açısı:
-
-
-
-
-
-
-
-
-
-
- En Düşük
-
-
- Düşük
-
-
- Orta
-
-
- Yüksek
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+ 1. Adım: Ayrıntı Seviyesi
+
+
+
+ Birini seçin...
+
+
+ Yüksek
+
+
+ Orta
+
+
+ Düşük
+
+
+ En Düşük
+
+
+ Dosyadan
+
+
+
+
+
+
+ 2. Adım: Çözümle
+
+
+ Yöntem:
+
+
+ Kalite:
+
+
+ Düzeltme:
+
+
+
+
+
+
+
+ 3. Adım: Basitleştir
+
+
+ Yöntem:
+
+
+ Geçişler:
+
+
+ Ayrıntı ölçeği:
+
+
+ Koru:
+
+
+
+
+
+
+
+ Sonuçlar:
+
+
+ Üçgenler: [TRIANGLES],
+
+
+ Köşeler: [POINTS],
+
+
+ Gövdeler: [HULLS]
+
+
-
-
-
-
-
-
-
-
-
-
- Üçgenler: [TRIANGLES]
+
+
+ Ölçek (1=ölçekleme yok):
+
+
+
+ Boyutlar:
-
- Köşeler: [POINTS]
+
+ [X] X [Y] X [Z]
-
- Gövdeler: [HULLS]
+
+
+ Sadece avatar modelleri için:
+
+
+
+ Z kayması (avatarı kaldırmak veya indirmek için):
+
+
-
-
-
-
- [X] x [Y] x [Z] m
+
+
+
+
+
+
+
+ Karşıya yükleme ücreti: L$ [FEE]
+
+
+ Arazi etkisi [EQ]
+
+
+ Karşıdan Yükle: [ST]
+
+
+ Fizik: [PH]
+
+
+ Sunucu: [SIM]
+
+
+ NOT:
+
+
+ Örgü modellerini karşıya yüklemeye hakkınız yok. Nasıl onaylanacağınızı [[VURL] öğrenin].
+
+
+ [STATUS]
-
-
-
-
-
-
- Karşıya yükleme ücreti: L$ [FEE]
+
+
+ Önizleme:
-
-
-
-
+
+
+
+ Yüksek
+
+
+ Orta
+
+
+ Düşük
+
+
+ En Düşük
+
+
+
+ Ekran...
+
+
+
+
+
+
+
+ Önizleme Yayılımı:
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_model_wizard.xml b/indra/newview/skins/default/xui/tr/floater_model_wizard.xml
index a0a67e2def..108d20cfac 100644
--- a/indra/newview/skins/default/xui/tr/floater_model_wizard.xml
+++ b/indra/newview/skins/default/xui/tr/floater_model_wizard.xml
@@ -6,26 +6,20 @@
-
-
+
+
Model dosyasını seçin
-
+
Gelişmiş kullanıcılar: Eğer 3B içerik oluşturma araçlarını kullanmayı biliyorsanız, Gelişmiş Karşıya Yükleyiciyi kullanmak isteyebilirsiniz.
-
+
Karşıya yüklenecek model dosyasını seçin
-
- Second Life, COLLADA (.dae) dosyalarını destekler
-
-
- Boyutlar (metre):
-
X Y Z
@@ -38,18 +32,15 @@
-
-
+
+
Modeli optimize et
-
+
Modeli performans için optimize ettik. İstiyorsanız daha da ayarlayabilirsiniz.
-
-
- Ayrıntı Seviyesi Oluşturuluyor
-
+
Ayrıntı Seviyesi Oluştur: Yüksek
@@ -64,123 +55,64 @@
-
- Performans
-
-
- Daha hızlı işleme
-Daha az ayrıntı
-Daha düşük prim ağırlığı
-
-
- Hassasiyet
-
-
- Daha yavaş işleme
-Daha çok ayrıntı
-Daha yüksek prim ağırlığı
-
-
- '
-
-
- '
-
-
- '
-
-
+
Geometri önizleme
-
+
Çok ayrıntı
-
+
Orta düzey ayrıntı
-
+
Az ayrıntı
-
+
En az ayrıntı
-
-
+
+
Fizik ayarlarını yap
-
+
Modelin dış gövdesi için bir şekil oluşturacağız. Modelinizin amacına uygun olarak şeklin ayrıntı seviyesini belirleyin.
-
-
- Performans
-
-
- Daha hızlı işleme
-Daha az ayrıntı
-Daha düşük prim ağırlığı
-
-
- Hassasiyet
-
-
- Daha yavaş işleme
-Daha çok ayrıntı
-Daha yüksek prim ağırlığı
-
-
- Örnekler:
-Hareketli nesneler
-Uçan nesneler
-Araçlar
-
-
- Örnekler:
-Küçük statik nesneler
-Daha az ayrıntılı nesneler
-Basit eşyalar
-
-
- Örnekler:
-Statik nesneler
-Ayrıntılı nesneler
-Binalar
-
+
-
+
Fizik önizleme
-
+
Çok ayrıntı
-
+
Orta düzey ayrıntı
-
+
Az ayrıntı
-
+
En az ayrıntı
-
-
+
+
İncele
-
+
Parsele/bölgeye etkisi: [EQUIV] prim eşdeğerleri
@@ -193,8 +125,8 @@ Binalar
-
-
+
+
Karşıya yükleme bitti
diff --git a/indra/newview/skins/default/xui/tr/floater_moveview.xml b/indra/newview/skins/default/xui/tr/floater_moveview.xml
index 0d7c118f1e..74ed613a62 100644
--- a/indra/newview/skins/default/xui/tr/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/tr/floater_moveview.xml
@@ -1,5 +1,5 @@
-
+
İleri Yürü (Yukarı Okuna veya W'ye basın)
diff --git a/indra/newview/skins/default/xui/tr/floater_my_appearance.xml b/indra/newview/skins/default/xui/tr/floater_my_appearance.xml
new file mode 100644
index 0000000000..4d71187a1f
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_my_appearance.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_my_inventory.xml b/indra/newview/skins/default/xui/tr/floater_my_inventory.xml
new file mode 100644
index 0000000000..8c62692a88
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_my_inventory.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_object_weights.xml b/indra/newview/skins/default/xui/tr/floater_object_weights.xml
new file mode 100644
index 0000000000..b57943f666
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_object_weights.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_outfit_save_as.xml b/indra/newview/skins/default/xui/tr/floater_outfit_save_as.xml
index 849fdcdbbc..7a9f507c93 100644
--- a/indra/newview/skins/default/xui/tr/floater_outfit_save_as.xml
+++ b/indra/newview/skins/default/xui/tr/floater_outfit_save_as.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/indra/newview/skins/default/xui/tr/floater_people.xml b/indra/newview/skins/default/xui/tr/floater_people.xml
new file mode 100644
index 0000000000..94a27bff57
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_people.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_picks.xml b/indra/newview/skins/default/xui/tr/floater_picks.xml
new file mode 100644
index 0000000000..06a404447e
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_picks.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_places.xml b/indra/newview/skins/default/xui/tr/floater_places.xml
new file mode 100644
index 0000000000..4e09a699f6
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_places.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_sound_devices.xml b/indra/newview/skins/default/xui/tr/floater_sound_devices.xml
index 99c3bea954..470a222d7e 100644
--- a/indra/newview/skins/default/xui/tr/floater_sound_devices.xml
+++ b/indra/newview/skins/default/xui/tr/floater_sound_devices.xml
@@ -1,5 +1,5 @@
-
+
Sesli Sohbet
diff --git a/indra/newview/skins/default/xui/tr/floater_stats.xml b/indra/newview/skins/default/xui/tr/floater_stats.xml
index 2218060cc7..17f1166c46 100644
--- a/indra/newview/skins/default/xui/tr/floater_stats.xml
+++ b/indra/newview/skins/default/xui/tr/floater_stats.xml
@@ -10,8 +10,8 @@
-
-
+
+
@@ -64,6 +64,14 @@
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_tools.xml b/indra/newview/skins/default/xui/tr/floater_tools.xml
index 68c18d65e8..47299059af 100644
--- a/indra/newview/skins/default/xui/tr/floater_tools.xml
+++ b/indra/newview/skins/default/xui/tr/floater_tools.xml
@@ -25,10 +25,10 @@
Araziyi seçmek için tıklayın ve sürükleyin
- [OBJ_COUNT] nesne ( [PRIM_COUNT] prim [PE_STRING] ) seçili
+ [OBJ_COUNT] nesne seçili, [LAND_IMPACT] arazi etkisi
-
- , [SEL_WEIGHT] prim eşdeğerleri
+
+ Kalan kapasite [LAND_CAPACITY].
@@ -107,8 +107,8 @@
Seçilen bir şey yok.
-
- Fizik ağırlığı [PHYS_WEIGHT], İşleme Maliyeti [DISP_WEIGHT].
+
+ [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights Ek bilgi]
@@ -321,7 +321,6 @@
Dikiş türü
-
diff --git a/indra/newview/skins/default/xui/tr/floater_toybox.xml b/indra/newview/skins/default/xui/tr/floater_toybox.xml
new file mode 100644
index 0000000000..05d3633df0
--- /dev/null
+++ b/indra/newview/skins/default/xui/tr/floater_toybox.xml
@@ -0,0 +1,10 @@
+
+
+
+ Düğmeleri araç çubuklarına veya araç çubuklarından sürükleyerek ekleyin ya da kaldırın.
+
+
+ Her bir araç çubuğunun ayarına göre düğmeler gösterilir veya sadece simgeleri yer alır.
+
+
+
diff --git a/indra/newview/skins/default/xui/tr/floater_voice_controls.xml b/indra/newview/skins/default/xui/tr/floater_voice_controls.xml
index d5d6606e4e..dac05d8327 100644
--- a/indra/newview/skins/default/xui/tr/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/tr/floater_voice_controls.xml
@@ -1,13 +1,13 @@
-
+
- YAKINDAKİ SES
+ Yakındaki ses
- [GROUP] ile Grup Araması
+ [GROUP] ile grup araması
- Konferans Araması
+ Konferans araması
[NAME] ile arama
diff --git a/indra/newview/skins/default/xui/tr/menu_bottomtray.xml b/indra/newview/skins/default/xui/tr/menu_bottomtray.xml
index c437669704..f17c0f9971 100644
--- a/indra/newview/skins/default/xui/tr/menu_bottomtray.xml
+++ b/indra/newview/skins/default/xui/tr/menu_bottomtray.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/indra/newview/skins/default/xui/tr/menu_hide_navbar.xml b/indra/newview/skins/default/xui/tr/menu_hide_navbar.xml
index d9b99e040b..130c72e04d 100644
--- a/indra/newview/skins/default/xui/tr/menu_hide_navbar.xml
+++ b/indra/newview/skins/default/xui/tr/menu_hide_navbar.xml
@@ -1,6 +1,6 @@
diff --git a/indra/newview/skins/default/xui/tr/menu_login.xml b/indra/newview/skins/default/xui/tr/menu_login.xml
index a726925bd3..4c3539b38b 100644
--- a/indra/newview/skins/default/xui/tr/menu_login.xml
+++ b/indra/newview/skins/default/xui/tr/menu_login.xml
@@ -1,7 +1,7 @@
diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_general.xml b/indra/newview/skins/default/xui/tr/panel_preferences_general.xml
index bd651049d0..da01bd98a0 100644
--- a/indra/newview/skins/default/xui/tr/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/tr/panel_preferences_general.xml
@@ -11,10 +11,12 @@
-
+
+
+
(Yeniden başlatma gerekir)
diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_move.xml b/indra/newview/skins/default/xui/tr/panel_preferences_move.xml
index da102b078c..c35eaec9c3 100644
--- a/indra/newview/skins/default/xui/tr/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/tr/panel_preferences_move.xml
@@ -7,18 +7,33 @@
-
+
+ Klavye:
+
+
+
+
+ Fare:
+
Fare üzerinden görünümde fare hassasiyeti
-
-
-
-
-
-
-
+
+ Arazi üzerine tek tıklama:
+
+
+
+
+
+
+ Arazi üzerine çift tıklama:
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/tr/panel_status_bar.xml b/indra/newview/skins/default/xui/tr/panel_status_bar.xml
index a7491e9c88..63726b94e2 100644
--- a/indra/newview/skins/default/xui/tr/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/tr/panel_status_bar.xml
@@ -17,12 +17,9 @@
-
+
+
-
-
-
-
24:00 AM PST
diff --git a/indra/newview/skins/default/xui/tr/sidepanel_inventory.xml b/indra/newview/skins/default/xui/tr/sidepanel_inventory.xml
index e02eae1d92..70c449b402 100644
--- a/indra/newview/skins/default/xui/tr/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/tr/sidepanel_inventory.xml
@@ -7,14 +7,14 @@
- Alınan Öğeler ([NUM])
+ Alınan öğeler ([NUM])
- Alınan Öğeler
+ Alınan öğeler
-
+
- [NUM] Yeni
+ [NUM] yeni
@@ -26,12 +26,12 @@
- Satıcı Giden Kutusu ([NUM])
+ Satıcı giden kutusu ([NUM])
- Satıcı Giden Kutusu
+ Satıcı giden kutusu
-
+
diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml
index 543989804a..e1885413bb 100644
--- a/indra/newview/skins/default/xui/tr/strings.xml
+++ b/indra/newview/skins/default/xui/tr/strings.xml
@@ -29,22 +29,22 @@
Önbellek temizleniyor...
- Doku Önbelleği Başlatılıyor...
+ Doku önbelleği başlatılıyor...
VFS Başlatılıyor...
- Grafik Başlatma Başarılamadı. Lütfen Grafik Sürücünüzü Güncelleştirin!
+ Grafik başlatma başarılamadı. Lütfen grafik sürücünüzü güncelleştirin!
Geri yükleniyor...
- Çözünürlük Değiştiriliyor...
+ Çözünürlük değiştiriliyor...
- Tam Parlak (Eski)
+ Tam parlak (eski)
Oturum açılıyor. [APP_NAME] kilitlenmiş görünebilir. Lütfen bekleyin.
@@ -77,10 +77,10 @@
Önbellek dosyaları doğrulanıyor (60-90 saniye zaman alabilir)...
- Yanıt İşleniyor...
+ Yanıt işleniyor...
- Dünya Başlatılıyor...
+ Dünya başlatılıyor...
Görüntülerin kodu çözülüyor...
@@ -128,7 +128,7 @@
Ağ sunucusu tarafından döndürülen sertifika imzası doğrulanamadı. Lütfen Ağ yöneticinize başvurun.
- Ağ Hatası: Bağlantı kurulamadı, lütfen ağ bağlantınızı kontrol edin.
+ Ağ hatası: Bağlantı kurulamadı, lütfen ağ bağlantınızı kontrol edin.
Oturum açılamadı.
@@ -1273,6 +1273,9 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin.
Hata: Bu öğede bir sorun var. Daha sonra tekrar deneyin.
+
+ Açık yer imleri
+
@@ -4251,8 +4254,8 @@ Kötüye Kullanımı Bildirme
Kadın - Vay be
-
- /selamlama1
+
+ /selamlama
/alkış
@@ -4776,4 +4779,172 @@ Düzenleyici yolunu çift tırnakla çevrelemeyi deneyin.
Parçacıklar Gizleniyor
+
+ Arazi hakkında
+
+
+ Görünüm
+
+
+ Avatar
+
+
+ İnşa Et
+
+
+ Sohbet
+
+
+ Pusula
+
+
+ Hedef Konumlar
+
+
+ Mimikler
+
+
+ Nasıl yapılır
+
+
+ Envanter
+
+
+ Harita
+
+
+ Pazaryeri
+
+
+ Mini-harita
+
+
+ Hareket Et
+
+
+ Kişiler
+
+
+ Favoriler
+
+
+ Yerler
+
+
+ Tercihler
+
+
+ Profil
+
+
+ Ara
+
+
+ Anlık görüntü
+
+
+ Konuş
+
+
+ Görünüm
+
+
+ Yakındaki ses
+
+
+ Ziyaret ettiğiniz araziyle ilgili bilgi
+
+
+ Avatarınızı değiştirin
+
+
+ Eksiksiz bir avatar seçin
+
+
+ Nesneler oluşturma ve yüzeyi şekillendirme
+
+
+ Metin kullanarak yakındaki kişilerle sohbet etmek
+
+
+ Pusula
+
+
+ İlgilendiğiniz hedef konumlar
+
+
+ Avatarınız için mimikler
+
+
+ Genel görevleri nasıl yapacağınız
+
+
+ Eşyalarınızı görüntüleyin ve kullanın
+
+
+ Dünya haritası
+
+
+ Alışveriş yap
+
+
+ Yakındaki kişileri göster
+
+
+ Avatarınızı hareket ettirmek
+
+
+ Arkadaşlar, gruplar ve yakındaki kişiler
+
+
+ Profilinizde sık kullanılan olarak gösterilecek yerler
+
+
+ Kaydettiğiniz yerler
+
+
+ Tercihler
+
+
+ Profilinizi düzenleyin veya görüntüleyin
+
+
+ Yerler, etkinlikler ve kişiler bulmak
+
+
+ Resim çekin
+
+
+ Mikrofonunuzu kullanarak yakındaki kişilerle konuşun
+
+
+ Kamera açısını değiştirmek
+
+
+ Ses imkanına sahip yakındaki kişiler
+
+
+ Koru %
+
+
+ Ayrıntı
+
+
+ Daha İyi Ayrıntı
+
+
+ Yüzey
+
+
+ Katı
+
+
+ Sar
+
+
+ Önizleme
+
+
+ Normal
+
--
cgit v1.2.3
From b3c1e967ee9aa1b19622fe7b40e73417ac931b1d Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Mon, 24 Oct 2011 15:42:07 -0700
Subject: EXP-1354 : FIX. Force loading the default toolbars if the user
toolbar loading fails somewhat.
---
indra/newview/lltoolbarview.cpp | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index f481455834..9eea49914f 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -151,6 +151,7 @@ bool LLToolBarView::addCommand(const LLCommandId& command, LLToolBar* toolbar)
bool LLToolBarView::loadToolbars(bool force_default)
{
LLToolBarView::ToolbarSet toolbar_set;
+ bool err = false;
// Load the toolbars.xml file
std::string toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "toolbars.xml");
@@ -165,24 +166,39 @@ bool LLToolBarView::loadToolbars(bool force_default)
}
LLXMLNodePtr root;
- if(!LLXMLNode::parseFile(toolbar_file, root, NULL))
+ if (!LLXMLNode::parseFile(toolbar_file, root, NULL))
{
llwarns << "Unable to load toolbars from file: " << toolbar_file << llendl;
- return false;
+ err = true;
}
- if(!root->hasName("toolbars"))
+
+ if (!err && !root->hasName("toolbars"))
{
llwarns << toolbar_file << " is not a valid toolbars definition file" << llendl;
- return false;
+ err = true;
}
// Parse the toolbar settings
LLXUIParser parser;
- parser.readXUI(root, toolbar_set, toolbar_file);
- if (!toolbar_set.validateBlock())
+ if (!err)
{
- llerrs << "Unable to validate toolbars from file: " << toolbar_file << llendl;
- return false;
+ parser.readXUI(root, toolbar_set, toolbar_file);
+ }
+ if (!err && !toolbar_set.validateBlock())
+ {
+ llwarns << "Unable to validate toolbars from file: " << toolbar_file << llendl;
+ err = true;
+ }
+
+ if (err)
+ {
+ if (force_default)
+ {
+ llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl;
+ return false;
+ }
+ // Try to load the default toolbars
+ return loadToolbars(true);
}
// Clear the toolbars now before adding the loaded commands and settings
--
cgit v1.2.3
From c88ddb0ac958db69732c48592f2a0711af28f712 Mon Sep 17 00:00:00 2001
From: eli
Date: Mon, 24 Oct 2011 15:50:26 -0700
Subject: WIP INTL-79 Russian translation for Windows installer
---
indra/newview/installers/windows/lang_ru.nsi | Bin 7542 -> 7598 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi
index bd37e4ad4c..de7affe08a 100644
Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ
--
cgit v1.2.3
From 4af2cc2e743a79944df6aef6d209ea8b8a1c33e2 Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Mon, 24 Oct 2011 15:52:50 -0700
Subject: EXP-1421 FIX -- Linden Dollars Still visually looks like a button.
* L$ background color now matches the menu bar. The tooltip and click behavior
have been left untouched, per design.
---
indra/newview/skins/default/xui/en/panel_status_bar.xml | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 422bbada7f..b321e0162e 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -2,7 +2,7 @@
+ follows="right|top"
+ name="balance_bg">
Date: Mon, 24 Oct 2011 15:53:50 -0700
Subject: EXP-1453 FIX -- Toybox labels differ in menus and titles
* All text updated to read "Toolbar buttons" in the appropriate ways.
---
indra/newview/skins/default/xui/en/floater_toybox.xml | 2 +-
indra/newview/skins/default/xui/en/menu_toolbars.xml | 2 +-
indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml
index c7e09bf45e..ef3951a1cd 100644
--- a/indra/newview/skins/default/xui/en/floater_toybox.xml
+++ b/indra/newview/skins/default/xui/en/floater_toybox.xml
@@ -13,7 +13,7 @@
open_positioning="centered"
save_rect="true"
single_instance="true"
- title="CUSTOMIZE TOOLBARS"
+ title="TOOLBAR BUTTONS"
width="650">
-
Date: Mon, 24 Oct 2011 15:59:49 -0700
Subject: FIX INTL-79 Turkish translation for Windows installer
---
indra/newview/installers/windows/lang_tr.nsi | Bin 7542 -> 7722 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi
index 7b4ce358f3..5e7e3d797b 100644
Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ
--
cgit v1.2.3
From 563be109484ca887032534fb4cedaa057b33938e Mon Sep 17 00:00:00 2001
From: eli
Date: Mon, 24 Oct 2011 16:03:04 -0700
Subject: WIP INTL-78 Spanish translation for Set28 FUI
---
.../newview/skins/default/xui/es/floater_about.xml | 5 +-
.../skins/default/xui/es/floater_about_land.xml | 6 +-
.../skins/default/xui/es/floater_avatar.xml | 2 +
.../skins/default/xui/es/floater_camera.xml | 2 +-
.../skins/default/xui/es/floater_chat_bar.xml | 7 +
.../skins/default/xui/es/floater_destinations.xml | 2 +
.../skins/default/xui/es/floater_fast_timers.xml | 10 +
.../skins/default/xui/es/floater_how_to.xml | 2 +
indra/newview/skins/default/xui/es/floater_map.xml | 4 +-
.../skins/default/xui/es/floater_model_preview.xml | 376 +++++++++++----------
.../skins/default/xui/es/floater_model_wizard.xml | 122 ++-----
.../skins/default/xui/es/floater_moveview.xml | 6 +-
.../skins/default/xui/es/floater_my_appearance.xml | 4 +
.../skins/default/xui/es/floater_my_inventory.xml | 2 +
.../default/xui/es/floater_object_weights.xml | 28 ++
.../default/xui/es/floater_outfit_save_as.xml | 2 +
.../skins/default/xui/es/floater_people.xml | 7 +
.../newview/skins/default/xui/es/floater_picks.xml | 2 +
.../skins/default/xui/es/floater_places.xml | 4 +
.../skins/default/xui/es/floater_sound_devices.xml | 2 +-
.../newview/skins/default/xui/es/floater_stats.xml | 24 +-
.../newview/skins/default/xui/es/floater_tools.xml | 11 +-
.../skins/default/xui/es/floater_toybox.xml | 10 +
.../default/xui/es/floater_voice_controls.xml | 4 +-
.../skins/default/xui/es/menu_hide_navbar.xml | 2 +-
indra/newview/skins/default/xui/es/menu_login.xml | 2 +-
.../newview/skins/default/xui/es/menu_toolbars.xml | 6 +
indra/newview/skins/default/xui/es/menu_viewer.xml | 25 +-
.../newview/skins/default/xui/es/notifications.xml | 14 +-
.../skins/default/xui/es/panel_chiclet_bar.xml | 15 +
indra/newview/skins/default/xui/es/panel_me.xml | 5 +-
.../skins/default/xui/es/panel_navigation_bar.xml | 35 +-
.../skins/default/xui/es/panel_nearby_chat.xml | 4 +
.../default/xui/es/panel_preferences_chat.xml | 2 +-
.../default/xui/es/panel_preferences_general.xml | 4 +-
.../default/xui/es/panel_preferences_move.xml | 31 +-
.../skins/default/xui/es/panel_status_bar.xml | 7 +-
.../skins/default/xui/es/sidepanel_inventory.xml | 2 +-
indra/newview/skins/default/xui/es/strings.xml | 180 +++++++++-
39 files changed, 618 insertions(+), 360 deletions(-)
create mode 100644 indra/newview/skins/default/xui/es/floater_avatar.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_chat_bar.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_destinations.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_fast_timers.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_how_to.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_my_appearance.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_my_inventory.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_object_weights.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_outfit_save_as.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_people.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_picks.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_places.xml
create mode 100644 indra/newview/skins/default/xui/es/floater_toybox.xml
create mode 100644 indra/newview/skins/default/xui/es/menu_toolbars.xml
create mode 100644 indra/newview/skins/default/xui/es/panel_chiclet_bar.xml
create mode 100644 indra/newview/skins/default/xui/es/panel_nearby_chat.xml
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml
index 93bb8444b4..b7c9cc27ac 100644
--- a/indra/newview/skins/default/xui/es/floater_about.xml
+++ b/indra/newview/skins/default/xui/es/floater_about.xml
@@ -10,7 +10,7 @@
Estás en la posición [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1], de [REGION], alojada en <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
CPU: [CPU]
@@ -37,6 +37,9 @@ Versión del servidor de voz: [VOICE_VERSION]
Paquetes perdidos: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%)
+
+ Error al obtener la URL de las notas de la versión del servidor.
+
diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml
index 83749fc535..b6391e28a0 100644
--- a/indra/newview/skins/default/xui/es/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/es/floater_about_land.xml
@@ -213,19 +213,19 @@ Vaya al menú Mundo > Acerca del terreno o seleccione otra parcela para ver s
Plus de objetos en la región: [BONUS]
- Uso de primitivas:
+ Capacidad de la región:
[COUNT] de un máx. de [MAX] ([AVAILABLE] disponibles)
- Prims que admite la parcela:
+ Capacidad del terreno de la parcela:
[COUNT]
- Prims en la parcela:
+ Impacto en el terreno de la parcela:
[COUNT]
diff --git a/indra/newview/skins/default/xui/es/floater_avatar.xml b/indra/newview/skins/default/xui/es/floater_avatar.xml
new file mode 100644
index 0000000000..7c87fbe01c
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_avatar.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_camera.xml b/indra/newview/skins/default/xui/es/floater_camera.xml
index 04f743b659..cdcb9a146b 100644
--- a/indra/newview/skins/default/xui/es/floater_camera.xml
+++ b/indra/newview/skins/default/xui/es/floater_camera.xml
@@ -1,5 +1,5 @@
-
+
Girar la cámara alrededor de lo enfocado
diff --git a/indra/newview/skins/default/xui/es/floater_chat_bar.xml b/indra/newview/skins/default/xui/es/floater_chat_bar.xml
new file mode 100644
index 0000000000..5e5ef616b8
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_chat_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_destinations.xml b/indra/newview/skins/default/xui/es/floater_destinations.xml
new file mode 100644
index 0000000000..df18698d2f
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_destinations.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_fast_timers.xml b/indra/newview/skins/default/xui/es/floater_fast_timers.xml
new file mode 100644
index 0000000000..eeb39583ef
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_fast_timers.xml
@@ -0,0 +1,10 @@
+
+
+
+ Pausa
+
+
+ Correr
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_how_to.xml b/indra/newview/skins/default/xui/es/floater_how_to.xml
new file mode 100644
index 0000000000..4a57dc3643
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_how_to.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_map.xml b/indra/newview/skins/default/xui/es/floater_map.xml
index 370b7f5053..69f638418e 100644
--- a/indra/newview/skins/default/xui/es/floater_map.xml
+++ b/indra/newview/skins/default/xui/es/floater_map.xml
@@ -1,5 +1,5 @@
-
+
[REGIÓN](Haz doble clic para abrir el mapa y pulsa la tecla Mayús y arrastra para obtener una vista panorámica)
@@ -7,7 +7,7 @@
[REGION](Pulsa dos veces para teleportarte, pulsa mayús y arrastra para obtener una panorámica)
- MINIMAPA
+ Minimapa
N
diff --git a/indra/newview/skins/default/xui/es/floater_model_preview.xml b/indra/newview/skins/default/xui/es/floater_model_preview.xml
index 36f988b25f..3e77453612 100644
--- a/indra/newview/skins/default/xui/es/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/es/floater_model_preview.xml
@@ -1,10 +1,8 @@
-
-
- Inactivo
-
+
+
- Problema de análisis de DAE - consulta los datos en el registro.
+ Error: Problema de análisis de DAE - consulta los datos en el registro.
Cargando...
@@ -51,6 +49,9 @@
Falta un nivel de detalle requerido.
+
+ Los materiales con niveles de detalle no son un subconjunto del modelo de referencia.
+
Todo
@@ -63,188 +64,211 @@
TBD
-
- Nombre:
-
-
- Vista previa:
-
-
-
- Nivel de detalle: Alto
-
-
- Nivel de detalle: Media
-
-
- Nivel de detalle: Bajo
-
-
- Nivel de detalle: Mínimo
-
-
-
- ATENCIÓN:
-
-
- No podrás terminar de subir este modelo a los servidores de Second Life. [[VURL] Averigua cómo] puedes obtener autorización para subir modelos de malla.
-
-
- Descargar:
-Física:
-Servidor:
-
-Equiv. en prims:
-
-
- [ST]
-[PH]
-[SIM]
-
-[EQ]
-
-
-
-
- Seleccionar nivel de detalle:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Nivel de detalle: [DETALLE]
-
-
-
-
-
-
-
-
-
- Límite de triángulo
-
-
- Margen de error
-
-
-
- Crear operador:
+
+
+
+ Nombre del modelo:
-
- Modo de cola:
+
+ Este modelo representa...
-
-
- Cerrar bordes
-
-
- Cerrar la mitad de los bordes
-
-
-
-
- Egoísta
-
-
- Vago
-
-
- Independiente
-
+
+
+
+
+
+
+
+
+
-
- Modo de borde:
-
-
- Tolerancia de uso compartido:
-
-
-
- Desbloquear
-
-
- Lock
-
-
-
- Ángulo de marca:
-
-
-
-
-
-
-
-
-
-
- Mínimo
-
-
- Bajo
-
-
- Media
-
-
- Alto
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+ Paso 1: Nivel de detalle
+
+
+
+ Elegir uno...
+
+
+ Alto
+
+
+ Medio
+
+
+ Bajo
+
+
+ Mínimo
+
+
+ De archivo
+
+
+
+
+
+
+ Paso 2: Analizar
+
+
+ Método:
+
+
+ Calidad:
+
+
+ Leve:
+
+
+
+
+
+
+
+ Paso 3: Simplificar
+
+
+ Método:
+
+
+ Pases:
+
+
+ Escala de detalle:
+
+
+ Retención:
+
+
+
+
+
+
+
+ Resultados:
+
+
+ Triángulos: [TRIANGLES],
+
+
+ Vértices: [POINTS],
+
+
+ Apariencias: [HULLS]
+
+
-
-
-
-
-
-
-
-
-
-
- Triángulos: [TRIÁNGULOS]
+
+
+ Escala (1=sin ajuste de escala):
+
+
+
+ Dimensiones:
-
- Intersecciones: [PUNTOS]
+
+ [X] X [Y] X [Z]
-
- Aspecto exterior: [ASPECTO EXTERIOR]
+
+
+ Solo para modelos de avatar:
+
+
+
+ Desplazamiento Z (subir o bajar el avatar):
+
+
-
-
-
-
- [X] x [Y] x [Z] m
+
+
+
+
+
+
+
+ Precio de subida: L$ [FEE]
+
+
+ Impacto en el terreno: [EQ]
+
+
+ Descargar: [ST]
+
+
+ Física: [PH]
+
+
+ Servidor: [SIM]
+
+
+ NOTA:
+
+
+ No tienes derechos para subir modelos de malla. [[VURL] Averigua cómo] puedes obtener la autorización.
+
+
+ [STATUS]
-
-
-
-
-
-
- Precio de subida: L$ [FEE]
+
+
+ Vista previa:
-
-
-
-
+
+
+
+ Alto
+
+
+ Media
+
+
+ Bajo
+
+
+ Mínimo
+
+
+
+ Mostrar...
+
+
+
+
+
+
+
+ Ampliación de vista previa:
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_model_wizard.xml b/indra/newview/skins/default/xui/es/floater_model_wizard.xml
index 86de557ed9..c4eb5e955a 100644
--- a/indra/newview/skins/default/xui/es/floater_model_wizard.xml
+++ b/indra/newview/skins/default/xui/es/floater_model_wizard.xml
@@ -6,26 +6,20 @@
-
-
+
+
Elige el archivo de modelo
-
+
Usuarios avanzados: si tienes experiencia con las herramientas de creación de contenidos 3D, quizá te interese utilizar la función de subida avanzada.
-
+
Elige el archivo de modelo que deseas subir
-
- Second Life admite los archivos COLLADA (.dae)
-
-
- Dimensiones (metros):
-
X Y Z
@@ -38,18 +32,15 @@
-
-
+
+
Optimizar el modelo
-
+
Hemos optimizado el rendimiento del modelo, pero puedes ajustarlo más si lo deseas.
-
-
- Generando el nivel de detalle
-
+
Generar el nivel de detalle: Alto
@@ -64,123 +55,64 @@
-
- Rendimiento
-
-
- Renderizado más rápido
-Menos detalles
-Menos peso de prim
-
-
- Precisión
-
-
- Renderizado más lento
-Más detalles
-Más peso de prim
-
-
- '
-
-
- '
-
-
- '
-
-
+
Vista previa de geometría
-
+
Detalle alto
-
+
Detalles medios
-
+
Detalle bajo
-
+
Detalles mínimos
-
-
+
+
Ajustar la física
-
+
Crearemos una forma para la apariencia exterior del modelo. Ajusta el nivel de detalle de la forma según se necesite para el propósito proyectado del modelo.
-
-
- Rendimiento
-
-
- Renderizado más rápido
-Menos detalles
-Menos peso de prim
-
-
- Precisión
-
-
- Renderizado más lento
-Más detalles
-Más peso de prim
-
-
- Ejemplos:
-Objetos en movimiento
-Objetos voladores
-Vehículos
-
-
- Ejemplos:
-Objetos estáticos pequeños
-Objetos con menos detalles
-Muebles sencillos
-
-
- Ejemplos:
-Objetos estáticos
-Objetos con detalles
-Edificios
-
+
-
+
Prueba de física
-
+
Detalle alto
-
+
Detalles medios
-
+
Detalle bajo
-
+
Detalles mínimos
-
-
+
+
Revisar
-
+
Impacto en la parcela/región: [EQUIV] equivalentes en prim
@@ -193,8 +125,8 @@ Edificios
-
-
+
+
Subida finalizada
diff --git a/indra/newview/skins/default/xui/es/floater_moveview.xml b/indra/newview/skins/default/xui/es/floater_moveview.xml
index 258f84c361..b29fe04848 100644
--- a/indra/newview/skins/default/xui/es/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/es/floater_moveview.xml
@@ -1,5 +1,5 @@
-
+
Caminar hacia adelante (cursor arriba o W)
@@ -58,14 +58,14 @@
Volar
-
-
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_my_appearance.xml b/indra/newview/skins/default/xui/es/floater_my_appearance.xml
new file mode 100644
index 0000000000..774babf04e
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_my_appearance.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_my_inventory.xml b/indra/newview/skins/default/xui/es/floater_my_inventory.xml
new file mode 100644
index 0000000000..0efd9f1c6d
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_my_inventory.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_object_weights.xml b/indra/newview/skins/default/xui/es/floater_object_weights.xml
new file mode 100644
index 0000000000..50c4f0518d
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_object_weights.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_outfit_save_as.xml b/indra/newview/skins/default/xui/es/floater_outfit_save_as.xml
new file mode 100644
index 0000000000..f48d0d2d0c
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_outfit_save_as.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_people.xml b/indra/newview/skins/default/xui/es/floater_people.xml
new file mode 100644
index 0000000000..f5a3eab008
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_people.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_picks.xml b/indra/newview/skins/default/xui/es/floater_picks.xml
new file mode 100644
index 0000000000..255aa5dcdc
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_picks.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_places.xml b/indra/newview/skins/default/xui/es/floater_places.xml
new file mode 100644
index 0000000000..12c6548205
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_places.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_sound_devices.xml b/indra/newview/skins/default/xui/es/floater_sound_devices.xml
index a5ffbd517a..0291f9e796 100644
--- a/indra/newview/skins/default/xui/es/floater_sound_devices.xml
+++ b/indra/newview/skins/default/xui/es/floater_sound_devices.xml
@@ -1,5 +1,5 @@
-
+
Chat de voz
diff --git a/indra/newview/skins/default/xui/es/floater_stats.xml b/indra/newview/skins/default/xui/es/floater_stats.xml
index 5f4fabf375..ba4af2e866 100644
--- a/indra/newview/skins/default/xui/es/floater_stats.xml
+++ b/indra/newview/skins/default/xui/es/floater_stats.xml
@@ -10,8 +10,8 @@
-
-
+
+
@@ -43,18 +43,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -64,6 +52,14 @@
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml
index f6e246ebae..650b4b457d 100644
--- a/indra/newview/skins/default/xui/es/floater_tools.xml
+++ b/indra/newview/skins/default/xui/es/floater_tools.xml
@@ -25,10 +25,10 @@
Pulsa y arrastra para seleccionar el terreno.
- [OBJ_COUNT] objetos ( [PRIM_COUNT] prims[PE_STRING] ) seleccionados
+ [OBJ_COUNT] objetos seleccionados, impacto en el terreno [LAND_IMPACT]
-
- , [SEL_WEIGHT] equivalentes en prim
+
+ Capacidad restante [LAND_CAPACITY].
@@ -105,8 +105,8 @@
No está seleccionado nada.
-
- Peso de física [PHYS_WEIGHT], Coste de renderizado [DISP_WEIGHT].
+
+ [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights Más información]
@@ -319,7 +319,6 @@
Tipo de unión
-
diff --git a/indra/newview/skins/default/xui/es/floater_toybox.xml b/indra/newview/skins/default/xui/es/floater_toybox.xml
new file mode 100644
index 0000000000..b36a05a6e4
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_toybox.xml
@@ -0,0 +1,10 @@
+
+
+
+ Puedes agregar o quitar botones arrastrándolos a las barras de herramientas o desde ellas.
+
+
+ Los botones aparecerán como se muestra o solo como iconos, según la configuración de cada barra de herramientas.
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_voice_controls.xml b/indra/newview/skins/default/xui/es/floater_voice_controls.xml
index f02855123c..cefec2a7a1 100644
--- a/indra/newview/skins/default/xui/es/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/es/floater_voice_controls.xml
@@ -1,7 +1,7 @@
-
+
- CHAT DE VOZ
+ Chat de voz
Multiconferencia de voz con [GROUP]
diff --git a/indra/newview/skins/default/xui/es/menu_hide_navbar.xml b/indra/newview/skins/default/xui/es/menu_hide_navbar.xml
index 22a1873234..9945908c4f 100644
--- a/indra/newview/skins/default/xui/es/menu_hide_navbar.xml
+++ b/indra/newview/skins/default/xui/es/menu_hide_navbar.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/indra/newview/skins/default/xui/es/menu_login.xml b/indra/newview/skins/default/xui/es/menu_login.xml
index cabcacaed5..e3abf7ad62 100644
--- a/indra/newview/skins/default/xui/es/menu_login.xml
+++ b/indra/newview/skins/default/xui/es/menu_login.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/indra/newview/skins/default/xui/es/menu_toolbars.xml b/indra/newview/skins/default/xui/es/menu_toolbars.xml
new file mode 100644
index 0000000000..f8ed1c54ca
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/menu_toolbars.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml
index bc8a5731ab..0714e7f2c6 100644
--- a/indra/newview/skins/default/xui/es/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/es/menu_viewer.xml
@@ -1,29 +1,30 @@
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
@@ -145,7 +146,6 @@
-
@@ -161,7 +161,7 @@
-
+
@@ -271,6 +271,7 @@
+
diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml
index 4fb29b9427..3fe0072a20 100644
--- a/indra/newview/skins/default/xui/es/notifications.xml
+++ b/indra/newview/skins/default/xui/es/notifications.xml
@@ -1919,6 +1919,12 @@ Dado que estos objetos tienen scripts, moverlos a tu inventario puede provocar u
¿Estás seguro de que quieres salir?
+
+ ¿Estás seguro de que quieres restaurar los botones y barras de herramientas predeterminados?
+
+Esta acción no se puede deshacer.
+
+
[QUESTION]
@@ -2999,10 +3005,6 @@ Al ocultar el botón Hablar se desactiva la función de voz.
-
- Para cambiar de modo tienes que salir y reiniciar.
-
-
La creación y edición de clasificados sólo está disponible en el modo Avanzado. ¿Quieres salir y cambiar de modo? El selector de modo se encuentra en la pantalla de inicio de sesión.
@@ -3047,6 +3049,10 @@ Al ocultar el botón Hablar se desactiva la función de voz.
Las búsquedas solo están disponibles en el modo Avanzado. ¿Quieres cerrar sesión y cambiar de modo?
+
+ Esta acción ocultará todos los botones y elementos de menú. Para restaurarlos, pulsa otra vez en [SHORTCUT].
+
+
Parece que no tienes el hardware apropiado para [APP_NAME]. [APP_NAME] requiere una tarjeta gráfica OpenGL que admita texturas múltiples ('multitexture support'). Si la tienes, comprueba que tienes los últimos 'drivers' para tu tarjeta gráfica, así como los últimos parches y 'service packs' para tu sistema operativo.
diff --git a/indra/newview/skins/default/xui/es/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/es/panel_chiclet_bar.xml
new file mode 100644
index 0000000000..eaaa5dbe78
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/panel_chiclet_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/panel_me.xml b/indra/newview/skins/default/xui/es/panel_me.xml
index ed253904aa..850cd6ec71 100644
--- a/indra/newview/skins/default/xui/es/panel_me.xml
+++ b/indra/newview/skins/default/xui/es/panel_me.xml
@@ -1,7 +1,4 @@
-
-
-
-
+
diff --git a/indra/newview/skins/default/xui/es/panel_navigation_bar.xml b/indra/newview/skins/default/xui/es/panel_navigation_bar.xml
index 293c9ef1d9..1b7f5d5a9f 100644
--- a/indra/newview/skins/default/xui/es/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/es/panel_navigation_bar.xml
@@ -1,18 +1,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Más ▼
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/panel_nearby_chat.xml b/indra/newview/skins/default/xui/es/panel_nearby_chat.xml
new file mode 100644
index 0000000000..95ce14c9a7
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/panel_nearby_chat.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
index a15c8deaf9..4625075aa5 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
@@ -51,7 +51,7 @@
-
+
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_general.xml b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
index c762e6b7fe..920729bb07 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
@@ -13,7 +13,10 @@
+
+
+
(requiere reiniciar)
@@ -48,7 +51,6 @@
-
Si pulsas las teclas de letras:
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_move.xml b/indra/newview/skins/default/xui/es/panel_preferences_move.xml
index d95e167361..b2ff6b61c2 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_move.xml
@@ -7,18 +7,33 @@
-
+
+ Teclado:
+
+
+
+
+ Ratón:
+
Sensibilidad del ratón en la Vista subjetiva:
-
-
-
-
-
-
-
+
+ Un clic en el terreno:
+
+
+
+
+
+
+ Doble clic en el terreno:
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/panel_status_bar.xml b/indra/newview/skins/default/xui/es/panel_status_bar.xml
index 0391258b75..d43790c8c6 100644
--- a/indra/newview/skins/default/xui/es/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/es/panel_status_bar.xml
@@ -17,12 +17,9 @@
-
+
+
-
-
-
-
24:00 AM PST
diff --git a/indra/newview/skins/default/xui/es/sidepanel_inventory.xml b/indra/newview/skins/default/xui/es/sidepanel_inventory.xml
index aae9bfc113..79d0cb84e8 100644
--- a/indra/newview/skins/default/xui/es/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/es/sidepanel_inventory.xml
@@ -14,7 +14,7 @@
- [NUM] Nuevos
+ [NUM] nuevos
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index cc044ba416..83747b85c0 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -34,6 +34,9 @@
Cambiando la resolución...
+
+ Brillo al máximo (antiguo)
+
Iniciando la sesión. [APP_NAME] debe de aparecer congelado. Por favor, espere.
@@ -116,7 +119,7 @@
No se pudo verificar la firma del certificado devuelta por el servidor de la cuadrícula. Ponte en contacto con el administrador de la cuadrícula.
- Error de red: no se ha podido conectar; por favor, revisa tu conexión a Internet.
+ Error de red: no se ha podido conectar; por favor, revisa tu conexión a internet.
Error en el inicio de sesión.
@@ -1255,6 +1258,9 @@ Intenta iniciar sesión de nuevo en unos instantes.
Error: Este objeto tiene un problema. Vuelve a intentarlo más tarde.
+
+ Abrir hitos
+
@@ -4158,8 +4164,8 @@ Denuncia de infracción
Mujer - Admiración
-
- /reverencia1
+
+ /reverencia
/aplaudir
@@ -4671,4 +4677,172 @@ Inténtalo incluyendo la ruta de acceso al editor entre comillas
Ocultando las partículas
+
+ Acerca del terreno
+
+
+ Apariencia
+
+
+ Avatar
+
+
+ Construir
+
+
+ Chat
+
+
+ Brújula
+
+
+ Destinos
+
+
+ Gestos
+
+
+ Cómo
+
+
+ Inventario
+
+
+ Mapa
+
+
+ Mercado
+
+
+ Minimapa
+
+
+ Moverme
+
+
+ Gente
+
+
+ Destacados
+
+
+ Lugares
+
+
+ Preferencias
+
+
+ Perfil
+
+
+ Buscar
+
+
+ Foto
+
+
+ Hablar
+
+
+ Visión
+
+
+ Chat de voz
+
+
+ Información sobre el terreno que vas a visitar
+
+
+ Cambiar tu avatar
+
+
+ Elegir un avatar completo
+
+
+ Construir objetos y modificar la forma del terreno
+
+
+ Habla por chat de texto con las personas próximas
+
+
+ Brújula
+
+
+ Destinos de interés
+
+
+ Gestos para tu avatar
+
+
+ Cómo hacer las tareas habituales
+
+
+ Ver y usar tus pertenencias
+
+
+ Mapa del mundo
+
+
+ Ir de compras
+
+
+ Mostrar la gente que está cerca
+
+
+ Desplazando el avatar
+
+
+ Amigos, grupos y personas próximas
+
+
+ Lugares que se mostrarán como favoritos en tu perfil
+
+
+ Lugares que has guardado
+
+
+ Preferencias
+
+
+ Consulta o edita tu perfil
+
+
+ Buscar lugares, eventos y personas
+
+
+ Tomar una fotografía
+
+
+ Utiliza el micrófono para hablar con las personas próximas
+
+
+ Cambiando el ángulo de la cámara
+
+
+ Personas próximas con capacidad de voz
+
+
+ % retención
+
+
+ Detalle
+
+
+ Mejor detalle
+
+
+ Superficie
+
+
+ Sólido
+
+
+ Envoltura
+
+
+ Vista previa
+
+
+ Normal
+
--
cgit v1.2.3
From 54b16e06a649808cc3bbc94cbe9e9b74211c99f6 Mon Sep 17 00:00:00 2001
From: callum
Date: Mon, 24 Oct 2011 16:26:17 -0700
Subject: EXP-1455 Ctrl-Shift-I no longer opens a second inventory window
---
indra/newview/llpanelmaininventory.cpp | 2 +-
indra/newview/llviewermenu.cpp | 5 +++++
indra/newview/skins/default/xui/en/menu_viewer.xml | 9 +++++++++
3 files changed, 15 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index d6c407d548..9944b51902 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -111,7 +111,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND));
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLPanelMainInventory::doCreate, this, _2));
- mCommitCallbackRegistrar.add("Inventory.NewWindow", boost::bind(&LLPanelMainInventory::newWindow, this));
+ //mCommitCallbackRegistrar.add("Inventory.NewWindow", boost::bind(&LLPanelMainInventory::newWindow, this));
mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this));
mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLPanelMainInventory::resetFilters, this));
mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2));
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2345fbfd6a..e32716eca4 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7962,6 +7962,9 @@ void initialize_menus()
view_listener_t::addEnable(new LLUploadCostCalculator(), "Upload.CalculateCosts");
+
+ commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory));
+
// Agent
commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying));
enable.add("Agent.enableFlying", boost::bind(&LLAgent::enableFlying));
@@ -8337,6 +8340,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLGoToObject(), "GoToObject");
commit.add("PayObject", boost::bind(&handle_give_money_dialog));
+ commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory));
+
enable.add("EnablePayObject", boost::bind(&enable_pay_object));
enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar));
enable.add("EnableEdit", boost::bind(&enable_object_edit));
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 63e50b0b9f..9afe791372 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -43,6 +43,15 @@
function="Floater.Toggle"
parameter="inventory" />
+
+
+
Date: Mon, 24 Oct 2011 16:49:00 -0700
Subject: * Fixed destination guide floater to display on login based on per
account "DisplayDestinationsOnInitialRun" setting or initial agent SL
login. * Added toolbar enumeration for toolbar view so queries for commands
can now indicate where the command currently is on the left, right or
bottom toolbars. * Updated toybox toolbar button tooltips to indicate where
the command currently resides in the view. * Added unused function to allow
toolbar buttons to be changed to flash indefinitely.
Reviewed by Richard.
---
.../newview/app_settings/settings_per_account.xml | 11 +
indra/newview/llfloatertoybox.cpp | 30 ++-
indra/newview/llfloatertoybox.h | 2 +
indra/newview/lltoolbarview.cpp | 264 ++++++++++++---------
indra/newview/lltoolbarview.h | 36 ++-
indra/newview/skins/default/xui/en/strings.xml | 6 +-
.../skins/default/xui/en/widgets/toolbar.xml | 4 +
7 files changed, 235 insertions(+), 118 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index d8295ddb87..6ed4480cb1 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -33,6 +33,17 @@
Value
+ DisplayDestinationsOnInitialRun
+
+ Comment
+ Display the destinations guide when a user first launches FUI.
+ Persist
+ 1
+ Type
+ Boolean
+ Value
+ 1
+
LastInventoryInboxActivity
Comment
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
index 66f644748e..f527937e8f 100644
--- a/indra/newview/llfloatertoybox.cpp
+++ b/indra/newview/llfloatertoybox.cpp
@@ -63,6 +63,7 @@ BOOL LLFloaterToybox::postBuild()
mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolBar->setButtonEnterCallback(boost::bind(&LLFloaterToybox::onToolBarButtonEnter,this,_1));
//
// Sort commands by localized labels so they will appear alphabetized in all languages
@@ -105,8 +106,8 @@ void LLFloaterToybox::draw()
{
const LLCommandId& id = *it;
- const bool commandOnToolbar = gToolBarView->hasCommand(id);
- mToolBar->enableCommand(id, !commandOnToolbar);
+ const bool command_not_present = (gToolBarView->hasCommand(id) == LLToolBarView::TOOLBAR_NONE);
+ mToolBar->enableCommand(id, command_not_present);
}
LLFloater::draw();
@@ -140,5 +141,30 @@ BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
return mToolBar->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
}
+void LLFloaterToybox::onToolBarButtonEnter(LLView* button)
+{
+ std::string suffix = "";
+
+ LLCommandId commandId(button->getName());
+ LLCommand* command = LLCommandManager::instance().getCommand(commandId);
+
+ if (command)
+ {
+ S32 command_loc = gToolBarView->hasCommand(commandId);
+
+ switch(command_loc)
+ {
+ case LLToolBarView::TOOLBAR_BOTTOM: suffix = LLTrans::getString("Toolbar_Bottom_Tooltip"); break;
+ case LLToolBarView::TOOLBAR_LEFT: suffix = LLTrans::getString("Toolbar_Left_Tooltip"); break;
+ case LLToolBarView::TOOLBAR_RIGHT: suffix = LLTrans::getString("Toolbar_Right_Tooltip"); break;
+
+ default:
+ break;
+ }
+ }
+
+ mToolBar->setTooltipButtonSuffix(suffix);
+}
+
// eof
diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h
index 62bf68680d..6f0275b8fe 100644
--- a/indra/newview/llfloatertoybox.h
+++ b/indra/newview/llfloatertoybox.h
@@ -52,6 +52,8 @@ public:
protected:
void onBtnRestoreDefaults();
+ void onToolBarButtonEnter(LLView* button);
+
public:
LLToolBar * mToolBar;
};
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 9eea49914f..8f4f7d405f 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -69,13 +69,14 @@ LLToolBarView::ToolbarSet::ToolbarSet()
LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
: LLUICtrl(p),
- mToolbarLeft(NULL),
- mToolbarRight(NULL),
- mToolbarBottom(NULL),
mDragStarted(false),
mDragToolbarButton(NULL),
mToolbarsLoaded(false)
{
+ for (S32 i = 0; i < TOOLBAR_COUNT; i++)
+ {
+ mToolbars[i] = NULL;
+ }
}
void LLToolBarView::initFromParams(const LLToolBarView::Params& p)
@@ -91,49 +92,99 @@ LLToolBarView::~LLToolBarView()
BOOL LLToolBarView::postBuild()
{
- mToolbarLeft = getChild("toolbar_left");
- mToolbarRight = getChild("toolbar_right");
- mToolbarBottom = getChild("toolbar_bottom");
-
- mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
- mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
- mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
- mToolbarLeft->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
-
- mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
- mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
- mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
- mToolbarRight->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
-
- mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
- mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
- mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
- mToolbarBottom->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
+ mToolbars[TOOLBAR_LEFT] = getChild("toolbar_left");
+ mToolbars[TOOLBAR_RIGHT] = getChild("toolbar_right");
+ mToolbars[TOOLBAR_BOTTOM] = getChild("toolbar_bottom");
+
+ for (int i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ mToolbars[i]->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
+ mToolbars[i]->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
+ mToolbars[i]->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbars[i]->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded,_1));
+ }
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup));
return TRUE;
}
-bool LLToolBarView::hasCommand(const LLCommandId& commandId) const
+S32 LLToolBarView::hasCommand(const LLCommandId& commandId) const
{
- bool has_command = false;
- if (mToolbarLeft && !has_command)
+ S32 command_location = TOOLBAR_NONE;
+
+ for (S32 loc = TOOLBAR_FIRST; loc <= TOOLBAR_LAST; loc++)
{
- has_command = mToolbarLeft->hasCommand(commandId);
+ if (mToolbars[loc]->hasCommand(commandId))
+ {
+ command_location = loc;
+ break;
+ }
}
- if (mToolbarRight && !has_command)
+
+ return command_location;
+}
+
+S32 LLToolBarView::addCommand(const LLCommandId& commandId, EToolBarLocation toolbar, int rank)
+{
+ int old_rank;
+ removeCommand(commandId, old_rank);
+
+ S32 command_location = mToolbars[toolbar]->addCommand(commandId, rank);
+
+ return command_location;
+}
+
+S32 LLToolBarView::removeCommand(const LLCommandId& commandId, int& rank)
+{
+ S32 command_location = hasCommand(commandId);
+ rank = LLToolBar::RANK_NONE;
+
+ if (command_location != TOOLBAR_NONE)
+ {
+ rank = mToolbars[command_location]->removeCommand(commandId);
+ }
+
+ return command_location;
+}
+
+S32 LLToolBarView::enableCommand(const LLCommandId& commandId, bool enabled)
+{
+ S32 command_location = hasCommand(commandId);
+
+ if (command_location != TOOLBAR_NONE)
{
- has_command = mToolbarRight->hasCommand(commandId);
+ mToolbars[command_location]->enableCommand(commandId, enabled);
}
- if (mToolbarBottom && !has_command)
+
+ return command_location;
+}
+
+S32 LLToolBarView::stopCommandInProgress(const LLCommandId& commandId)
+{
+ S32 command_location = hasCommand(commandId);
+
+ if (command_location != TOOLBAR_NONE)
+ {
+ mToolbars[command_location]->stopCommandInProgress(commandId);
+ }
+
+ return command_location;
+}
+
+S32 LLToolBarView::flashCommand(const LLCommandId& commandId, bool flash)
+{
+ S32 command_location = hasCommand(commandId);
+
+ if (command_location != TOOLBAR_NONE)
{
- has_command = mToolbarBottom->hasCommand(commandId);
+ mToolbars[command_location]->flashCommand(commandId, flash);
}
- return has_command;
+
+ return command_location;
}
-bool LLToolBarView::addCommand(const LLCommandId& command, LLToolBar* toolbar)
+bool LLToolBarView::addCommandInternal(const LLCommandId& command, LLToolBar* toolbar)
{
LLCommandManager& mgr = LLCommandManager::instance();
if (mgr.getCommand(command))
@@ -166,7 +217,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
}
LLXMLNodePtr root;
- if (!LLXMLNode::parseFile(toolbar_file, root, NULL))
+ if(!LLXMLNode::parseFile(toolbar_file, root, NULL))
{
llwarns << "Unable to load toolbars from file: " << toolbar_file << llendl;
err = true;
@@ -182,7 +233,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
LLXUIParser parser;
if (!err)
{
- parser.readXUI(root, toolbar_set, toolbar_file);
+ parser.readXUI(root, toolbar_set, toolbar_file);
}
if (!err && !toolbar_set.validateBlock())
{
@@ -195,69 +246,64 @@ bool LLToolBarView::loadToolbars(bool force_default)
if (force_default)
{
llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl;
- return false;
- }
+ return false;
+ }
// Try to load the default toolbars
return loadToolbars(true);
}
// Clear the toolbars now before adding the loaded commands and settings
- if (mToolbarLeft)
- {
- mToolbarLeft->clearCommandsList();
- }
- if (mToolbarRight)
- {
- mToolbarRight->clearCommandsList();
- }
- if (mToolbarBottom)
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
{
- mToolbarBottom->clearCommandsList();
+ if (mToolbars[i])
+ {
+ mToolbars[i]->clearCommandsList();
+ }
}
// Add commands to each toolbar
- if (toolbar_set.left_toolbar.isProvided() && mToolbarLeft)
+ if (toolbar_set.left_toolbar.isProvided() && mToolbars[TOOLBAR_LEFT])
{
if (toolbar_set.left_toolbar.button_display_mode.isProvided())
{
LLToolBarEnums::ButtonType button_type = toolbar_set.left_toolbar.button_display_mode;
- mToolbarLeft->setButtonType(button_type);
+ mToolbars[TOOLBAR_LEFT]->setButtonType(button_type);
}
- BOOST_FOREACH(const LLCommandId::Params& command_name_param, toolbar_set.left_toolbar.commands)
+ BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.left_toolbar.commands)
{
- if (addCommand(LLCommandId(command_name_param), mToolbarLeft) == false)
+ if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_LEFT]))
{
- llwarns << "Error adding command '" << command_name_param.name() << "' to left toolbar." << llendl;
+ llwarns << "Error adding command '" << command_params.name() << "' to left toolbar." << llendl;
}
}
}
- if (toolbar_set.right_toolbar.isProvided() && mToolbarRight)
+ if (toolbar_set.right_toolbar.isProvided() && mToolbars[TOOLBAR_RIGHT])
{
if (toolbar_set.right_toolbar.button_display_mode.isProvided())
{
LLToolBarEnums::ButtonType button_type = toolbar_set.right_toolbar.button_display_mode;
- mToolbarRight->setButtonType(button_type);
+ mToolbars[TOOLBAR_RIGHT]->setButtonType(button_type);
}
- BOOST_FOREACH(const LLCommandId::Params& command_name_param, toolbar_set.right_toolbar.commands)
+ BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.right_toolbar.commands)
{
- if (addCommand(LLCommandId(command_name_param), mToolbarRight) == false)
+ if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_RIGHT]))
{
- llwarns << "Error adding command '" << command_name_param.name() << "' to right toolbar." << llendl;
+ llwarns << "Error adding command '" << command_params.name() << "' to right toolbar." << llendl;
}
}
}
- if (toolbar_set.bottom_toolbar.isProvided() && mToolbarBottom)
+ if (toolbar_set.bottom_toolbar.isProvided() && mToolbars[TOOLBAR_BOTTOM])
{
if (toolbar_set.bottom_toolbar.button_display_mode.isProvided())
{
LLToolBarEnums::ButtonType button_type = toolbar_set.bottom_toolbar.button_display_mode;
- mToolbarBottom->setButtonType(button_type);
+ mToolbars[TOOLBAR_BOTTOM]->setButtonType(button_type);
}
- BOOST_FOREACH(const LLCommandId::Params& command_name_param, toolbar_set.bottom_toolbar.commands)
+ BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.bottom_toolbar.commands)
{
- if (addCommand(LLCommandId(command_name_param), mToolbarBottom) == false)
+ if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_BOTTOM]))
{
- llwarns << "Error adding command '" << command_name_param.name() << "' to bottom toolbar." << llendl;
+ llwarns << "Error adding command '" << command_params.name() << "' to bottom toolbar." << llendl;
}
}
}
@@ -289,20 +335,20 @@ void LLToolBarView::saveToolbars() const
// Build the parameter tree from the toolbar data
LLToolBarView::ToolbarSet toolbar_set;
- if (mToolbarLeft)
+ if (mToolbars[TOOLBAR_LEFT])
{
- toolbar_set.left_toolbar.button_display_mode = mToolbarLeft->getButtonType();
- addToToolset(mToolbarLeft->getCommandsList(),toolbar_set.left_toolbar);
+ toolbar_set.left_toolbar.button_display_mode = mToolbars[TOOLBAR_LEFT]->getButtonType();
+ addToToolset(mToolbars[TOOLBAR_LEFT]->getCommandsList(), toolbar_set.left_toolbar);
}
- if (mToolbarRight)
+ if (mToolbars[TOOLBAR_RIGHT])
{
- toolbar_set.right_toolbar.button_display_mode = mToolbarRight->getButtonType();
- addToToolset(mToolbarRight->getCommandsList(),toolbar_set.right_toolbar);
+ toolbar_set.right_toolbar.button_display_mode = mToolbars[TOOLBAR_RIGHT]->getButtonType();
+ addToToolset(mToolbars[TOOLBAR_RIGHT]->getCommandsList(), toolbar_set.right_toolbar);
}
- if (mToolbarBottom)
+ if (mToolbars[TOOLBAR_BOTTOM])
{
- toolbar_set.bottom_toolbar.button_display_mode = mToolbarBottom->getButtonType();
- addToToolset(mToolbarBottom->getCommandsList(),toolbar_set.bottom_toolbar);
+ toolbar_set.bottom_toolbar.button_display_mode = mToolbars[TOOLBAR_BOTTOM]->getButtonType();
+ addToToolset(mToolbars[TOOLBAR_BOTTOM]->getCommandsList(), toolbar_set.bottom_toolbar);
}
// Serialize the parameter tree
@@ -361,33 +407,36 @@ void LLToolBarView::onToolBarButtonAdded(LLView* button)
void LLToolBarView::draw()
{
- //LLPanel* sizer_left = getChild("sizer_left");
+ LLRect toolbar_rects[TOOLBAR_COUNT];
- LLRect bottom_rect, left_rect, right_rect;
-
- if (mToolbarBottom)
- {
- mToolbarBottom->getParent()->reshape(mToolbarBottom->getParent()->getRect().getWidth(), mToolbarBottom->getRect().getHeight());
- mToolbarBottom->localRectToOtherView(mToolbarBottom->getLocalRect(), &bottom_rect, this);
- }
- if (mToolbarLeft)
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
{
- mToolbarLeft->getParent()->reshape(mToolbarLeft->getRect().getWidth(), mToolbarLeft->getParent()->getRect().getHeight());
- mToolbarLeft->localRectToOtherView(mToolbarLeft->getLocalRect(), &left_rect, this);
- }
- if (mToolbarRight)
- {
- mToolbarRight->getParent()->reshape(mToolbarRight->getRect().getWidth(), mToolbarRight->getParent()->getRect().getHeight());
- mToolbarRight->localRectToOtherView(mToolbarRight->getLocalRect(), &right_rect, this);
+ if (mToolbars[i])
+ {
+ LLLayoutStack::ELayoutOrientation orientation = LLToolBarEnums::getOrientation(mToolbars[i]->getSideType());
+
+ if (orientation == LLLayoutStack::HORIZONTAL)
+ {
+ mToolbars[i]->getParent()->reshape(mToolbars[i]->getParent()->getRect().getWidth(), mToolbars[i]->getRect().getHeight());
+ }
+ else
+ {
+ mToolbars[i]->getParent()->reshape(mToolbars[i]->getRect().getWidth(), mToolbars[i]->getParent()->getRect().getHeight());
+ }
+
+ mToolbars[i]->localRectToOtherView(mToolbars[i]->getLocalRect(), &toolbar_rects[i], this);
+ }
}
// Draw drop zones if drop of a tool is active
if (isToolDragged())
{
LLColor4 drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
- gl_rect_2d(bottom_rect, drop_color, TRUE);
- gl_rect_2d(left_rect, drop_color, TRUE);
- gl_rect_2d(right_rect, drop_color, TRUE);
+
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ gl_rect_2d(toolbar_rects[i], drop_color, TRUE);
+ }
}
LLUICtrl::draw();
@@ -399,9 +448,9 @@ void LLToolBarView::draw()
// ----------------------------------------
-void LLToolBarView::startDragTool(S32 x, S32 y, LLToolBarButton* button)
+void LLToolBarView::startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton)
{
- resetDragTool(button);
+ resetDragTool(toolbarButton);
// Flag the tool dragging but don't start it yet
LLToolDragAndDrop::getInstance()->setDragStart( x, y );
@@ -427,9 +476,7 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp
// Second, stop the command if it is in progress and requires stopping!
LLCommandId command_id = LLCommandId(uuid);
- gToolBarView->mToolbarLeft->stopCommandInProgress(command_id);
- gToolBarView->mToolbarRight->stopCommandInProgress(command_id);
- gToolBarView->mToolbarBottom->stopCommandInProgress(command_id);
+ gToolBarView->stopCommandInProgress(command_id);
gToolBarView->mDragStarted = true;
return TRUE;
@@ -460,10 +507,10 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
{
// Suppress the command from the toolbars (including the one it's dropped in,
// this will handle move position).
- bool command_present = gToolBarView->hasCommand(command_id);
+ S32 old_toolbar_loc = gToolBarView->hasCommand(command_id);
LLToolBar* old_toolbar = NULL;
- if (command_present)
+ if (old_toolbar_loc != TOOLBAR_NONE)
{
llassert(gToolBarView->mDragToolbarButton);
old_toolbar = gToolBarView->mDragToolbarButton->getParentByType();
@@ -473,9 +520,8 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
}
else
{
- gToolBarView->mToolbarBottom->removeCommand(command_id);
- gToolBarView->mToolbarLeft->removeCommand(command_id);
- gToolBarView->mToolbarRight->removeCommand(command_id);
+ int old_rank = LLToolBar::RANK_NONE;
+ gToolBarView->removeCommand(command_id, old_rank);
}
}
@@ -499,27 +545,29 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
return handled;
}
-void LLToolBarView::resetDragTool(LLToolBarButton* button)
+void LLToolBarView::resetDragTool(LLToolBarButton* toolbarButton)
{
// Clear the saved command, toolbar and rank
gToolBarView->mDragStarted = false;
- gToolBarView->mDragToolbarButton = button;
+ gToolBarView->mDragToolbarButton = toolbarButton;
}
void LLToolBarView::setToolBarsVisible(bool visible)
{
- mToolbarBottom->getParent()->setVisible(visible);
- mToolbarLeft->getParent()->setVisible(visible);
- mToolbarRight->getParent()->setVisible(visible);
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ mToolbars[i]->getParent()->setVisible(visible);
+ }
}
bool LLToolBarView::isModified() const
{
bool modified = false;
- modified |= mToolbarBottom->isModified();
- modified |= mToolbarLeft->isModified();
- modified |= mToolbarRight->isModified();
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ modified |= mToolbars[i]->isModified();
+ }
return modified;
}
@@ -532,9 +580,11 @@ bool LLToolBarView::isModified() const
void handleLoginToolbarSetup()
{
// Open the destinations guide by default on first login, per Rhett
- if (gSavedSettings.getBOOL("FirstLoginThisInstall") || gAgent.isFirstLogin())
+ if (gSavedPerAccountSettings.getBOOL("DisplayDestinationsOnInitialRun") || gAgent.isFirstLogin())
{
LLFloaterReg::showInstance("destinations");
+
+ gSavedPerAccountSettings.setBOOL("DisplayDestinationsOnInitialRun", FALSE);
}
}
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index ea14e471cd..3dc8954abe 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -39,6 +39,19 @@ class LLUICtrlFactory;
class LLToolBarView : public LLUICtrl
{
public:
+ typedef enum
+ {
+ TOOLBAR_NONE = 0,
+ TOOLBAR_LEFT,
+ TOOLBAR_RIGHT,
+ TOOLBAR_BOTTOM,
+
+ TOOLBAR_COUNT,
+
+ TOOLBAR_FIRST = TOOLBAR_LEFT,
+ TOOLBAR_LAST = TOOLBAR_BOTTOM,
+ } EToolBarLocation;
+
// Xui structure of the toolbar panel
struct Params : public LLInitParam::Block {};
@@ -52,6 +65,7 @@ public:
{
Mandatory button_display_mode;
Multiple commands;
+
Toolbar();
};
struct ToolbarSet : public LLInitParam::Block
@@ -59,6 +73,7 @@ public:
Optional left_toolbar,
right_toolbar,
bottom_toolbar;
+
ToolbarSet();
};
@@ -66,9 +81,16 @@ public:
virtual ~LLToolBarView();
virtual BOOL postBuild();
virtual void draw();
+
// Toolbar view interface with the rest of the world
- // Checks if the commandId is being used somewhere in one of the toolbars
- bool hasCommand(const LLCommandId& commandId) const;
+ // Checks if the commandId is being used somewhere in one of the toolbars, returns EToolBarLocation
+ S32 hasCommand(const LLCommandId& commandId) const;
+ S32 addCommand(const LLCommandId& commandId, EToolBarLocation toolbar, int rank = LLToolBar::RANK_NONE);
+ S32 removeCommand(const LLCommandId& commandId, int& rank); // Sets the rank the removed command was at, RANK_NONE if not found
+ S32 enableCommand(const LLCommandId& commandId, bool enabled);
+ S32 stopCommandInProgress(const LLCommandId& commandId);
+ S32 flashCommand(const LLCommandId& commandId, bool flash);
+
// Loads the toolbars from the existing user or default settings
bool loadToolbars(bool force_default = false); // return false if load fails
@@ -76,10 +98,10 @@ public:
static bool loadDefaultToolbars();
- static void startDragTool(S32 x, S32 y, LLToolBarButton* button);
+ static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton);
static BOOL handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);
static BOOL handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar);
- static void resetDragTool(LLToolBarButton* button);
+ static void resetDragTool(LLToolBarButton* toolbarButton);
bool isModified() const;
@@ -91,15 +113,13 @@ protected:
private:
void saveToolbars() const;
- bool addCommand(const LLCommandId& commandId, LLToolBar* toolbar);
+ bool addCommandInternal(const LLCommandId& commandId, LLToolBar* toolbar);
void addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const;
static void onToolBarButtonAdded(LLView* button);
// Pointers to the toolbars handled by the toolbar view
- LLToolBar* mToolbarLeft;
- LLToolBar* mToolbarRight;
- LLToolBar* mToolbarBottom;
+ LLToolBar* mToolbars[TOOLBAR_COUNT];
bool mToolbarsLoaded;
bool mDragStarted;
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 308208869d..5e5bc0bde0 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3705,7 +3705,11 @@ Try enclosing path to the editor with double quotes.
Changing camera angle
Volume controls for calls and people near you in world
-
+ currently in your bottom toolbar
+ currently in your left toolbar
+ currently in your right toolbar
+
+
Retain%
Detail
Better Detail
diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
index 7e7a9c61cf..0aa478ace9 100644
--- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
@@ -30,6 +30,8 @@
image_overlay_alignment="left"
use_ellipses="true"
auto_resize="true"
+ button_flash_count="99999"
+ button_flash_rate="1.0"
flash_color="EmphasisColor"/>
--
cgit v1.2.3
From 9cbcecf96b8570dea015db67e0e504ef0c35a6b2 Mon Sep 17 00:00:00 2001
From: eli
Date: Mon, 24 Oct 2011 16:49:51 -0700
Subject: WIP INTL-78 Russian translation for Set28 FUI
---
.../newview/skins/default/xui/ru/floater_about.xml | 5 +-
.../skins/default/xui/ru/floater_about_land.xml | 6 +-
.../skins/default/xui/ru/floater_avatar.xml | 2 +
.../skins/default/xui/ru/floater_camera.xml | 2 +-
.../skins/default/xui/ru/floater_chat_bar.xml | 7 +
.../skins/default/xui/ru/floater_destinations.xml | 2 +
.../skins/default/xui/ru/floater_fast_timers.xml | 10 +
.../skins/default/xui/ru/floater_how_to.xml | 2 +
indra/newview/skins/default/xui/ru/floater_map.xml | 4 +-
.../skins/default/xui/ru/floater_model_preview.xml | 374 +++++++++++----------
.../skins/default/xui/ru/floater_model_wizard.xml | 128 ++-----
.../skins/default/xui/ru/floater_moveview.xml | 2 +-
.../skins/default/xui/ru/floater_my_appearance.xml | 4 +
.../skins/default/xui/ru/floater_my_inventory.xml | 2 +
.../default/xui/ru/floater_object_weights.xml | 28 ++
.../default/xui/ru/floater_outfit_save_as.xml | 2 +-
.../skins/default/xui/ru/floater_people.xml | 7 +
.../newview/skins/default/xui/ru/floater_picks.xml | 2 +
.../skins/default/xui/ru/floater_places.xml | 4 +
.../skins/default/xui/ru/floater_sound_devices.xml | 2 +-
.../newview/skins/default/xui/ru/floater_stats.xml | 14 +-
.../newview/skins/default/xui/ru/floater_tools.xml | 11 +-
.../skins/default/xui/ru/floater_toybox.xml | 10 +
.../default/xui/ru/floater_voice_controls.xml | 4 +-
.../skins/default/xui/ru/menu_hide_navbar.xml | 2 +-
indra/newview/skins/default/xui/ru/menu_login.xml | 2 +-
.../newview/skins/default/xui/ru/menu_toolbars.xml | 6 +
indra/newview/skins/default/xui/ru/menu_viewer.xml | 27 +-
.../newview/skins/default/xui/ru/notifications.xml | 14 +-
.../skins/default/xui/ru/panel_chiclet_bar.xml | 15 +
indra/newview/skins/default/xui/ru/panel_me.xml | 5 +-
.../skins/default/xui/ru/panel_navigation_bar.xml | 35 +-
.../skins/default/xui/ru/panel_nearby_chat.xml | 4 +
.../default/xui/ru/panel_preferences_chat.xml | 2 +-
.../default/xui/ru/panel_preferences_general.xml | 4 +-
.../default/xui/ru/panel_preferences_move.xml | 31 +-
.../skins/default/xui/ru/panel_status_bar.xml | 7 +-
indra/newview/skins/default/xui/ru/strings.xml | 175 +++++++++-
38 files changed, 615 insertions(+), 348 deletions(-)
create mode 100644 indra/newview/skins/default/xui/ru/floater_avatar.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_chat_bar.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_destinations.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_fast_timers.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_how_to.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_my_appearance.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_my_inventory.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_object_weights.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_people.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_picks.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_places.xml
create mode 100644 indra/newview/skins/default/xui/ru/floater_toybox.xml
create mode 100644 indra/newview/skins/default/xui/ru/menu_toolbars.xml
create mode 100644 indra/newview/skins/default/xui/ru/panel_chiclet_bar.xml
create mode 100644 indra/newview/skins/default/xui/ru/panel_nearby_chat.xml
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/ru/floater_about.xml b/indra/newview/skins/default/xui/ru/floater_about.xml
index 6bc550c3fe..deb6be319c 100644
--- a/indra/newview/skins/default/xui/ru/floater_about.xml
+++ b/indra/newview/skins/default/xui/ru/floater_about.xml
@@ -10,7 +10,7 @@
Вы в точке [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] в регионе «[REGION]», расположенном на <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
ЦП: [CPU]
@@ -36,6 +36,9 @@
Потеряно пакетов: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%)
+
+ Ошибка при получении URL-адреса заметок о выпуске сервера.
+
diff --git a/indra/newview/skins/default/xui/ru/floater_about_land.xml b/indra/newview/skins/default/xui/ru/floater_about_land.xml
index cf43f41107..488d2cda17 100644
--- a/indra/newview/skins/default/xui/ru/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/ru/floater_about_land.xml
@@ -212,19 +212,19 @@
Бонусный множитель для объектов: [BONUS]
- Примитивов используется:
+ Емкость региона:
[COUNT] из [MAX] ([AVAILABLE] доступно)
- Разрешено для размещения:
+ Емкость участка:
[COUNT]
- Примитивов на участке:
+ Воздействие участка:
[COUNT]
diff --git a/indra/newview/skins/default/xui/ru/floater_avatar.xml b/indra/newview/skins/default/xui/ru/floater_avatar.xml
new file mode 100644
index 0000000000..6bdf819880
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_avatar.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_camera.xml b/indra/newview/skins/default/xui/ru/floater_camera.xml
index 495c5d55fc..7a1f530668 100644
--- a/indra/newview/skins/default/xui/ru/floater_camera.xml
+++ b/indra/newview/skins/default/xui/ru/floater_camera.xml
@@ -1,5 +1,5 @@
-
+
Повернуть камеру вокруг точки фокусировки
diff --git a/indra/newview/skins/default/xui/ru/floater_chat_bar.xml b/indra/newview/skins/default/xui/ru/floater_chat_bar.xml
new file mode 100644
index 0000000000..eceab1775a
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_chat_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_destinations.xml b/indra/newview/skins/default/xui/ru/floater_destinations.xml
new file mode 100644
index 0000000000..e769812beb
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_destinations.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_fast_timers.xml b/indra/newview/skins/default/xui/ru/floater_fast_timers.xml
new file mode 100644
index 0000000000..20936b8494
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_fast_timers.xml
@@ -0,0 +1,10 @@
+
+
+
+ Пауза
+
+
+ Бег
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_how_to.xml b/indra/newview/skins/default/xui/ru/floater_how_to.xml
new file mode 100644
index 0000000000..52525e5d33
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_how_to.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_map.xml b/indra/newview/skins/default/xui/ru/floater_map.xml
index 169bac5bd2..59ceb0a773 100644
--- a/indra/newview/skins/default/xui/ru/floater_map.xml
+++ b/indra/newview/skins/default/xui/ru/floater_map.xml
@@ -1,5 +1,5 @@
-
+
[REGION](Двойной щелчок открывает карту, shift+перетягивание – обзор)
@@ -7,7 +7,7 @@
[REGION](Двойной щелчок – телепортация, shift+перетягивание – обзор)
- МИНИКАРТА
+ Миникарта
С
diff --git a/indra/newview/skins/default/xui/ru/floater_model_preview.xml b/indra/newview/skins/default/xui/ru/floater_model_preview.xml
index 53ef685f9e..31517e722d 100644
--- a/indra/newview/skins/default/xui/ru/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/ru/floater_model_preview.xml
@@ -1,10 +1,8 @@
-
-
- Неактивно
-
+
+
- Проблема при анализе файла DAE – см. подробности в журнале.
+ Ошибка. Проблема при анализе файла DAE – см. подробности в журнале.
Загрузка...
@@ -51,6 +49,9 @@
Отсутствует необходимый уровень детализации.
+
+ Материалы уровня детализации не входят в эталонную модель.
+
Все
@@ -63,186 +64,211 @@
Позже
-
- Название:
-
-
- Просмотр:
-
-
-
- Уровень детализации: высокий
-
-
- Уровень детализации: средний
-
-
- Уровень детализации: низкий
-
-
- Уровень детализации: самый низкий
-
-
-
- ВНИМАНИЕ!
-
-
- Вы не сможете завершить передачу этой модели на серверы Second Life. [[VURL] Узнайте, как] получить право на передачу сеточных моделей.
-
-
- Загрузка:
-Физические данные:
-Сервер:
-Эквивалент в примитивах:
-
-
- [ST]
-[PH]
-[SIM]
-[EQ]
-
-
-
-
- Выберите уровень детализации:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Уровень детализации: [DETAIL]
-
-
-
-
-
-
-
-
-
- Предельное число треугольников
-
-
- Порог ошибки
-
-
-
- Оператор построения:
+
+
+
+ Имя модели:
-
- Режим очереди:
+
+ Эта модель представляет...
-
-
- Слияние ребер
-
-
- Слияние ребер к одной вершине
-
-
-
-
- интенсивный
-
-
- медленный
-
-
- независимый
-
+
+
+
+
+
+
+
+
+
-
- Границы:
-
-
- Допуск на совпадение:
-
-
-
- нефиксированные
-
-
- фиксированные
-
-
-
- Угол сгиба:
-
-
-
-
-
-
-
-
-
-
- самый низкий
-
-
- низкий
-
-
- средний
-
-
- высокий
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+ Шаг 1. Уровень детализации
+
+
+
+ Выберите вариант...
+
+
+ Высокое
+
+
+ Средний
+
+
+ Низкий
+
+
+ Самый низкий
+
+
+ Из файла
+
+
+
+
+
+
+ Шаг 2. Анализ
+
+
+ Метод:
+
+
+ Качество:
+
+
+ Гладкость:
+
+
+
+
+
+
+
+ Шаг 3. Упрощение
+
+
+ Метод:
+
+
+ Проходов:
+
+
+ Масштаб деталей:
+
+
+ Сохранять:
+
+
+
+
+
+
+
+ Результаты:
+
+
+ Треугольников: [TRIANGLES],
+
+
+ Вершин: [POINTS],
+
+
+ Оболочек: [HULLS]
+
+
-
-
-
-
-
-
-
-
-
-
- Треугольников: [TRIANGLES]
+
+
+ Масштаб (1=не масштабировать):
+
+
+
+ Размеры:
-
- Вершин: [POINTS]
+
+ [X] X [Y] X [Z]
-
- Оболочек: [HULLS]
+
+
+ Только для моделей аватаров:
+
+
+
+ Смещение по Z (поднять или опустить аватар):
+
+
-
-
-
-
- [X] x [Y] x [Z] м
+
+
+
+
+
+
+
+ Плата за передачу: L$ [FEE]
+
+
+ Влияние земли: [EQ]
+
+
+ Загрузка: [ST]
+
+
+ Физика: [PH]
+
+
+ Сервер: [SIM]
+
+
+ ПРИМЕЧАНИЕ.
+
+
+ У вас нет прав на передачу сеточных моделей. [[VURL] Узнайте, как] получить их.
+
+
+ [STATUS]
-
-
-
-
-
-
- Плата за передачу: L$ [FEE]
+
+
+ Просмотр:
-
-
-
-
+
+
+
+ Высокий
+
+
+ Среднее
+
+
+ Низкий
+
+
+ Самый низкий
+
+
+
+ Показать...
+
+
+
+
+
+
+
+ Просмотр разложения:
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_model_wizard.xml b/indra/newview/skins/default/xui/ru/floater_model_wizard.xml
index 9b2924a3db..204f752cd9 100644
--- a/indra/newview/skins/default/xui/ru/floater_model_wizard.xml
+++ b/indra/newview/skins/default/xui/ru/floater_model_wizard.xml
@@ -6,26 +6,20 @@
-
-
- Выберите файл
+
+
+ Выберите файл модели
-
+
Пользователям, работающим в расширенном режиме: если вы умеете создавать трехмерные графические объекты, то, возможно, захотите воспользоваться средством Advanced Uploader, которое предоставляет расширенные возможности передачи объектов.
-
+
Выберите файл модели для передачи
-
- В Second Life поддерживаются файлы COLLADA (DAE)
-
-
- Размеры (в метрах):
-
X Y Z
@@ -38,18 +32,15 @@
-
-
+
+
Оптимизировать модель
-
+
Мы оптимизировали модель для повышения быстродействия. По желанию можно выполнить дополнительную настройку.
-
-
- Создается уровень детализации
-
+
Создать уровень детализации: высокий
@@ -64,123 +55,64 @@
-
- Быстродействие
-
-
- Ускорить прорисовку
-Меньше деталей
-Уменьшить вес примитива
-
-
- Точность
-
-
- Замедлить прорисовку
-Больше деталей
-Повысить вес примитива
-
-
- '
-
-
- '
-
-
- '
-
-
+
Просмотр геометрии
-
+
Детально
-
+
Средняя детализация
-
+
Мало деталей
-
+
Минимум деталей
-
-
+
+
Настроить физические параметры
-
+
Мы создадим форму для внешнего каркаса модели. Настройте уровень детализации формы в соответствии с целями, для которых предназначена модель.
-
-
- Быстродействие
-
-
- Ускорить прорисовку
-Меньше деталей
-Уменьшить вес примитива
-
-
- Точность
-
-
- Замедлить прорисовку
-Больше деталей
-Повысить вес примитива
-
-
- Примеры:
-подвижные объекты;
-летающие объекты;
-транспорт.
-
-
- Примеры:
-небольшие неподвижные объекты;
-простые объекты;
-простая мебель.
-
-
- Примеры:
-неподвижные объекты;
-сложные объекты;
-здания.
-
+
-
+
Просмотр физических данных
-
-
+
+
Детально
-
+
Средняя детализация
-
+
Мало деталей
-
+
Минимум деталей
-
-
- Пересмотреть
+
+
+ Просмотр
-
+
Воздействие на участок/регион: эквивалент в примитивах: [EQUIV]
@@ -193,8 +125,8 @@
-
-
+
+
Передача завершена
diff --git a/indra/newview/skins/default/xui/ru/floater_moveview.xml b/indra/newview/skins/default/xui/ru/floater_moveview.xml
index c6ef4a06b3..6e01f997e1 100644
--- a/indra/newview/skins/default/xui/ru/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/ru/floater_moveview.xml
@@ -1,5 +1,5 @@
-
+
Идти вперед (нажмите стрелку вверх или клавишу W)
diff --git a/indra/newview/skins/default/xui/ru/floater_my_appearance.xml b/indra/newview/skins/default/xui/ru/floater_my_appearance.xml
new file mode 100644
index 0000000000..b90d80f3fd
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_my_appearance.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_my_inventory.xml b/indra/newview/skins/default/xui/ru/floater_my_inventory.xml
new file mode 100644
index 0000000000..534d2a5774
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_my_inventory.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_object_weights.xml b/indra/newview/skins/default/xui/ru/floater_object_weights.xml
new file mode 100644
index 0000000000..41e0118732
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_object_weights.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_outfit_save_as.xml b/indra/newview/skins/default/xui/ru/floater_outfit_save_as.xml
index 781ee8c771..301206e473 100644
--- a/indra/newview/skins/default/xui/ru/floater_outfit_save_as.xml
+++ b/indra/newview/skins/default/xui/ru/floater_outfit_save_as.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/indra/newview/skins/default/xui/ru/floater_people.xml b/indra/newview/skins/default/xui/ru/floater_people.xml
new file mode 100644
index 0000000000..7abc34986a
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_people.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_picks.xml b/indra/newview/skins/default/xui/ru/floater_picks.xml
new file mode 100644
index 0000000000..e0ae8d6f03
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_picks.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_places.xml b/indra/newview/skins/default/xui/ru/floater_places.xml
new file mode 100644
index 0000000000..2a22a855ef
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_places.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_sound_devices.xml b/indra/newview/skins/default/xui/ru/floater_sound_devices.xml
index 809cea5aa1..fc8de858cd 100644
--- a/indra/newview/skins/default/xui/ru/floater_sound_devices.xml
+++ b/indra/newview/skins/default/xui/ru/floater_sound_devices.xml
@@ -1,5 +1,5 @@
-
+
Голосовой чат
diff --git a/indra/newview/skins/default/xui/ru/floater_stats.xml b/indra/newview/skins/default/xui/ru/floater_stats.xml
index c5cccd4091..b1f60c8029 100644
--- a/indra/newview/skins/default/xui/ru/floater_stats.xml
+++ b/indra/newview/skins/default/xui/ru/floater_stats.xml
@@ -10,8 +10,8 @@
-
-
+
+
@@ -32,7 +32,7 @@
-
+
@@ -64,6 +64,14 @@
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_tools.xml b/indra/newview/skins/default/xui/ru/floater_tools.xml
index 7200ec80fa..660eca51c6 100644
--- a/indra/newview/skins/default/xui/ru/floater_tools.xml
+++ b/indra/newview/skins/default/xui/ru/floater_tools.xml
@@ -25,10 +25,10 @@
Щелкните и переместите для выделения земли
- Выбрано объектов: [OBJ_COUNT] (примитивов: [PRIM_COUNT] [PE_STRING])
+ Выбрано объектов: [OBJ_COUNT], влияние на землю [LAND_IMPACT]
-
- , в примитивах: [SEL_WEIGHT]
+
+ Остаток емкости [LAND_CAPACITY].
@@ -107,8 +107,8 @@
Ничего не выбрано.
-
- Вес физических параметров [PHYS_WEIGHT], стоимость прорисовки [DISP_WEIGHT].
+
+ [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights Дополнительная информация]
@@ -321,7 +321,6 @@
Тип стыковки
-
diff --git a/indra/newview/skins/default/xui/ru/floater_toybox.xml b/indra/newview/skins/default/xui/ru/floater_toybox.xml
new file mode 100644
index 0000000000..eb03e8c8bf
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/floater_toybox.xml
@@ -0,0 +1,10 @@
+
+
+
+ Добавьте или удалите кнопки, перетягивая их на панели инструментов или с них.
+
+
+ Кнопки будут отображены в исходном виде или в виде значков, в зависимости от настроек каждой панели инструментов.
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/floater_voice_controls.xml b/indra/newview/skins/default/xui/ru/floater_voice_controls.xml
index 9fd6518984..6520a4342c 100644
--- a/indra/newview/skins/default/xui/ru/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/ru/floater_voice_controls.xml
@@ -1,7 +1,7 @@
-
+
- ЛОКАЛЬНЫЙ ГОЛОСОВОЙ ЧАТ
+ Голоса собеседников
Звонок группе [GROUP]
diff --git a/indra/newview/skins/default/xui/ru/menu_hide_navbar.xml b/indra/newview/skins/default/xui/ru/menu_hide_navbar.xml
index f77896677d..34e5f4c0e4 100644
--- a/indra/newview/skins/default/xui/ru/menu_hide_navbar.xml
+++ b/indra/newview/skins/default/xui/ru/menu_hide_navbar.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/indra/newview/skins/default/xui/ru/menu_login.xml b/indra/newview/skins/default/xui/ru/menu_login.xml
index 3b545bf593..aa3570f176 100644
--- a/indra/newview/skins/default/xui/ru/menu_login.xml
+++ b/indra/newview/skins/default/xui/ru/menu_login.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/indra/newview/skins/default/xui/ru/menu_toolbars.xml b/indra/newview/skins/default/xui/ru/menu_toolbars.xml
new file mode 100644
index 0000000000..e04a9ee57d
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/menu_toolbars.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml
index c4e553f918..322a27003f 100644
--- a/indra/newview/skins/default/xui/ru/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml
@@ -1,27 +1,28 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+
@@ -32,7 +33,7 @@
-
+
@@ -144,7 +145,6 @@
-
@@ -160,7 +160,7 @@
-
+
@@ -288,6 +288,7 @@
+
diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml
index 91c8dbf761..87ae9d06dd 100644
--- a/indra/newview/skins/default/xui/ru/notifications.xml
+++ b/indra/newview/skins/default/xui/ru/notifications.xml
@@ -1909,6 +1909,12 @@ http://secondlife.com/download.
Выйти из программы?
+
+ Вы действительно хотите восстановить принятые по умолчанию кнопки и панели инструментов?
+
+Это действие нельзя отменить.
+
+
[QUESTION]
@@ -2995,10 +3001,6 @@ http://secondlife.com/download.
-
- Для смены режима требуется выйти из программы и перезапустить ее.
-
-
Создание и редактирование рекламы доступно только в расширенном режиме. Выйти из программы и сменить режим? Меню смены режима находится на экране входа.
@@ -3043,6 +3045,10 @@ http://secondlife.com/download.
Поиск доступен только в расширенном режиме. Выйти из программы и сменить режим?
+
+ Это действие приведет к скрытию всех меню и кнопок. Чтобы вернуть их, щелкните [SHORTCUT] снова.
+
+
По-видимому, ваше оборудование не удовлетворяет требованиям [APP_NAME]. Для работы [APP_NAME] необходима графическая карта OpenGL с поддержкой мультитекстур. Если у вас есть такая карта, убедитесь, что установлены новейшие версии драйверов для нее и пакеты обновлений и исправления для операционной системы.
diff --git a/indra/newview/skins/default/xui/ru/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/ru/panel_chiclet_bar.xml
new file mode 100644
index 0000000000..f203ecde4b
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/panel_chiclet_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/panel_me.xml b/indra/newview/skins/default/xui/ru/panel_me.xml
index b37627b4d9..21a125af87 100644
--- a/indra/newview/skins/default/xui/ru/panel_me.xml
+++ b/indra/newview/skins/default/xui/ru/panel_me.xml
@@ -1,7 +1,4 @@
-
-
-
-
+
diff --git a/indra/newview/skins/default/xui/ru/panel_navigation_bar.xml b/indra/newview/skins/default/xui/ru/panel_navigation_bar.xml
index 3bda315261..d9890acff2 100644
--- a/indra/newview/skins/default/xui/ru/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/ru/panel_navigation_bar.xml
@@ -1,18 +1,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Больше ▼
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/panel_nearby_chat.xml b/indra/newview/skins/default/xui/ru/panel_nearby_chat.xml
new file mode 100644
index 0000000000..a371040b74
--- /dev/null
+++ b/indra/newview/skins/default/xui/ru/panel_nearby_chat.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml b/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml
index bc9e9a24ba..5e4130667f 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml
@@ -50,7 +50,7 @@
-
+
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_general.xml b/indra/newview/skins/default/xui/ru/panel_preferences_general.xml
index 28d08d7702..3e21697616 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_general.xml
@@ -11,10 +11,12 @@
-
+
+
+
(Требуется перезапуск)
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_move.xml b/indra/newview/skins/default/xui/ru/panel_preferences_move.xml
index 331776902f..8b3542a6d2 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_move.xml
@@ -7,18 +7,33 @@
-
+
+ Клавиатура:
+
+
+
+
+ Мышь:
+
Чувствительность мыши:
-
-
-
-
-
-
-
+
+ Один щелчок на земле:
+
+
+
+
+
+
+ Двойной щелчок на земле:
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/panel_status_bar.xml b/indra/newview/skins/default/xui/ru/panel_status_bar.xml
index ddf63d69c2..6822244196 100644
--- a/indra/newview/skins/default/xui/ru/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/ru/panel_status_bar.xml
@@ -17,12 +17,9 @@
-
+
+
-
-
-
-
00:00 (тихоокеанское время)
diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml
index 44440ea542..d52cee6b0d 100644
--- a/indra/newview/skins/default/xui/ru/strings.xml
+++ b/indra/newview/skins/default/xui/ru/strings.xml
@@ -1273,6 +1273,9 @@ support@secondlife.com.
Ошибка. Эта вещь создает проблему. Повторите попытку позже.
+
+ Открыть закладки
+
@@ -4248,8 +4251,8 @@ support@secondlife.com.
Женщина – ух ты!
-
- /поклон1
+
+ /поклониться
/хлопнуть
@@ -4772,4 +4775,172 @@ support@secondlife.com.
Частицы скрыты
+
+ О земле
+
+
+ Внешность
+
+
+ Аватар
+
+
+ Строительство
+
+
+ Чат
+
+
+ Компас
+
+
+ Места
+
+
+ Жесты
+
+
+ Инструкции
+
+
+ Инвентарь
+
+
+ Карта
+
+
+ Торговый центр
+
+
+ Миникарта
+
+
+ Переместить
+
+
+ Люди
+
+
+ Подборка
+
+
+ Места
+
+
+ Настройки
+
+
+ Профиль
+
+
+ Поиск
+
+
+ Снимок
+
+
+ Говорить
+
+
+ Вид
+
+
+ Голоса собеседников
+
+
+ Информация о посещаемой вами земле
+
+
+ Сменить аватар
+
+
+ Выберите весь аватар
+
+
+ Построение объектов и формирование ландшафта
+
+
+ Обменивайтесь текстовыми репликами с людьми вокруг вас
+
+
+ Компас
+
+
+ Интересные места
+
+
+ Жесты для аватара
+
+
+ Выполнение типичных задач
+
+
+ Просмотр и использование вашего имущества
+
+
+ Карта мира
+
+
+ Покупки
+
+
+ Показать людей поблизости
+
+
+ Перемещение аватара
+
+
+ Друзья, группы и люди поблизости
+
+
+ Места, которые будут показаны в вашем профиле как избранное
+
+
+ Сохраненные вами места
+
+
+ Настройки
+
+
+ Редактирование или просмотр вашего профиля
+
+
+ Поиск мест, событий, людей
+
+
+ Сделать снимок
+
+
+ Говорите с людьми вокруг вас с помощью микрофона
+
+
+ Изменение угла камеры
+
+
+ Люди около вас с оспособностью говорить
+
+
+ Остаток%
+
+
+ Детализация
+
+
+ Более детально
+
+
+ Поверхность
+
+
+ Сплошной
+
+
+ Оболочка
+
+
+ Предварительный просмотр
+
+
+ Нормальный
+
--
cgit v1.2.3
From 8874ac39c1928bcb70c4f63cd3cfaeb75712d00e Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Mon, 24 Oct 2011 17:06:48 -0700
Subject: EXP-1462 FIX -- Moving speak button or voice settings button between
toolbars can cause viewer to crash on Mac
* Updated iterator code to not erase stuff while we're iterating through it!
Reviewed by Richard.
---
indra/newview/lltransientfloatermgr.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp
index d15efb048b..3d68c10489 100644
--- a/indra/newview/lltransientfloatermgr.cpp
+++ b/indra/newview/lltransientfloatermgr.cpp
@@ -104,6 +104,8 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)
bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set_t& set, S32 x, S32 y)
{
+ std::list< LLHandle > dead_handles;
+
bool res = true;
for (controls_set_t::iterator it = set.begin(); it
!= set.end(); it++)
@@ -113,7 +115,7 @@ bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set
LLHandle handle = *it;
if (handle.isDead())
{
- mGroupControls.find(group)->second.erase(handle);
+ dead_handles.push_back(handle);
continue;
}
@@ -132,6 +134,13 @@ bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set
break;
}
}
+
+ for (std::list< LLHandle >::iterator it = dead_handles.begin(); it != dead_handles.end(); ++it)
+ {
+ LLHandle handle = *it;
+ mGroupControls.find(group)->second.erase(handle);
+ }
+
return res;
}
--
cgit v1.2.3
From 5b0a1ac026e0ca06526cc0c03325b223a051ea63 Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Mon, 24 Oct 2011 19:24:58 -0700
Subject: EXP-1460 : Make the caret in favorites toolbar display more
consistently and with less finicky hit testing
---
indra/newview/llfavoritesbar.cpp | 58 +++++++++++++++++++---------------------
1 file changed, 28 insertions(+), 30 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index c48b809114..6c9058caf1 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -443,17 +443,17 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
setLandingTab(dest);
}
- /*
- * the condition dest == NULL can be satisfied not only in the case
- * of dragging to the right from the last tab of the favbar. there is a
- * small gap between each tab. if the user drags something exactly there
- * then mLandingTab will be set to NULL and the dragged item will be pushed
- * to the end of the favorites bar. this is incorrect behavior. that's why
- * we need an additional check which excludes the case described previously
- * making sure that the mouse pointer is beyond the last tab.
- */
- else if (mLastTab && x >= mLastTab->getRect().mRight)
+ else if (mLastTab && (x >= mLastTab->getRect().mRight))
{
+ /*
+ * the condition dest == NULL can be satisfied not only in the case
+ * of dragging to the right from the last tab of the favbar. there is a
+ * small gap between each tab. if the user drags something exactly there
+ * then mLandingTab will be set to NULL and the dragged item will be pushed
+ * to the end of the favorites bar. this is incorrect behavior. that's why
+ * we need an additional check which excludes the case described previously
+ * making sure that the mouse pointer is beyond the last tab.
+ */
setLandingTab(NULL);
}
@@ -467,7 +467,6 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
if (drop)
{
handleExistingFavoriteDragAndDrop(x, y);
- showDragMarker(FALSE);
}
}
else
@@ -490,7 +489,6 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
setLandingTab(NULL);
}
handleNewFavoriteDragAndDrop(item, favorites_id, x, y);
- showDragMarker(FALSE);
}
}
}
@@ -664,7 +662,7 @@ void LLFavoritesBarCtrl::draw()
{
// mouse pointer hovers over an existing tab
LLRect rect = mLandingTab->getRect();
- mImageDragIndication->draw(rect.mLeft - w/2, rect.getHeight(), w, h);
+ mImageDragIndication->draw(rect.mLeft, rect.getHeight(), w, h);
}
else if (mLastTab)
{
@@ -672,6 +670,8 @@ void LLFavoritesBarCtrl::draw()
LLRect rect = mLastTab->getRect();
mImageDragIndication->draw(rect.mRight, rect.getHeight(), w, h);
}
+ // Once drawn, mark this false so we won't draw it again (unless we hit the favorite bar again)
+ mShowDragMarker = FALSE;
}
}
@@ -743,7 +743,7 @@ void LLFavoritesBarCtrl::updateButtons()
if (first_changed_item_index <= mItems.count())
{
// Rebuild the buttons only
- // child_list_t is a linked list, so safe to erase from the middle if we pre-incrament the iterator
+ // child_list_t is a linked list, so safe to erase from the middle if we pre-increment the iterator
while (child_it != childs->end())
{
@@ -832,9 +832,9 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointergetWidth(item->getName()) + 20;
int width = required_width > def_button_width? def_button_width : required_width;
@@ -862,7 +862,6 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointersetRect(butt_rect);
// change only left and save bottom
fav_btn->setFont(mFont);
- fav_btn->setName(item->getName());
fav_btn->setLabel(item->getName());
fav_btn->setToolTip(item->getName());
fav_btn->setCommitCallback(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
@@ -1320,25 +1319,24 @@ BOOL LLFavoritesBarCtrl::handleHover(S32 x, S32 y, MASK mask)
LLUICtrl* LLFavoritesBarCtrl::findChildByLocalCoords(S32 x, S32 y)
{
- LLUICtrl* ctrl = 0;
- S32 screenX, screenY;
+ LLUICtrl* ctrl = NULL;
const child_list_t* list = getChildList();
- localPointToScreen(x, y, &screenX, &screenY);
-
- // look for a child which contains the point (screenX, screenY) in it's rectangle
for (child_list_const_iter_t i = list->begin(); i != list->end(); ++i)
{
- LLRect rect;
- localRectToScreen((*i)->getRect(), &rect);
-
- if (rect.pointInRect(screenX, screenY))
+ // Look only for children that are favorite buttons
+ if ((*i)->getName() == "favorites_bar_btn")
{
- ctrl = dynamic_cast(*i);
- break;
+ LLRect rect = (*i)->getRect();
+ // We consider a button hit if the cursor is left of the right side
+ // This makes the hit a bit less finicky than hitting directly on the button itself
+ if (x <= rect.mRight)
+ {
+ ctrl = dynamic_cast(*i);
+ break;
+ }
}
}
-
return ctrl;
}
--
cgit v1.2.3
From a6f251074e94af37119a45417a4a585a8a050d19 Mon Sep 17 00:00:00 2001
From: eli
Date: Mon, 24 Oct 2011 22:13:03 -0700
Subject: FIX INTL-78 Japanese translation for Set28 FUI
---
.../newview/skins/default/xui/ja/floater_about.xml | 5 +-
.../skins/default/xui/ja/floater_about_land.xml | 6 +-
.../skins/default/xui/ja/floater_avatar.xml | 2 +
.../skins/default/xui/ja/floater_camera.xml | 2 +-
.../skins/default/xui/ja/floater_chat_bar.xml | 7 +
.../skins/default/xui/ja/floater_destinations.xml | 2 +
.../skins/default/xui/ja/floater_fast_timers.xml | 10 +
.../skins/default/xui/ja/floater_how_to.xml | 2 +
indra/newview/skins/default/xui/ja/floater_map.xml | 2 +-
.../skins/default/xui/ja/floater_model_preview.xml | 376 +++++++++++----------
.../skins/default/xui/ja/floater_model_wizard.xml | 122 ++-----
.../skins/default/xui/ja/floater_moveview.xml | 6 +-
.../skins/default/xui/ja/floater_my_appearance.xml | 4 +
.../skins/default/xui/ja/floater_my_inventory.xml | 2 +
.../default/xui/ja/floater_object_weights.xml | 28 ++
.../skins/default/xui/ja/floater_people.xml | 7 +
.../newview/skins/default/xui/ja/floater_picks.xml | 2 +
.../skins/default/xui/ja/floater_places.xml | 4 +
.../newview/skins/default/xui/ja/floater_stats.xml | 12 +-
.../newview/skins/default/xui/ja/floater_tools.xml | 11 +-
.../skins/default/xui/ja/floater_toybox.xml | 10 +
.../skins/default/xui/ja/menu_hide_navbar.xml | 2 +-
indra/newview/skins/default/xui/ja/menu_login.xml | 2 +-
.../newview/skins/default/xui/ja/menu_toolbars.xml | 6 +
indra/newview/skins/default/xui/ja/menu_viewer.xml | 25 +-
.../newview/skins/default/xui/ja/notifications.xml | 14 +-
.../skins/default/xui/ja/panel_chiclet_bar.xml | 15 +
indra/newview/skins/default/xui/ja/panel_me.xml | 5 +-
.../skins/default/xui/ja/panel_navigation_bar.xml | 35 +-
.../skins/default/xui/ja/panel_nearby_chat.xml | 4 +
.../default/xui/ja/panel_preferences_chat.xml | 2 +-
.../default/xui/ja/panel_preferences_general.xml | 4 +-
.../default/xui/ja/panel_preferences_move.xml | 31 +-
.../skins/default/xui/ja/panel_status_bar.xml | 5 +-
indra/newview/skins/default/xui/ja/strings.xml | 181 +++++++++-
35 files changed, 609 insertions(+), 344 deletions(-)
create mode 100644 indra/newview/skins/default/xui/ja/floater_avatar.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_chat_bar.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_destinations.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_fast_timers.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_how_to.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_my_appearance.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_my_inventory.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_object_weights.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_people.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_picks.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_places.xml
create mode 100644 indra/newview/skins/default/xui/ja/floater_toybox.xml
create mode 100644 indra/newview/skins/default/xui/ja/menu_toolbars.xml
create mode 100644 indra/newview/skins/default/xui/ja/panel_chiclet_bar.xml
create mode 100644 indra/newview/skins/default/xui/ja/panel_nearby_chat.xml
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/ja/floater_about.xml b/indra/newview/skins/default/xui/ja/floater_about.xml
index 47bb2455cf..c628ade43e 100644
--- a/indra/newview/skins/default/xui/ja/floater_about.xml
+++ b/indra/newview/skins/default/xui/ja/floater_about.xml
@@ -10,7 +10,7 @@
あなたの現在地は、[POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] の [REGION] です。位置は <nolink>[HOSTNAME]</nolink> です。([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [リリースノート]]
+[SERVER_RELEASE_NOTES_URL]
CPU: [CPU]
@@ -37,6 +37,9 @@ Qt Webkit バージョン: [QT_WEBKIT_VERSION]
パケットロス: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%)
+
+ サーバーのリリースノートの URL を取得中にエラーが発生しました。
+
diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml
index e870a8ace9..3c88c902f8 100644
--- a/indra/newview/skins/default/xui/ja/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml
@@ -214,19 +214,19 @@
オブジェクトボーナス: [BONUS]
- プリム使用状況:
+ リージョン(地域)の許容数:
[MAX] の内 [COUNT] ([AVAILABLE] 利用可能)
- 区画でサポートされるプリム数:
+ 区画の許容数:
[COUNT]
- 区画上のプリム数:
+ 区画の負荷:
[COUNT]
diff --git a/indra/newview/skins/default/xui/ja/floater_avatar.xml b/indra/newview/skins/default/xui/ja/floater_avatar.xml
new file mode 100644
index 0000000000..c4455282d2
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_avatar.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_camera.xml b/indra/newview/skins/default/xui/ja/floater_camera.xml
index 71a20c8e18..5d3a048975 100644
--- a/indra/newview/skins/default/xui/ja/floater_camera.xml
+++ b/indra/newview/skins/default/xui/ja/floater_camera.xml
@@ -1,5 +1,5 @@
-
+
フォーカスを中心にカメラを回転
diff --git a/indra/newview/skins/default/xui/ja/floater_chat_bar.xml b/indra/newview/skins/default/xui/ja/floater_chat_bar.xml
new file mode 100644
index 0000000000..9735afb101
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_chat_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_destinations.xml b/indra/newview/skins/default/xui/ja/floater_destinations.xml
new file mode 100644
index 0000000000..b7f6ad4d4e
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_destinations.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_fast_timers.xml b/indra/newview/skins/default/xui/ja/floater_fast_timers.xml
new file mode 100644
index 0000000000..5f538ecdb0
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_fast_timers.xml
@@ -0,0 +1,10 @@
+
+
+
+ 一時停止
+
+
+ 走る
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_how_to.xml b/indra/newview/skins/default/xui/ja/floater_how_to.xml
new file mode 100644
index 0000000000..4cebe27226
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_how_to.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_map.xml b/indra/newview/skins/default/xui/ja/floater_map.xml
index ff5a25fd7b..1122203446 100644
--- a/indra/newview/skins/default/xui/ja/floater_map.xml
+++ b/indra/newview/skins/default/xui/ja/floater_map.xml
@@ -1,5 +1,5 @@
-
+
[REGION](ダブルクリックで地図を開く。Shift‐ドラッグで水平・垂直移動)
diff --git a/indra/newview/skins/default/xui/ja/floater_model_preview.xml b/indra/newview/skins/default/xui/ja/floater_model_preview.xml
index 07667bb697..157c68a570 100644
--- a/indra/newview/skins/default/xui/ja/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/ja/floater_model_preview.xml
@@ -1,10 +1,8 @@
-
-
- 待機状態
-
+
+
- Dae に問題が見つかりました - 詳細についてはログをご参照ください。
+ エラー:Dae に問題が見つかりました - 詳細についてはログをご参照ください。
ローディング...
@@ -51,6 +49,9 @@
必要な描画詳細度が見つかりません。
+
+ LOD 付きの材料は参考モデルのサブセットではありません。
+
全て
@@ -63,188 +64,211 @@
未定
-
- 名前:
-
-
- プレビュー:
-
-
-
- 描画詳細度:高
-
-
- 描画詳細度:中
-
-
- 描画詳細度:低
-
-
- 描画詳細度:最低
-
-
-
- 警告:
-
-
- このモデルを Second Life サーバーにアップロードすることはできません。メッシュモデルのアップロード手順については [[VURL] こちらを参照してください]。
-
-
- ダウンロード:
-物理演算:
-サーバー負荷:
-
-プリム換算:
-
-
- [ST]
-[PH]
-[SIM]
-
-[EQ]
-
-
-
-
- 描画詳細度を選択:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 描画詳細度: [DETAIL]
-
-
-
-
-
-
-
-
-
- 三角形の限度数
-
-
- エラーしきい値
-
-
-
- 制作演算子:
+
+
+
+ モデル名:
-
- キューモード:
+
+ このモデルは...
-
-
- 稜の完全複合
-
-
- 稜の半複合
-
-
-
-
- グリーディ
-
-
- レイジー
-
-
- インディペンデント
-
+
+
+
+
+
+
+
+
+
-
- 境界線モード:
-
-
- 共有誤差:
-
-
-
- ロック解除
-
-
- ロック
-
-
-
- 折れ角度:
-
-
-
-
-
-
-
-
-
-
- 最低
-
-
- 低
-
-
- 中
-
-
- 高
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+ 手順1:描画詳細度
+
+
+
+ 1つを選択...
+
+
+ 高
+
+
+ 中
+
+
+ 低
+
+
+ 最低
+
+
+ ファイルから
+
+
+
+
+
+
+ 手順2:分析
+
+
+ 方法:
+
+
+ 品質:
+
+
+ 滑らかさ:
+
+
+
+
+
+
+
+ 手順3:単純化
+
+
+ 方法:
+
+
+ パス:
+
+
+ 詳細度:
+
+
+ 維持率:
+
+
+
+
+
+
+
+ 結果:
+
+
+ 三角形:[TRIANGLES],
+
+
+ 頂点:[POINTS],
+
+
+ 外殻構造:[HULLS]
+
+
-
-
-
-
-
-
-
-
-
-
- 三角形: [TRIANGLES]
+
+
+ スケール(1=増減なし):
+
+
+
+ サイズ:
-
- 頂点: [POINTS]
+
+ [X] X [Y] X [Z]
-
- 外殻構造: [HULLS]
+
+
+ アバターモデル専用:
+
+
+
+ Z オフセット(アバターを上下調整):
+
+
-
-
-
-
- [X] x [Y] x [Z] m
+
+
+
+
+
+
+
+ アップロード料金:L$ [FEE]
+
+
+ 土地の負荷:[EQ]
+
+
+ ダウンロード:[ST]
+
+
+ 物理演算:[PH]
+
+
+ サーバー負荷:[SIM]
+
+
+ ご注意:
+
+
+ メッシュモデルをアップロードする権利がありません。権利の取得方法については [[VURL]] こちらを参照してください。
+
+
+ [STATUS]
-
-
-
-
-
-
- アップロード料金:L$ [FEE]
+
+
+ プレビュー:
-
-
-
-
+
+
+
+ 高
+
+
+ 中
+
+
+ 低
+
+
+ 最低
+
+
+
+ ディスプレイ...
+
+
+
+
+
+
+
+ プレビュースプレッド:
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_model_wizard.xml b/indra/newview/skins/default/xui/ja/floater_model_wizard.xml
index 2f336fcbde..915b37557f 100644
--- a/indra/newview/skins/default/xui/ja/floater_model_wizard.xml
+++ b/indra/newview/skins/default/xui/ja/floater_model_wizard.xml
@@ -6,26 +6,20 @@
-
-
+
+
モデルファイルを選択
-
+
上級ユーザーの場合:3D コンテンツの制作ツールを使い慣れた方は、高度なアップローダーもお試しください。
-
+
アップロードするモデルファイルの選択
-
- Second Life は COLLADA (.dae) ファイルをサポートします。
-
-
- サイズ(メートル):
-
X Y Z
@@ -38,18 +32,15 @@
-
-
+
+
モデルを最適化
-
+
パフォーマンスを重視してモデルを最適化しました。必要に応じて調整してください。
-
-
- 次の描画詳細度を作成
-
+
次の描画詳細度を作成:高
@@ -64,123 +55,64 @@
-
- パフォーマンス
-
-
- レンダリング速度の向上
-詳細度の低下
-プリム換算ウェイトの軽減
-
-
- 正確さ
-
-
- レンダリング速度の低下
-詳細化
-プリム換算ウェイトの増加
-
-
- '
-
-
- '
-
-
- '
-
-
+
ジオメトリのプレビュー
-
+
高い詳細度
-
+
中の詳細度
-
+
低い詳細度
-
+
最低の詳細度
-
-
+
+
物理作用の調整
-
+
モデルの外殻構造のシェイプは弊社が作成します。モデルの目的に応じてシェイプの詳細度を調整してください。
-
-
- パフォーマンス
-
-
- レンダリング速度の向上
-詳細度の低下
-プリム換算ウェイトの軽減
-
-
- 正確
-
-
- レンダリング速度の低下
-詳細化
-プリム換算ウェイトの増加
-
-
- 例:
-動くオブジェクト
-飛行オブジェクト
-車
-
-
- 例:
-小さな静止オブジェクト
-比較的詳細度の低いオブジェクト
-シンプルな家具
-
-
- 例:
-静止オブジェクト
-詳細なオブジェクト
-建物
-
+
-
+
物理作用のプレビュー
-
+
高い詳細度
-
+
中の詳細度
-
+
低い詳細度
-
+
最低の詳細度
-
-
+
+
確認
-
+
区画/リージョンへの負荷:[EQUIV] プリム換算値
@@ -193,8 +125,8 @@
-
-
+
+
アップロード完了
diff --git a/indra/newview/skins/default/xui/ja/floater_moveview.xml b/indra/newview/skins/default/xui/ja/floater_moveview.xml
index 57ab32f486..88c1905b8a 100644
--- a/indra/newview/skins/default/xui/ja/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/ja/floater_moveview.xml
@@ -1,5 +1,5 @@
-
+
前に進む(上矢印か W を押す)
@@ -58,14 +58,14 @@
飛ぶ
-
-
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_my_appearance.xml b/indra/newview/skins/default/xui/ja/floater_my_appearance.xml
new file mode 100644
index 0000000000..c9a0ecefd7
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_my_appearance.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_my_inventory.xml b/indra/newview/skins/default/xui/ja/floater_my_inventory.xml
new file mode 100644
index 0000000000..c6a789b63b
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_my_inventory.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_object_weights.xml b/indra/newview/skins/default/xui/ja/floater_object_weights.xml
new file mode 100644
index 0000000000..3bd9b6b069
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_object_weights.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_people.xml b/indra/newview/skins/default/xui/ja/floater_people.xml
new file mode 100644
index 0000000000..08bee88103
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_people.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_picks.xml b/indra/newview/skins/default/xui/ja/floater_picks.xml
new file mode 100644
index 0000000000..359585eb86
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_picks.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_places.xml b/indra/newview/skins/default/xui/ja/floater_places.xml
new file mode 100644
index 0000000000..0d167444db
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_places.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_stats.xml b/indra/newview/skins/default/xui/ja/floater_stats.xml
index 97927776c7..6a1f34cfd8 100644
--- a/indra/newview/skins/default/xui/ja/floater_stats.xml
+++ b/indra/newview/skins/default/xui/ja/floater_stats.xml
@@ -10,8 +10,8 @@
-
-
+
+
@@ -64,6 +64,14 @@
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml
index a8b5febd54..8eddf55a44 100644
--- a/indra/newview/skins/default/xui/ja/floater_tools.xml
+++ b/indra/newview/skins/default/xui/ja/floater_tools.xml
@@ -25,10 +25,10 @@
土地をクリックし、ドラッグして選択
- [OBJ_COUNT] 個のオブジェクト([PRIM_COUNT] 個のプリム [PE_STRING])が選択されています
+ 選択されているオブジェクトは [OBJ_COUNT] 個、土地の負荷は [LAND_IMPACT]
-
- , [SEL_WEIGHT] プリム換算値
+
+ 残りの許容数 [LAND_CAPACITY]。
@@ -105,8 +105,8 @@
何も選択されていません。
-
- 物理演算ウェイト [PHYS_WEIGHT]、レンダリングコスト [DISP_WEIGHT]。
+
+ [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights 詳細]
@@ -325,7 +325,6 @@
縫い目のタイプ
-
diff --git a/indra/newview/skins/default/xui/ja/floater_toybox.xml b/indra/newview/skins/default/xui/ja/floater_toybox.xml
new file mode 100644
index 0000000000..d7056f806c
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/floater_toybox.xml
@@ -0,0 +1,10 @@
+
+
+
+ ボタンをツールバーに追加または削除するにはボタンをドラッグします。
+
+
+ 各ツールバーの設定に応じて、ボタンは以下のように表示されたり、アイコンのみで表示されます。
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/menu_hide_navbar.xml b/indra/newview/skins/default/xui/ja/menu_hide_navbar.xml
index 3a1ae49700..2e633ae1b2 100644
--- a/indra/newview/skins/default/xui/ja/menu_hide_navbar.xml
+++ b/indra/newview/skins/default/xui/ja/menu_hide_navbar.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/indra/newview/skins/default/xui/ja/menu_login.xml b/indra/newview/skins/default/xui/ja/menu_login.xml
index dca872e9b8..4c88f17f3d 100644
--- a/indra/newview/skins/default/xui/ja/menu_login.xml
+++ b/indra/newview/skins/default/xui/ja/menu_login.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/indra/newview/skins/default/xui/ja/menu_toolbars.xml b/indra/newview/skins/default/xui/ja/menu_toolbars.xml
new file mode 100644
index 0000000000..e911ca4a13
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/menu_toolbars.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml
index edce5c50fc..b9dbb81c0a 100644
--- a/indra/newview/skins/default/xui/ja/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml
@@ -1,29 +1,30 @@
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
@@ -145,7 +146,6 @@
-
@@ -161,7 +161,7 @@
-
+
@@ -289,6 +289,7 @@
+
diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml
index c138aeb383..85f09b4500 100644
--- a/indra/newview/skins/default/xui/ja/notifications.xml
+++ b/indra/newview/skins/default/xui/ja/notifications.xml
@@ -1953,6 +1953,12 @@ Adult 専用リージョンに入るには、住人のアカウントが年齢
終了しようとしています。続けますか?
+
+ デフォルトのボタンとツールバーを復元しますか?
+
+この操作は元に戻せません。
+
+
[QUESTION]
@@ -3041,10 +3047,6 @@ M キーを押して変更します。
-
- モードを変更するには終了して再起動する必要があります。
-
-
クラシファイド広告の作成と編集はアドバンスモードでのみ利用できます。終了してモードを変更しますか?モードはログイン画面で選択できます。
@@ -3089,6 +3091,10 @@ M キーを押して変更します。
検索はアドバンスモードでのみ利用できます。ログアウトしてモードを変更しますか?
+
+ この操作により、全てのメニュー項目とボタンが非表示になります。再び表示するには [SHORTCUT] をもう一度クリックしてください。
+
+
[APP_NAME] に必要なハードウェアがないようです。 [APP_NAME] にはマルチテクスチャをサポートする OpenGL グラフィックカードが必要です。 お使いのグラフィックカードの最新ドライバがインストールされているかどうか、オペレーティングシステムのサービスパックとパッチが入っているかをご確認ください。
diff --git a/indra/newview/skins/default/xui/ja/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/ja/panel_chiclet_bar.xml
new file mode 100644
index 0000000000..6717ba9ba3
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/panel_chiclet_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/panel_me.xml b/indra/newview/skins/default/xui/ja/panel_me.xml
index dda5bc0009..896bbff0ee 100644
--- a/indra/newview/skins/default/xui/ja/panel_me.xml
+++ b/indra/newview/skins/default/xui/ja/panel_me.xml
@@ -1,7 +1,4 @@
-
-
-
-
+
diff --git a/indra/newview/skins/default/xui/ja/panel_navigation_bar.xml b/indra/newview/skins/default/xui/ja/panel_navigation_bar.xml
index 0426c4fe9a..51402b2e00 100644
--- a/indra/newview/skins/default/xui/ja/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/ja/panel_navigation_bar.xml
@@ -1,18 +1,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 詳細 ▼
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/panel_nearby_chat.xml b/indra/newview/skins/default/xui/ja/panel_nearby_chat.xml
new file mode 100644
index 0000000000..4334659557
--- /dev/null
+++ b/indra/newview/skins/default/xui/ja/panel_nearby_chat.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml b/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml
index 20e17de5f1..c8584ccaae 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml
@@ -51,7 +51,7 @@
-
+
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
index 4356f3d47f..51db95735b 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
@@ -13,7 +13,10 @@
+
+
+
(再起動後に反映)
@@ -48,7 +51,6 @@
-
文字キーを押して次の操作:
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_move.xml b/indra/newview/skins/default/xui/ja/panel_preferences_move.xml
index 806bcfc14a..121bebfd52 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_move.xml
@@ -7,18 +7,33 @@
-
+
+ キーボード:
+
+
+
+
+ マウス:
+
一人称視点のマウスの感度:
-
-
-
-
-
-
-
+
+ 土地をシングルクリック:
+
+
+
+
+
+
+ 土地をダブルクリック:
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/panel_status_bar.xml b/indra/newview/skins/default/xui/ja/panel_status_bar.xml
index 35c1148cc1..93689b81af 100644
--- a/indra/newview/skins/default/xui/ja/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/ja/panel_status_bar.xml
@@ -18,11 +18,8 @@
+
-
-
-
-
24:00 AM PST
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index 41dc098ba2..f611b96502 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -77,10 +77,10 @@
キャッシュファイルを検証しています(所要時間は 60 ~ 90 秒)...
- 応答を処理しています...
+ 対応を処理中です...
- ワールドを初期化しています...
+ ワールドを初期化中です...
画像をデコードしています...
@@ -128,7 +128,7 @@
グリッドサーバーが返した証明書の署名を認証できませんでした。グリッドの管理者にお問い合わせください。
- ネットワークエラー: 接続を確立できませんでした。お使いのネットワーク接続をご確認ください。
+ ネットワークエラー:接続を確立できませんでした。お使いのネットワーク接続をご確認ください。
ログインに失敗しました。
@@ -1276,6 +1276,9 @@ support@secondlife.com にお問い合わせください。
エラー:この商品に関して問題が発生しました。しばらくしてからお試しください。
+
+ ランドマークを開く
+
@@ -4254,8 +4257,8 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ
女性 - Wow
-
- /bow1
+
+ /おじぎする
/拍手
@@ -4767,4 +4770,172 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ
パーティクルを非表示
+
+ 土地情報
+
+
+ 容姿
+
+
+ アバター
+
+
+ 制作
+
+
+ チャット
+
+
+ コンパス
+
+
+ 行き先
+
+
+ ジェスチャー
+
+
+ ハウツー
+
+
+ 持ち物
+
+
+ 地図
+
+
+ マーケットプレイス
+
+
+ ミニマップ
+
+
+ 移動
+
+
+ 人
+
+
+ ピック
+
+
+ 場所
+
+
+ 環境設定
+
+
+ プロフィール
+
+
+ 検索
+
+
+ スナップショット
+
+
+ 話す
+
+
+ 視界
+
+
+ 近くのボイス
+
+
+ 訪問先に関する情報
+
+
+ アバターを変更
+
+
+ アバター一式を選択
+
+
+ オブジェクトの制作と地形の変形
+
+
+ 近くの人と文字チャットする
+
+
+ コンパス
+
+
+ 行ってみたい場所
+
+
+ アバターのジェスチャー
+
+
+ 一般的タスクの実行方法
+
+
+ 持ち物を表示・使用
+
+
+ 世界地図
+
+
+ ショッピングに出掛ける
+
+
+ 近くの人を表示する
+
+
+ アバターの移動
+
+
+ フレンド、グループ、近くの人
+
+
+ プロフィールで紹介するお気に入りの場所
+
+
+ 保存済みの場所
+
+
+ 環境設定
+
+
+ プロフィールを編集・表示
+
+
+ 場所、イベント、人を検索
+
+
+ ピクチャを撮る
+
+
+ マイクを使って近くの人と話す
+
+
+ カメラの角度を変更
+
+
+ ボイスチャット機能を持つ近くの人
+
+
+ 維持率
+
+
+ 詳細
+
+
+ もっと詳しく
+
+
+ 表面
+
+
+ ソリッド
+
+
+ ラップ
+
+
+ プレビュー
+
+
+ 普通
+
--
cgit v1.2.3
From 69accb7dffed4b7cfdaa53e921ee198da0a95f16 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Tue, 25 Oct 2011 15:37:12 +0200
Subject: STORM-1577 WIP Changed wording.
---
indra/newview/skins/default/xui/en/floater_translation_settings.xml | 6 +++---
indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
index e36348e396..1eb75e40f3 100644
--- a/indra/newview/skins/default/xui/en/floater_translation_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -6,7 +6,7 @@
name="floater_translation_settings"
help_topic="environment_editor_floater"
save_rect="true"
- title="TRANSLATION SETTINGS"
+ title="CHAT TRANSLATION SETTINGS"
width="480">
Bing appID not verified. Please try again.
@@ -17,7 +17,7 @@
- Choose translation service to use:
+ Choose translation service:
+ width="170">
--
cgit v1.2.3
From 56b2e4ac7c7cc4f27f08b4024ecbeace4c3a3e51 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Tue, 25 Oct 2011 16:36:27 +0200
Subject: STORM-1577 WIP Indented floater contents.
---
.../default/xui/en/floater_translation_settings.xml | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
index 1eb75e40f3..40fdaaed66 100644
--- a/indra/newview/skins/default/xui/en/floater_translation_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -7,7 +7,7 @@
help_topic="environment_editor_floater"
save_rect="true"
title="CHAT TRANSLATION SETTINGS"
- width="480">
+ width="485">
Bing appID not verified. Please try again.
Google API key not verified. Please try again.
@@ -27,7 +27,7 @@
height="20"
follows="left|top"
layout="topleft"
- left="10"
+ left="40"
name="translate_language_label"
top_pad="20"
width="130">
@@ -118,7 +118,7 @@
follows="top|left|right"
height="15"
layout="topleft"
- left="10"
+ left="40"
name="tip"
top_pad="20"
width="330"
@@ -153,10 +153,10 @@
follows="top|right"
height="20"
layout="topleft"
- left="40"
+ left="70"
name="bing_api_key_label"
top_pad="-55"
- width="100">
+ width="85">
Bing [http://www.bing.com/developers/createapp.aspx AppID]:
+ width="210" />
+ width="85">
Google [http://code.google.com/apis/language/translate/v2/getting_started.html#auth API key]:
+ width="210" />
Date: Tue, 25 Oct 2011 17:14:58 +0200
Subject: STORM-1577 WIP Don't reset the hint on click in a key input field if
the field is disabled.
---
indra/newview/llfloatertranslationsettings.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp
index ac4514b438..959edff713 100644
--- a/indra/newview/llfloatertranslationsettings.cpp
+++ b/indra/newview/llfloatertranslationsettings.cpp
@@ -241,7 +241,7 @@ void LLFloaterTranslationSettings::verifyKey(int service, const std::string& key
void LLFloaterTranslationSettings::onEditorFocused(LLFocusableElement* control)
{
LLLineEditor* editor = dynamic_cast(control);
- if (editor)
+ if (editor && editor->hasTabStop()) // if enabled. getEnabled() doesn't work
{
if (editor->getTentative())
{
--
cgit v1.2.3
From 8b78d115c1e7cbe32f336d6d4250d28c8135ade5 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 25 Oct 2011 11:23:45 -0500
Subject: SH-2618 Fix for local lights option being off by one click
---
indra/newview/pipeline.cpp | 1 +
1 file changed, 1 insertion(+)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 04edc90be9..76ad7fd83e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1196,6 +1196,7 @@ S32 LLPipeline::getMaxLightingDetail() const
S32 LLPipeline::setLightingDetail(S32 level)
{
LLMemType mt_ld(LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL);
+ refreshCachedSettings();
if (level < 0)
{
--
cgit v1.2.3
From abe0c729a11f332fee42af7c1ecd7a52766cafc7 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Tue, 25 Oct 2011 19:01:40 +0200
Subject: STORM-1666 FIXED Correctly render server release notes URL in
non-English locales.
---
indra/newview/skins/default/xui/da/floater_about.xml | 2 +-
indra/newview/skins/default/xui/es/floater_about.xml | 2 +-
indra/newview/skins/default/xui/ja/floater_about.xml | 2 +-
indra/newview/skins/default/xui/pl/floater_about.xml | 2 +-
indra/newview/skins/default/xui/ru/floater_about.xml | 2 +-
indra/newview/skins/default/xui/tr/floater_about.xml | 2 +-
indra/newview/skins/default/xui/zh/floater_about.xml | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml
index 0ccaab73ba..fc8bc33096 100644
--- a/indra/newview/skins/default/xui/da/floater_about.xml
+++ b/indra/newview/skins/default/xui/da/floater_about.xml
@@ -10,7 +10,7 @@
Du er ved [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] i regionen [REGION] lokaliseret ved <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
CPU: [CPU]
diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml
index 93bb8444b4..e5006f7078 100644
--- a/indra/newview/skins/default/xui/es/floater_about.xml
+++ b/indra/newview/skins/default/xui/es/floater_about.xml
@@ -10,7 +10,7 @@
Estás en la posición [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1], de [REGION], alojada en <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
CPU: [CPU]
diff --git a/indra/newview/skins/default/xui/ja/floater_about.xml b/indra/newview/skins/default/xui/ja/floater_about.xml
index 47bb2455cf..752021a5e0 100644
--- a/indra/newview/skins/default/xui/ja/floater_about.xml
+++ b/indra/newview/skins/default/xui/ja/floater_about.xml
@@ -10,7 +10,7 @@
あなたの現在地は、[POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] の [REGION] です。位置は <nolink>[HOSTNAME]</nolink> です。([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [リリースノート]]
+[SERVER_RELEASE_NOTES_URL]
CPU: [CPU]
diff --git a/indra/newview/skins/default/xui/pl/floater_about.xml b/indra/newview/skins/default/xui/pl/floater_about.xml
index 637325ddd0..409429ffaa 100644
--- a/indra/newview/skins/default/xui/pl/floater_about.xml
+++ b/indra/newview/skins/default/xui/pl/floater_about.xml
@@ -10,7 +10,7 @@
Położenie [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] w [REGION] zlokalizowanym w <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
Procesor: [CPU]
diff --git a/indra/newview/skins/default/xui/ru/floater_about.xml b/indra/newview/skins/default/xui/ru/floater_about.xml
index 6bc550c3fe..81267ca6a9 100644
--- a/indra/newview/skins/default/xui/ru/floater_about.xml
+++ b/indra/newview/skins/default/xui/ru/floater_about.xml
@@ -10,7 +10,7 @@
Вы в точке [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] в регионе «[REGION]», расположенном на <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
ЦП: [CPU]
diff --git a/indra/newview/skins/default/xui/tr/floater_about.xml b/indra/newview/skins/default/xui/tr/floater_about.xml
index 2fdbafdfb4..715fa4f710 100644
--- a/indra/newview/skins/default/xui/tr/floater_about.xml
+++ b/indra/newview/skins/default/xui/tr/floater_about.xml
@@ -10,7 +10,7 @@
<nolink>[HOSTNAME]</nolink> ([HOSTIP]) üzerinde bulunan [REGION] içerisinde [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] konumundasınız
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [Sürüm Notları]]
+[SERVER_RELEASE_NOTES_URL]
CPU: [CPU]
diff --git a/indra/newview/skins/default/xui/zh/floater_about.xml b/indra/newview/skins/default/xui/zh/floater_about.xml
index 0ac85d399e..7e19c124a1 100644
--- a/indra/newview/skins/default/xui/zh/floater_about.xml
+++ b/indra/newview/skins/default/xui/zh/floater_about.xml
@@ -10,7 +10,7 @@
You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
CPU:[CPU]
--
cgit v1.2.3
From 58cd554af7bf2e498a8bf64252bd0e40e305ce91 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Tue, 25 Oct 2011 19:25:31 +0200
Subject: STORM-1667 FIXED Fixed rendering of viewer release notes URL.
Adding back code that was accidentally removed in changeset ff333a95d1aa.
---
indra/newview/llfloaterabout.cpp | 3 +++
1 file changed, 3 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 22f500ba15..83fb887d81 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -384,6 +384,9 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url)
// Render the LLSD from getInfo() as a format_map_t
LLStringUtil::format_map_t args;
+ // allow the "Release Notes" URL label to be localized
+ args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes");
+
for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap());
ii != iend; ++ii)
{
--
cgit v1.2.3
From c54f6cfdc3f44ccb6fee3acd5fa40bd177c67639 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 25 Oct 2011 12:28:12 -0500
Subject: SH-2622 Make Intel prefer fixed function over shaders where possible.
---
indra/newview/llviewershadermgr.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index e50625af60..619a9078be 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -363,8 +363,8 @@ void LLViewerShaderMgr::setShaders()
reentrance = true;
- if (LLRender::sGLCoreProfile || gGLManager.mGLVersion >= 2.f)
- { //ALWAYS use shaders where available
+ if (LLRender::sGLCoreProfile || (gGLManager.mGLVersion >= 2.f && !gGLManager.mIsIntel))
+ { //ALWAYS use shaders where available (except for intel, intel prefers fixed function)
if (!gSavedSettings.getBOOL("VertexShaderEnable"))
{ //vertex shaders MUST be enabled to use core profile
gSavedSettings.setBOOL("VertexShaderEnable", TRUE);
--
cgit v1.2.3
From 3704b85215f9251b43b53914736006e728088119 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Tue, 25 Oct 2011 19:35:53 +0200
Subject: STORM-1668 FIXED Fixed references to nonexistent gesture /bow1 in
translations.
---
indra/newview/skins/default/xui/es/strings.xml | 4 ++--
indra/newview/skins/default/xui/ja/strings.xml | 4 ++--
indra/newview/skins/default/xui/ru/strings.xml | 4 ++--
indra/newview/skins/default/xui/tr/strings.xml | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index cc044ba416..6094e6fc1a 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -4158,8 +4158,8 @@ Denuncia de infracción
Mujer - Admiración
-
- /reverencia1
+
+ /reverencia
/aplaudir
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index 41dc098ba2..07f2e29274 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -4254,8 +4254,8 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ
女性 - Wow
-
- /bow1
+
+ /bow
/拍手
diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml
index 44440ea542..909c3c0965 100644
--- a/indra/newview/skins/default/xui/ru/strings.xml
+++ b/indra/newview/skins/default/xui/ru/strings.xml
@@ -4248,8 +4248,8 @@ support@secondlife.com.
Женщина – ух ты!
-
- /поклон1
+
+ /поклон
/хлопнуть
diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml
index 543989804a..921b6389fa 100644
--- a/indra/newview/skins/default/xui/tr/strings.xml
+++ b/indra/newview/skins/default/xui/tr/strings.xml
@@ -4251,8 +4251,8 @@ Kötüye Kullanımı Bildirme
Kadın - Vay be
-
- /selamlama1
+
+ /selamlama
/alkış
--
cgit v1.2.3
From 35b8f7b15ccd1f7a9efd7f5e71b2481ff5245693 Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Tue, 25 Oct 2011 12:44:04 -0700
Subject: EXP-1452 FIX minimum height of NEARBY CHAT window can be circumvented
by minimizing it.
---
indra/newview/llnearbychatbar.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index a811332261..e7f3daa1a3 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -147,12 +147,12 @@ LLNearbyChatBar* LLNearbyChatBar::getInstance()
void LLNearbyChatBar::showHistory()
{
+ openFloater();
+
if (!getChildView("nearby_chat")->getVisible())
{
onToggleNearbyChatPanel();
}
-
- openFloater();
}
void LLNearbyChatBar::draw()
@@ -379,7 +379,10 @@ void LLNearbyChatBar::onToggleNearbyChatPanel()
if (nearby_chat->getVisible())
{
- mExpandedHeight = getRect().getHeight();
+ if (!isMinimized())
+ {
+ mExpandedHeight = getRect().getHeight();
+ }
setResizeLimits(getMinWidth(), COLLAPSED_HEIGHT);
nearby_chat->setVisible(FALSE);
reshape(getRect().getWidth(), COLLAPSED_HEIGHT);
--
cgit v1.2.3
From d0695ee11e3a4843b6022c0b0c9b781ade4b51da Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Tue, 25 Oct 2011 12:48:40 -0700
Subject: EXP-1465 FIX Crash in IM panel destructor
---
indra/newview/llimfloatercontainer.cpp | 3 ++-
indra/newview/llimfloatercontainer.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 33cb3a54a7..c8e48b0d42 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -47,12 +47,13 @@ LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
LLIMFloaterContainer::~LLIMFloaterContainer()
{
+ mNewMessageConnection.disconnect();
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
}
BOOL LLIMFloaterContainer::postBuild()
{
- LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1));
+ mNewMessageConnection = LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1));
// Do not call base postBuild to not connect to mCloseSignal to not close all floaters via Close button
// mTabContainer will be initialized in LLMultiFloater::addChild()
return TRUE;
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index 53dfcd78ff..892ecef48d 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -62,7 +62,7 @@ public:
private:
typedef std::map avatarID_panel_map_t;
avatarID_panel_map_t mSessions;
-
+ boost::signals2::connection mNewMessageConnection;
void onNewMessageReceived(const LLSD& data);
};
--
cgit v1.2.3
From 8e4c3dc14f3c5e8220f7b88bceaa5d1ccbb0a2f0 Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Tue, 25 Oct 2011 12:59:59 -0700
Subject: EXP-1466 FIX Viewer reloads default settings.xml file during launch
(under some conditions) made sessionsettings pref not persistent
---
indra/newview/app_settings/settings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 75bd396449..94b8fe22a7 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13350,7 +13350,7 @@
Comment
Settings that are a applied per session (not saved).
Persist
- 1
+ 0
Type
String
Value
@@ -13361,7 +13361,7 @@
Comment
User settings that are a applied per session (not saved).
Persist
- 1
+ 0
Type
String
Value
--
cgit v1.2.3
From 7dafa1be79f4e3f454ce022326cb09fa5cabb003 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 25 Oct 2011 15:07:57 -0500
Subject: SH-2622 Put back "Basic Shaders" toggle ability.
---
indra/newview/llfloaterpreference.cpp | 25 +++++++++++++++++-----
indra/newview/llviewershadermgr.cpp | 4 ++--
.../default/xui/en/panel_preferences_graphics1.xml | 14 ++++++++++++
3 files changed, 36 insertions(+), 7 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 92c4214fdb..5fdeb46daa 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1034,19 +1034,30 @@ void LLFloaterPreference::refreshEnabledState()
}
// Vertex Shaders
+ // Global Shader Enable
+ LLCheckBoxCtrl* ctrl_shader_enable = getChild("BasicShaders");
// radio set for terrain detail mode
LLRadioGroup* mRadioTerrainDetail = getChild("TerrainDetailRadio"); // can be linked with control var
- BOOL shaders = gGLManager.mGLVersion >= 2.f;
-
- mRadioTerrainDetail->setEnabled(TRUE);
-
+ ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
+
+ BOOL shaders = ctrl_shader_enable->get();
+ if (shaders)
+ {
+ mRadioTerrainDetail->setValue(1);
+ mRadioTerrainDetail->setEnabled(FALSE);
+ }
+ else
+ {
+ mRadioTerrainDetail->setEnabled(TRUE);
+ }
+
// WindLight
LLCheckBoxCtrl* ctrl_wind_light = getChild("WindLightUseAtmosShaders");
// *HACK just checks to see if we can use shaders...
// maybe some cards that use shaders, but don't support windlight
- ctrl_wind_light->setEnabled(shaders);
+ ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild("UseLightShaders");
@@ -1084,6 +1095,7 @@ void LLFloaterPreference::disableUnavailableSettings()
LLComboBox* ctrl_reflections = getChild("Reflections");
LLCheckBoxCtrl* ctrl_avatar_vp = getChild("AvatarVertexProgram");
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild("AvatarCloth");
+ LLCheckBoxCtrl* ctrl_shader_enable = getChild("BasicShaders");
LLCheckBoxCtrl* ctrl_wind_light = getChild("WindLightUseAtmosShaders");
LLCheckBoxCtrl* ctrl_avatar_impostors = getChild("AvatarImpostors");
LLCheckBoxCtrl* ctrl_deferred = getChild("UseLightShaders");
@@ -1094,6 +1106,9 @@ void LLFloaterPreference::disableUnavailableSettings()
// if vertex shaders off, disable all shader related products
if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
{
+ ctrl_shader_enable->setEnabled(FALSE);
+ ctrl_shader_enable->setValue(FALSE);
+
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 619a9078be..637cba6d6c 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -363,8 +363,8 @@ void LLViewerShaderMgr::setShaders()
reentrance = true;
- if (LLRender::sGLCoreProfile || (gGLManager.mGLVersion >= 2.f && !gGLManager.mIsIntel))
- { //ALWAYS use shaders where available (except for intel, intel prefers fixed function)
+ if (LLRender::sGLCoreProfile)
+ {
if (!gSavedSettings.getBOOL("VertexShaderEnable"))
{ //vertex shaders MUST be enabled to use core profile
gSavedSettings.setBOOL("VertexShaderEnable", TRUE);
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index c25c1f23f5..f7666bdc4c 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -204,6 +204,20 @@
name="LocalLights"
top_pad="1"
width="256" />
+
+
+
Date: Tue, 25 Oct 2011 14:14:46 -0700
Subject: EXP-1398 FIX -- Viewer Crash when moving Speak button from bottom
toolbar to side toolbar with call request dialog active on Mac
* Added "on button removed" callback for toolbars.
* Changed docking on incoming and outgoing call floaters to be undocked when "speak" button removed.
Reviewed by Leyla.
---
indra/newview/llimview.cpp | 52 +++++++++++++++----------
indra/newview/llimview.h | 6 ++-
indra/newview/lltoolbarview.cpp | 84 ++++++++++++++++++++++++++++++++++++++---
indra/newview/lltoolbarview.h | 1 +
4 files changed, 115 insertions(+), 28 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index c751394455..ed4bb727cd 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1679,16 +1679,44 @@ BOOL LLCallDialog::postBuild()
{
if (!LLDockableFloater::postBuild() || !gToolBarView)
return FALSE;
+
+ dockToToolbarButton("speak");
+
+ return TRUE;
+}
- LLView *anchor_panel = gToolBarView->findChildView("speak");
- LLDockControl::DocAt dock_pos = getDockControlPos();
- setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(dock_pos), dock_pos));
+void LLCallDialog::dockToToolbarButton(const std::string& toolbarButtonName)
+{
+ LLDockControl::DocAt dock_pos = getDockControlPos(toolbarButtonName);
+ LLView *anchor_panel = gToolBarView->findChildView(toolbarButtonName);
setUseTongue(anchor_panel);
- return TRUE;
+ setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(dock_pos), dock_pos));
}
+LLDockControl::DocAt LLCallDialog::getDockControlPos(const std::string& toolbarButtonName)
+{
+ LLCommandId command_id(toolbarButtonName);
+ S32 toolbar_loc = gToolBarView->hasCommand(command_id);
+
+ LLDockControl::DocAt doc_at = LLDockControl::TOP;
+
+ switch (toolbar_loc)
+ {
+ case LLToolBarView::TOOLBAR_LEFT:
+ doc_at = LLDockControl::RIGHT;
+ break;
+
+ case LLToolBarView::TOOLBAR_RIGHT:
+ doc_at = LLDockControl::LEFT;
+ break;
+ }
+
+ return doc_at;
+}
+
+
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLOutgoingCallDialog
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1752,22 +1780,6 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id)
}
}
-LLDockControl::DocAt LLCallDialog::getDockControlPos()
-{
- LLToolBar* tool_bar = NULL;
-
- if((tool_bar = gToolBarView->getChild("toolbar_left")) && tool_bar->hasChild("speak", true))
- {
- return LLDockControl::RIGHT; // Speak button in the left toolbar so the call floater should be to the right of the speak button
- }
- else if((tool_bar = gToolBarView->getChild("toolbar_right")) && tool_bar->hasChild("speak", true))
- {
- return LLDockControl::LEFT; // Speak button in the right toolbar so the call floater should be to the left of the speak button
- }
-
- return LLDockControl::TOP;
-}
-
bool LLCallDialog::lifetimeHasExpired()
{
if (mLifetimeTimer.getStarted())
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 33c7ae9e54..b1be26a169 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -495,10 +495,12 @@ public:
virtual BOOL postBuild();
+ void dockToToolbarButton(const std::string& toolbarButtonName);
+
// check timer state
/*virtual*/ void draw();
/*virtual*/ void onOpen(const LLSD& key);
-
+
protected:
// lifetime timer for a notification
LLTimer mLifetimeTimer;
@@ -521,7 +523,7 @@ protected:
LLSD mPayload;
private:
- LLDockControl::DocAt getDockControlPos();
+ LLDockControl::DocAt getDockControlPos(const std::string& toolbarButtonName);
};
class LLIncomingCallDialog : public LLCallDialog
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 8f4f7d405f..ed1dfbb8cd 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -30,13 +30,16 @@
#include "lltoolbarview.h"
#include "llappviewer.h"
+#include "llbutton.h"
+#include "llclipboard.h"
#include "lldir.h"
-#include "llxmlnode.h"
+#include "lldockablefloater.h"
+#include "lldockcontrol.h"
+#include "llimview.h"
+#include "lltransientfloatermgr.h"
#include "lltoolbar.h"
-#include "llbutton.h"
#include "lltooldraganddrop.h"
-#include "lltransientfloatermgr.h"
-#include "llclipboard.h"
+#include "llxmlnode.h"
#include "llagent.h" // HACK for destinations guide on startup
#include "llfloaterreg.h" // HACK for destinations guide on startup
@@ -102,6 +105,7 @@ BOOL LLToolBarView::postBuild()
mToolbars[i]->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbars[i]->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
mToolbars[i]->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded,_1));
+ mToolbars[i]->setButtonRemoveCallback(boost::bind(LLToolBarView::onToolBarButtonRemoved,_1));
}
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup));
@@ -391,13 +395,44 @@ void LLToolBarView::addToToolset(command_id_list_t& command_list, Toolbar& toolb
void LLToolBarView::onToolBarButtonAdded(LLView* button)
{
- if (button && button->getName() == "speak")
+ llassert(button);
+
+ if (button->getName() == "speak")
{
// Add the "Speak" button as a control view in LLTransientFloaterMgr
// to prevent hiding the transient IM floater upon pressing "Speak".
LLTransientFloaterMgr::getInstance()->addControlView(button);
+
+ // Redock incoming and/or outgoing call windows, if applicable
+
+ LLFloater* incoming_floater = LLFloaterReg::getLastFloaterInGroup("incoming_call");
+ LLFloater* outgoing_floater = LLFloaterReg::getLastFloaterInGroup("outgoing_call");
+
+ if (incoming_floater && incoming_floater->isShown())
+ {
+ LLCallDialog* incoming = dynamic_cast(incoming_floater);
+ llassert(incoming);
+
+ LLDockControl* dock_control = incoming->getDockControl();
+ if (dock_control->getDock() == NULL)
+ {
+ incoming->dockToToolbarButton("speak");
+ }
+ }
+
+ if (outgoing_floater && outgoing_floater->isShown())
+ {
+ LLCallDialog* outgoing = dynamic_cast(outgoing_floater);
+ llassert(outgoing);
+
+ LLDockControl* dock_control = outgoing->getDockControl();
+ if (dock_control->getDock() == NULL)
+ {
+ outgoing->dockToToolbarButton("speak");
+ }
+ }
}
- else if (button && button->getName() == "voice")
+ else if (button->getName() == "voice")
{
// Add the "Voice controls" button as a control view in LLTransientFloaterMgr
// to prevent hiding the transient IM floater upon pressing "Voice controls".
@@ -405,6 +440,43 @@ void LLToolBarView::onToolBarButtonAdded(LLView* button)
}
}
+void LLToolBarView::onToolBarButtonRemoved(LLView* button)
+{
+ llassert(button);
+
+ if (button->getName() == "speak")
+ {
+ LLTransientFloaterMgr::getInstance()->removeControlView(button);
+
+ // Undock incoming and/or outgoing call windows
+
+ LLFloater* incoming_floater = LLFloaterReg::getLastFloaterInGroup("incoming_call");
+ LLFloater* outgoing_floater = LLFloaterReg::getLastFloaterInGroup("outgoing_call");
+
+ if (incoming_floater && incoming_floater->isShown())
+ {
+ LLDockableFloater* incoming = dynamic_cast(incoming_floater);
+ llassert(incoming);
+
+ LLDockControl* dock_control = incoming->getDockControl();
+ dock_control->setDock(NULL);
+ }
+
+ if (outgoing_floater && outgoing_floater->isShown())
+ {
+ LLDockableFloater* outgoing = dynamic_cast(outgoing_floater);
+ llassert(outgoing);
+
+ LLDockControl* dock_control = outgoing->getDockControl();
+ dock_control->setDock(NULL);
+ }
+ }
+ else if (button->getName() == "voice")
+ {
+ LLTransientFloaterMgr::getInstance()->removeControlView(button);
+ }
+}
+
void LLToolBarView::draw()
{
LLRect toolbar_rects[TOOLBAR_COUNT];
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 3dc8954abe..4307d10258 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -117,6 +117,7 @@ private:
void addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const;
static void onToolBarButtonAdded(LLView* button);
+ static void onToolBarButtonRemoved(LLView* button);
// Pointers to the toolbars handled by the toolbar view
LLToolBar* mToolbars[TOOLBAR_COUNT];
--
cgit v1.2.3
From 67c77496248c13a9770df6823e49d6fba522df7e Mon Sep 17 00:00:00 2001
From: Xiaohong Bao
Date: Tue, 25 Oct 2011 17:48:37 -0600
Subject: debug code for SH-2623: crash at
LLViewerTextureList::removeImageFromList()
---
indra/newview/llviewertexturelist.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 92d2762ef3..01eb384872 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -530,9 +530,11 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
}
llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl;
}
- if(mImageList.erase(image) != 1)
+
+ S32 count = mImageList.erase(image) ;
+ if(count != 1)
{
- llerrs << "Error happens when remove image from mImageList!" << llendl ;
+ llerrs << "Error happens when remove image from mImageList: " << count << llendl ;
}
image->setInImageList(FALSE) ;
--
cgit v1.2.3
From 42c166e451d362609d83fb17261f9e8f344e974d Mon Sep 17 00:00:00 2001
From: "niel@nirvana-win7hp.planescape.home"
Date: Wed, 26 Oct 2011 01:38:29 +0100
Subject: STORM-959 Adding syntax highlighting for /* */ style comments
---
indra/newview/app_settings/keywords.ini | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index 9fa4046fdf..810a10feec 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -603,9 +603,11 @@ return Leave current function or event handler
# Comment
[one_sided_delimiter .8, .3, .15]
// Comment:Non-functional commentary or disabled code
+[two_sided_delimiter .8, .3, .15]
+/* */ Comment:Non-functional commentary or disabled code
# String literals
-[two_sided_delimiter 0, .2, 0]
+[double_quotation_marks 0, .2, 0]
" String literal
#functions are supplied by the program now.
--
cgit v1.2.3
From 343562889e2b9332942f1c190e0dd6b7ddcb9540 Mon Sep 17 00:00:00 2001
From: callum
Date: Tue, 25 Oct 2011 19:34:05 -0700
Subject: EXP-1471 WIP Add support for zooming web pages by a scale facxtor
---
indra/newview/llmediactrl.cpp | 14 +++++++++++++-
indra/newview/llviewermedia.cpp | 10 ++++++++++
indra/newview/llviewermedia.h | 1 +
3 files changed, 24 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 0bdeb114f5..dd12546bc6 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -113,7 +113,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
}
setIgnoreUIScale(p.ignore_ui_scale);
-
+
setHomePageUrl(p.start_url, p.initial_mime_type);
setBorderVisible(p.border_visible);
@@ -779,6 +779,18 @@ void LLMediaCtrl::draw()
floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]),
LLFontGL::sCurOrigin.mZ);
}
+ else
+ {
+ // zoom is an expensive operation - only do it if value changes
+ // TODO: move this logic out to mMediaSource->setPageZoomFactor() ??
+ static double prev_ui_scale = 0.0f;
+ double ui_scale = LLUI::sGLScaleFactor.mV[ VX ];
+ if ( ui_scale != prev_ui_scale )
+ {
+ mMediaSource->setPageZoomFactor( ui_scale );
+ prev_ui_scale = ui_scale;
+ }
+ }
// scale texture to fit the space using texture coords
gGL.getTexUnit(0)->bind(media_texture);
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 13dbc5e386..fdb281b7f1 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -2301,6 +2301,16 @@ void LLViewerMediaImpl::clearCache()
}
}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+void LLViewerMediaImpl::setPageZoomFactor( double factor )
+{
+ if(mMediaSource)
+ {
+ mMediaSource->set_page_zoom_factor( factor );
+ }
+}
+
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button)
{
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 0b69b8f0c1..a475d03542 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -250,6 +250,7 @@ public:
std::string getMediaEntryURL() { return mMediaEntryURL; }
void setHomeURL(const std::string& home_url, const std::string& mime_type = LLStringUtil::null) { mHomeURL = home_url; mHomeMimeType = mime_type;};
void clearCache();
+ void setPageZoomFactor( double factor );
std::string getMimeType() { return mMimeType; }
void scaleMouse(S32 *mouse_x, S32 *mouse_y);
void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y);
--
cgit v1.2.3
From 0637fe27bc9f07208a1703349a304b27fc08a535 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao
Date: Tue, 25 Oct 2011 22:53:40 -0600
Subject: fix for SH-2624: crash at LLPrivateMemoryPoolManager::freeMem: ASSERT
(!addr)
---
indra/newview/llappviewer.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 152ee34bbc..97a7afb354 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2003,6 +2003,8 @@ bool LLAppViewer::initThreads()
static const bool enable_threads = true;
#endif
+ LLImage::initClass();
+
LLVFSThread::initClass(enable_threads && false);
LLLFSThread::initClass(enable_threads && false);
@@ -2012,8 +2014,7 @@ bool LLAppViewer::initThreads()
LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(),
sImageDecodeThread,
enable_threads && true,
- app_metrics_qa_mode);
- LLImage::initClass();
+ app_metrics_qa_mode);
if (LLFastTimer::sLog || LLFastTimer::sMetricLog)
{
--
cgit v1.2.3
From 06cb4e86027ab90ab5960649beb342d3c85c41ba Mon Sep 17 00:00:00 2001
From: Paul ProductEngine
Date: Wed, 26 Oct 2011 16:58:28 +0200
Subject: EXP-1417 FIXED (Docked Notifications window tears off from the dock
icon when deleting notifications one by one)
- Changed LLSysWellWindow::reshapeWindow() so that the floater decreases from bottom to top, without changing top coordinate.
- Force dock control repositioning in case floater rect changed.
---
indra/newview/llsyswellwindow.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index ffe864e220..3aa6a3b7e5 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -203,10 +203,9 @@ void LLSysWellWindow::reshapeWindow()
{
new_window_height = MAX_WINDOW_HEIGHT;
}
- S32 newY = curRect.mTop + new_window_height - curRect.getHeight();
- S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH
- : curRect.getWidth();
- curRect.setLeftTopAndSize(curRect.mLeft, newY, newWidth, new_window_height);
+ S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth();
+
+ curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height);
reshape(curRect.getWidth(), curRect.getHeight(), TRUE);
setRect(curRect);
}
--
cgit v1.2.3
From 5814695d71bc91eae556e682fa5d3ddd5ebdb628 Mon Sep 17 00:00:00 2001
From: Oz Linden
Date: Wed, 26 Oct 2011 12:08:59 -0400
Subject: vwr-26120: add attachment points for Neck and Avatar Center
---
indra/newview/character/avatar_lad.xml | 21 ++++++++++++++++++++-
indra/newview/skins/default/xui/en/strings.xml | 2 ++
2 files changed, 22 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index 5d6b10c047..6641c80b94 100644
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -393,7 +393,26 @@
max_attachment_offset="2.0"
visible_in_first_person="true" />
-
+
+
+
+
Stomach
Left Pec
Right Pec
+ Neck
+ Avatar Center
Invalid Attachment Point
--
cgit v1.2.3
From da1898d1cb9a1539a897541afebe47ff6f517d30 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 26 Oct 2011 11:19:04 -0500
Subject: SH-2625 Fix for window size reverting to non-maximized whenever
shaders are loaded.
---
indra/newview/llviewershadermgr.cpp | 1 -
1 file changed, 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 637cba6d6c..cf5327e5f3 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -584,7 +584,6 @@ void LLViewerShaderMgr::setShaders()
if (gViewerWindow)
{
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- gViewerWindow->getWindow()->restore();
}
gPipeline.createGLBuffers();
--
cgit v1.2.3
From 9d988f4454556dd911b8cb131b38a7f39023fa0f Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Wed, 26 Oct 2011 10:10:05 -0700
Subject: EXP-1461 FIX Incoming Nearby chat not visible in chat toasts/bubbles
to user when chat window is minimized with chat history opened
---
indra/newview/llnearbychathandler.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 330a21ef65..c43c95a366 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -568,7 +568,8 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
sChatWatcher->post(notification);
- if( chat_bar->getVisible() && nearby_chat->getVisible()
+ if( !chat_bar->isMinimized()
+ && nearby_chat->isInVisibleChain()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& gSavedSettings.getBOOL("UseChatBubbles") )
|| !mChannel->getShowToasts() ) // to prevent toasts in Busy mode
--
cgit v1.2.3
From fa04683aba24c1a5dc9dabd77b8c5fabef492974 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao
Date: Wed, 26 Oct 2011 11:10:18 -0600
Subject: fix for SH-2573: Flaw in Purging Texture Cache when it Exceeds Limit
---
indra/newview/lltexturecache.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 87b6304f9d..d9da9eb476 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1633,8 +1633,8 @@ void LLTextureCache::purgeTextures(bool validate)
{
purge_count++;
LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL;
- removeEntry(idx, entries[idx], filename) ;
cache_size -= entries[idx].mBodySize;
+ removeEntry(idx, entries[idx], filename) ;
}
}
@@ -1871,13 +1871,12 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename)
file_maybe_exists = false;
}
}
+ mTexturesSizeTotal -= entry.mBodySize;
entry.mImageSize = -1;
entry.mBodySize = 0;
mHeaderIDMap.erase(entry.mID);
- mTexturesSizeMap.erase(entry.mID);
-
- mTexturesSizeTotal -= entry.mBodySize;
+ mTexturesSizeMap.erase(entry.mID);
mFreeList.insert(idx);
}
--
cgit v1.2.3
From b0df4f12040152afe0813875eddfe83a078079a2 Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Wed, 26 Oct 2011 11:51:52 -0700
Subject: EXP-1461 FIX Incoming Nearby chat not visible in chat toasts/bubbles
to user when chat window is minimized with chat history opened made
minimizing and unminimizing nearby chat floater do the right thing
---
indra/newview/llnearbychatbar.cpp | 9 +++++++++
indra/newview/llnearbychatbar.h | 1 +
2 files changed, 10 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index e7f3daa1a3..4674c85324 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -399,6 +399,15 @@ void LLNearbyChatBar::onToggleNearbyChatPanel()
}
}
+void LLNearbyChatBar::setMinimized(BOOL b)
+{
+ if (b != LLFloater::isMinimized())
+ {
+ LLFloater::setMinimized(b);
+ getChildView("nearby_chat")->setVisible(!b);
+ }
+}
+
void LLNearbyChatBar::onChatBoxCommit()
{
if (mChatBox->getText().length() > 0)
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index bc00c1b9fc..e9734899b3 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -60,6 +60,7 @@ public:
static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
void showHistory();
+ /*virtual*/void setMinimized(BOOL b);
protected:
static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str);
--
cgit v1.2.3
From 83633ddce761e1526c349b78efa43e466916feef Mon Sep 17 00:00:00 2001
From: callum
Date: Wed, 26 Oct 2011 11:54:19 -0700
Subject: Add ignore_ui_scale="false" flag to login page web browser for
testing putposes
---
indra/newview/skins/default/xui/en/panel_login.xml | 23 +++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 1c3e08d59b..090c4e0d61 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -22,17 +22,18 @@ top="600"
+ trusted_content="true"
+ bg_opaque_color="Black"
+ border_visible="false"
+ bottom="600"
+ follows="all"
+ left="0"
+ name="login_html"
+ start_url=""
+ top="0"
+ height="600"
+ width="980"
+ ignore_ui_scale="false"/>
Date: Wed, 26 Oct 2011 14:56:49 -0500
Subject: SH-2546 Don't feed vertex color to terrain vertex buffers.
---
.../shaders/class1/environment/terrainV.glsl | 3 +--
indra/newview/lldrawpoolterrain.cpp | 5 +++--
indra/newview/lldrawpoolterrain.h | 3 +--
indra/newview/llvosurfacepatch.cpp | 24 +---------------------
indra/newview/llvosurfacepatch.h | 7 +------
5 files changed, 7 insertions(+), 35 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
index f183b885d1..d09c5f9247 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
@@ -33,7 +33,6 @@ uniform vec4 object_plane_s;
ATTRIBUTE vec3 position;
ATTRIBUTE vec3 normal;
-ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
ATTRIBUTE vec2 texcoord1;
@@ -72,7 +71,7 @@ void main()
/// Potentially better without it for water.
pos /= pos.w;
- vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0));
+ vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0));
vertex_color = color;
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index ce601325c8..d61df9c048 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -189,6 +189,8 @@ void LLDrawPoolTerrain::render(S32 pass)
compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area
}
+ LLOverrideFaceColor override(this, 1.f, 1.f, 1.f, 1.f);
+
if (!gGLManager.mHasMultitexture)
{
// No multitexture, render simple land.
@@ -203,8 +205,7 @@ void LLDrawPoolTerrain::render(S32 pass)
}
LLGLSPipeline gls;
- LLOverrideFaceColor override(this, 1.f, 1.f, 1.f, 1.f);
-
+
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0)
{
gPipeline.enableLightsDynamic();
diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h
index 3056da44d5..283ed87f1a 100644
--- a/indra/newview/lldrawpoolterrain.h
+++ b/indra/newview/lldrawpoolterrain.h
@@ -40,8 +40,7 @@ public:
LLVertexBuffer::MAP_TEXCOORD0 |
LLVertexBuffer::MAP_TEXCOORD1 |
LLVertexBuffer::MAP_TEXCOORD2 |
- LLVertexBuffer::MAP_TEXCOORD3 |
- LLVertexBuffer::MAP_COLOR
+ LLVertexBuffer::MAP_TEXCOORD3
};
virtual U32 getVertexDataMask();
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index bc82b0df13..0108690538 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -317,7 +317,6 @@ BOOL LLVOSurfacePatch::updateLOD()
void LLVOSurfacePatch::getGeometry(LLStrider &verticesp,
LLStrider &normalsp,
- LLStrider &colorsp,
LLStrider &texCoords0p,
LLStrider &texCoords1p,
LLStrider &indicesp)
@@ -329,7 +328,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider &verticesp,
updateMainGeometry(facep,
verticesp,
normalsp,
- colorsp,
texCoords0p,
texCoords1p,
indicesp,
@@ -337,7 +335,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider &verticesp,
updateNorthGeometry(facep,
verticesp,
normalsp,
- colorsp,
texCoords0p,
texCoords1p,
indicesp,
@@ -345,7 +342,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider &verticesp,
updateEastGeometry(facep,
verticesp,
normalsp,
- colorsp,
texCoords0p,
texCoords1p,
indicesp,
@@ -355,7 +351,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider &verticesp,
void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
LLStrider &verticesp,
LLStrider &normalsp,
- LLStrider &colorsp,
LLStrider &texCoords0p,
LLStrider &texCoords1p,
LLStrider &indicesp,
@@ -396,7 +391,6 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
x = i * render_stride;
y = j * render_stride;
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
- *colorsp++ = LLColor4U::white;
verticesp++;
normalsp++;
texCoords0p++;
@@ -461,7 +455,6 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
LLStrider &verticesp,
LLStrider &normalsp,
- LLStrider &colorsp,
LLStrider &texCoords0p,
LLStrider &texCoords1p,
LLStrider &indicesp,
@@ -499,7 +492,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
y = 16 - render_stride;
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
- *colorsp++ = LLColor4U::white;
verticesp++;
normalsp++;
texCoords0p++;
@@ -515,7 +507,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
vertex_count++;
@@ -554,7 +545,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
vertex_count++;
@@ -569,7 +559,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
vertex_count++;
@@ -613,7 +602,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
y = 16 - render_stride;
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
- *colorsp++ = LLColor4U::white;
verticesp++;
normalsp++;
texCoords0p++;
@@ -630,7 +618,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
vertex_count++;
@@ -668,7 +655,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
LLStrider &verticesp,
LLStrider &normalsp,
- LLStrider &colorsp,
LLStrider &texCoords0p,
LLStrider &texCoords1p,
LLStrider &indicesp,
@@ -702,7 +688,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -715,7 +700,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -753,7 +737,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -766,7 +749,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -810,7 +792,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -823,7 +804,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -1094,14 +1074,12 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
LLStrider normals;
LLStrider texcoords2;
LLStrider texcoords;
- LLStrider colors;
LLStrider indices;
llassert_always(buffer->getVertexStrider(vertices));
llassert_always(buffer->getNormalStrider(normals));
llassert_always(buffer->getTexCoord0Strider(texcoords));
llassert_always(buffer->getTexCoord1Strider(texcoords2));
- llassert_always(buffer->getColorStrider(colors));
llassert_always(buffer->getIndexStrider(indices));
U32 indices_index = 0;
@@ -1116,7 +1094,7 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
facep->setVertexBuffer(buffer);
LLVOSurfacePatch* patchp = (LLVOSurfacePatch*) facep->getViewerObject();
- patchp->getGeometry(vertices, normals, colors, texcoords, texcoords2, indices);
+ patchp->getGeometry(vertices, normals, texcoords, texcoords2, indices);
indices_index += facep->getIndicesCount();
index_offset += facep->getGeomCount();
diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h
index 8e75ff2e6e..a15878368e 100644
--- a/indra/newview/llvosurfacepatch.h
+++ b/indra/newview/llvosurfacepatch.h
@@ -44,8 +44,7 @@ public:
VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) |
(1 << LLVertexBuffer::TYPE_NORMAL) |
(1 << LLVertexBuffer::TYPE_TEXCOORD0) |
- (1 << LLVertexBuffer::TYPE_TEXCOORD1) |
- (1 << LLVertexBuffer::TYPE_COLOR)
+ (1 << LLVertexBuffer::TYPE_TEXCOORD1)
};
LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
@@ -64,7 +63,6 @@ public:
/*virtual*/ void updateFaceSize(S32 idx);
void getGeometry(LLStrider &verticesp,
LLStrider &normalsp,
- LLStrider &colorsp,
LLStrider &texCoords0p,
LLStrider &texCoords1p,
LLStrider &indicesp);
@@ -116,7 +114,6 @@ protected:
void updateMainGeometry(LLFace *facep,
LLStrider &verticesp,
LLStrider &normalsp,
- LLStrider &colorsp,
LLStrider &texCoords0p,
LLStrider &texCoords1p,
LLStrider &indicesp,
@@ -124,7 +121,6 @@ protected:
void updateNorthGeometry(LLFace *facep,
LLStrider &verticesp,
LLStrider &normalsp,
- LLStrider &colorsp,
LLStrider &texCoords0p,
LLStrider &texCoords1p,
LLStrider &indicesp,
@@ -132,7 +128,6 @@ protected:
void updateEastGeometry(LLFace *facep,
LLStrider &verticesp,
LLStrider &normalsp,
- LLStrider &colorsp,
LLStrider &texCoords0p,
LLStrider &texCoords1p,
LLStrider &indicesp,
--
cgit v1.2.3
From 7a05e2a18fab40b2d60ff15371a59ec238933faa Mon Sep 17 00:00:00 2001
From: eli
Date: Wed, 26 Oct 2011 13:12:50 -0700
Subject: FIX VWR-27349 Fix incorrect language name vs. native script name
formats
---
indra/newview/skins/default/xui/de/panel_preferences_general.xml | 2 +-
indra/newview/skins/default/xui/en/panel_preferences_general.xml | 2 +-
indra/newview/skins/default/xui/es/panel_preferences_general.xml | 2 +-
indra/newview/skins/default/xui/fr/panel_preferences_general.xml | 2 +-
indra/newview/skins/default/xui/it/panel_preferences_general.xml | 2 +-
indra/newview/skins/default/xui/ja/panel_preferences_general.xml | 6 +++---
indra/newview/skins/default/xui/pt/panel_preferences_general.xml | 2 +-
indra/newview/skins/default/xui/ru/panel_preferences_general.xml | 8 ++++----
indra/newview/skins/default/xui/tr/panel_preferences_general.xml | 6 +++---
9 files changed, 16 insertions(+), 16 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_general.xml b/indra/newview/skins/default/xui/de/panel_preferences_general.xml
index 5c8b8302c8..979ccba48d 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_general.xml
@@ -16,7 +16,7 @@
-
+
(Erfordert Neustart)
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index 0a1c0872e9..4079a80924 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -92,7 +92,7 @@
value="ja" />
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_general.xml b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
index 920729bb07..4fc163f5b6 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
@@ -16,7 +16,7 @@
-
+
(requiere reiniciar)
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
index dd4c1c9f63..66b84af3aa 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
@@ -16,7 +16,7 @@
-
+
(redémarrage requis)
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_general.xml b/indra/newview/skins/default/xui/it/panel_preferences_general.xml
index 4f52105404..90a833471c 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_general.xml
@@ -16,7 +16,7 @@
-
+
(Richiede il riavvio)
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
index 51db95735b..1bafa52fbe 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
@@ -13,10 +13,10 @@
-
-
+
+
-
+
(再起動後に反映)
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
index 1c19a55de6..c53aa7d5f7 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
@@ -16,7 +16,7 @@
-
+
(Reinicie para trocar de idioma)
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_general.xml b/indra/newview/skins/default/xui/ru/panel_preferences_general.xml
index 3e21697616..770c47b3d4 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_general.xml
@@ -5,7 +5,7 @@
-
+
@@ -13,10 +13,10 @@
-
-
+
+
-
+
(Требуется перезапуск)
diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_general.xml b/indra/newview/skins/default/xui/tr/panel_preferences_general.xml
index da01bd98a0..fbfc07c4b8 100644
--- a/indra/newview/skins/default/xui/tr/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/tr/panel_preferences_general.xml
@@ -5,7 +5,7 @@
-
+
@@ -14,9 +14,9 @@
-
+
-
+
(Yeniden başlatma gerekir)
--
cgit v1.2.3
From 735708583fc6e236df3ad6d4c9a5f02b6ec7605a Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 26 Oct 2011 15:35:33 -0500
Subject: SH-2546 Make sure terrain shaders don't attempt to use indexed
texture rendering.
---
indra/newview/llviewershadermgr.cpp | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index cf5327e5f3..108f008f58 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -827,6 +827,8 @@ BOOL LLViewerShaderMgr::loadShadersEnvironment()
gTerrainProgram.mFeatures.calculatesLighting = true;
gTerrainProgram.mFeatures.calculatesAtmospherics = true;
gTerrainProgram.mFeatures.hasAtmospherics = true;
+ gTerrainProgram.mFeatures.mIndexedTextureChannels = 0;
+ gTerrainProgram.mFeatures.disableTextureIndex = true;
gTerrainProgram.mFeatures.hasGamma = true;
gTerrainProgram.mShaderFiles.clear();
gTerrainProgram.mShaderFiles.push_back(make_pair("environment/terrainV.glsl", GL_VERTEX_SHADER_ARB));
@@ -895,6 +897,8 @@ BOOL LLViewerShaderMgr::loadShadersWater()
gTerrainWaterProgram.mFeatures.calculatesAtmospherics = true;
gTerrainWaterProgram.mFeatures.hasAtmospherics = true;
gTerrainWaterProgram.mFeatures.hasWaterFog = true;
+ gTerrainWaterProgram.mFeatures.mIndexedTextureChannels = 0;
+ gTerrainWaterProgram.mFeatures.disableTextureIndex = true;
gTerrainWaterProgram.mShaderFiles.clear();
gTerrainWaterProgram.mShaderFiles.push_back(make_pair("environment/terrainV.glsl", GL_VERTEX_SHADER_ARB));
gTerrainWaterProgram.mShaderFiles.push_back(make_pair("environment/terrainWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
--
cgit v1.2.3
From db363104dc4055b7ed15d695b23df99bb33eb1c8 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao
Date: Wed, 26 Oct 2011 14:35:58 -0600
Subject: fix for SH-2586: Texture Memory (MB) preference refuses to set above
128mb (when --noprobe switch is used)
---
indra/newview/llappviewerwin32.cpp | 4 +---
indra/newview/llviewertexturelist.cpp | 15 ++++++++++++---
2 files changed, 13 insertions(+), 6 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index f94c843ad9..647ace7ee3 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -403,11 +403,9 @@ bool LLAppViewerWin32::initHardwareTest()
//
if (FALSE == gSavedSettings.getBOOL("NoHardwareProbe"))
{
- BOOL vram_only = !gSavedSettings.getBOOL("ProbeHardwareOnStartup");
-
// per DEV-11631 - disable hardware probing for everything
// but vram.
- vram_only = TRUE;
+ BOOL vram_only = TRUE;
LLSplashScreen::update(LLTrans::getString("StartupDetectingHardware"));
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 01eb384872..30e5f51687 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1069,10 +1069,19 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
}
else
{
- if (get_recommended)
- max_texmem = 128;
- else
+ if (!get_recommended)
+ {
+ max_texmem = 512;
+ }
+ else if (gSavedSettings.getBOOL("NoHardwareProbe")) //did not do hardware detection at startup
+ {
max_texmem = 512;
+ }
+ else
+ {
+ max_texmem = 128;
+ }
+
llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << llendl;
}
--
cgit v1.2.3
From 1cd74584517e3f7e3d39f6a95f472268ace83be2 Mon Sep 17 00:00:00 2001
From: eli
Date: Wed, 26 Oct 2011 16:21:29 -0700
Subject: FIX VWR-26192 en_xui_change
---
indra/newview/skins/default/xui/en/inspect_remote_object.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/inspect_remote_object.xml b/indra/newview/skins/default/xui/en/inspect_remote_object.xml
index ef3dd844cd..e83257d2a0 100644
--- a/indra/newview/skins/default/xui/en/inspect_remote_object.xml
+++ b/indra/newview/skins/default/xui/en/inspect_remote_object.xml
@@ -36,7 +36,7 @@
height="16"
left="8"
name="object_owner_label"
- width="55"
+ width="65"
top_pad="12">
Owner:
--
cgit v1.2.3
From 0243c47b4a89eafe081c4280c12ab4198a472816 Mon Sep 17 00:00:00 2001
From: eli
Date: Wed, 26 Oct 2011 16:25:48 -0700
Subject: FIX VWR-26323
---
indra/newview/skins/default/xui/de/inspect_group.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/de/inspect_group.xml b/indra/newview/skins/default/xui/de/inspect_group.xml
index d85ca7ce4d..60fa8ff0d8 100644
--- a/indra/newview/skins/default/xui/de/inspect_group.xml
+++ b/indra/newview/skins/default/xui/de/inspect_group.xml
@@ -26,7 +26,7 @@ Hoch solln sie leben! Elche forever! Und auch Mungos!
Mitgliedschaft: 123 L$
-
+
--
cgit v1.2.3
From b82d0abb7e885d339dd37d05d6181d8fd632ee41 Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Wed, 26 Oct 2011 16:39:03 -0700
Subject: Disabling display of inbox unless the Received Items folder exists
already.
---
indra/newview/app_settings/settings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index b98a40beaf..3771222455 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4257,7 +4257,7 @@
Type
Boolean
Value
- 1
+ 0
InventoryDisplayOutbox
--
cgit v1.2.3
From a556fcf2784907ee3d7e9e6e6a3ae1f89dcf5aa0 Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Wed, 26 Oct 2011 17:38:44 -0700
Subject: EXP-1458 FIX Chat text entry bar does not have focus when chat
floater is opened while chat history is toggled open
---
.../skins/default/xui/en/floater_chat_bar.xml | 100 +++++++++++----------
1 file changed, 53 insertions(+), 47 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
index 86191b789c..e7eb7652c7 100644
--- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
@@ -15,6 +15,7 @@
min_height="60"
min_width="150"
can_resize="true"
+ default_tab_group="1"
name="chat_bar"
width="380">
-
-
-
-
-
+
+
+
+
+
--
cgit v1.2.3
From 95da0d5421b86b3c01fc372db28d7aa568ef0b16 Mon Sep 17 00:00:00 2001
From: eli
Date: Wed, 26 Oct 2011 18:45:06 -0700
Subject: FIX VWR-27349 Fix incorrect language name vs. native script name
formats for Chinese
---
.../skins/default/xui/zh/panel_preferences_general.xml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml
index 29f9599c97..6827fab6e6 100644
--- a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml
@@ -5,15 +5,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
(須重新啟動)
--
cgit v1.2.3
From ad4ae99c30f1293bf8266c1f53ae62161bcb68bb Mon Sep 17 00:00:00 2001
From: Paul ProductEngine
Date: Thu, 27 Oct 2011 16:34:45 +0200
Subject: EXP-1389 FIXED ("New notifications while offline" notification shown
in lower right corner of FUI viewer)
- Moved startup toast to the top of the LLScreenChannel
---
indra/newview/llscreenchannel.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 45cf81751b..15ba5195d9 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -708,6 +708,8 @@ void LLScreenChannel::showToastsTop()
//--------------------------------------------------------------------------
void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
{
+ LLScreenChannelBase::updateRect();
+
LLRect toast_rect;
LLToast::Params p;
p.lifetime_secs = timer;
@@ -730,13 +732,10 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
text_box->setValue(text);
text_box->setVisible(TRUE);
- S32 old_height = text_box->getRect().getHeight();
text_box->reshapeToFitText();
text_box->setOrigin(text_box->getRect().mLeft, (wrapper_panel->getRect().getHeight() - text_box->getRect().getHeight())/2);
- S32 new_height = text_box->getRect().getHeight();
- S32 height_delta = new_height - old_height;
- toast_rect.setLeftTopAndSize(0, toast_rect.getHeight() + height_delta +gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
+ toast_rect.setLeftTopAndSize(0, getRect().getHeight() - gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
mStartUpToastPanel->setRect(toast_rect);
addChild(mStartUpToastPanel);
--
cgit v1.2.3
From 252f851741a60f8d9c81870e48a6c7016c6db7a0 Mon Sep 17 00:00:00 2001
From: Jonathan Yap
Date: Thu, 27 Oct 2011 13:36:32 -0400
Subject: STORM-1659 dates reported as "2035" within groups
---
indra/newview/llpanelgrouplandmoney.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index 8477219f87..e66dd5690c 100644
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -1431,7 +1431,7 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
LLSD substitution;
// We don't do time zone corrections of the calculated number of seconds
// because we don't have a full time stamp, only a date.
- substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%m/%d/%Y", start_date);
+ substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%Y-%m-%d", start_date);
LLStringUtil::format (time_str, substitution);
text.append(time_str);
@@ -1442,7 +1442,7 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
text.append(LLTrans::getString("NextStipendDay"));
time_str = date_format_str;
- substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%m/%d/%Y", next_stipend_date);
+ substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%Y-%m-%d", next_stipend_date);
LLStringUtil::format (time_str, substitution);
text.append(time_str);
--
cgit v1.2.3
From 40dcdac27ae5d11a6e3d6a13b1505e834f672e4d Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Thu, 27 Oct 2011 13:37:47 -0700
Subject: remove ignore_ui_scale flags and use web content scaling for all
web_browser widgets
---
indra/newview/llmediactrl.cpp | 52 +++++-----------------
indra/newview/llmediactrl.h | 45 +++++++++----------
.../default/xui/en/floater_buy_currency_html.xml | 1 -
indra/newview/skins/default/xui/en/panel_login.xml | 3 +-
4 files changed, 32 insertions(+), 69 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index dd12546bc6..1e92ca25b3 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -68,7 +68,6 @@ static LLDefaultChildRegistry::Register r("web_browser");
LLMediaCtrl::Params::Params()
: start_url("start_url"),
border_visible("border_visible", true),
- ignore_ui_scale("ignore_ui_scale", true),
decouple_texture_size("decouple_texture_size", false),
texture_width("texture_width", 1024),
texture_height("texture_height", 1024),
@@ -89,7 +88,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mFrequentUpdates( true ),
mForceUpdate( false ),
mHomePageUrl( "" ),
- mIgnoreUIScale( true ),
mAlwaysRefresh( false ),
mMediaSource( 0 ),
mTakeFocusOnClick( p.focus_on_click ),
@@ -112,8 +110,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
setCaretColor( (unsigned int)color.mV[0], (unsigned int)color.mV[1], (unsigned int)color.mV[2] );
}
- setIgnoreUIScale(p.ignore_ui_scale);
-
setHomePageUrl(p.start_url, p.initial_mime_type);
setBorderVisible(p.border_visible);
@@ -124,10 +120,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
if(!getDecoupleTextureSize())
{
- S32 screen_width = mIgnoreUIScale ?
- llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]) : getRect().getWidth();
- S32 screen_height = mIgnoreUIScale ?
- llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]) : getRect().getHeight();
+ S32 screen_width = llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]);
+ S32 screen_height = llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]);
setTextureSize(screen_width, screen_height);
}
@@ -471,8 +465,8 @@ void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
{
if(!getDecoupleTextureSize())
{
- S32 screen_width = mIgnoreUIScale ? llround((F32)width * LLUI::sGLScaleFactor.mV[VX]) : width;
- S32 screen_height = mIgnoreUIScale ? llround((F32)height * LLUI::sGLScaleFactor.mV[VY]) : height;
+ S32 screen_width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]);
+ S32 screen_height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]);
// when floater is minimized, these sizes are negative
if ( screen_height > 0 && screen_width > 0 )
@@ -689,6 +683,8 @@ bool LLMediaCtrl::ensureMediaSourceExists()
mMediaSource->addObserver( this );
mMediaSource->setBackgroundColor( getBackgroundColor() );
mMediaSource->setTrustedBrowser(mTrusted);
+ mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
+
if(mClearCache)
{
mMediaSource->clearCache();
@@ -770,27 +766,7 @@ void LLMediaCtrl::draw()
{
gGL.pushUIMatrix();
{
- if (mIgnoreUIScale)
- {
- gGL.loadUIIdentity();
- // font system stores true screen origin, need to scale this by UI scale factor
- // to get render origin for this view (with unit scale)
- gGL.translateUI(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]),
- floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]),
- LLFontGL::sCurOrigin.mZ);
- }
- else
- {
- // zoom is an expensive operation - only do it if value changes
- // TODO: move this logic out to mMediaSource->setPageZoomFactor() ??
- static double prev_ui_scale = 0.0f;
- double ui_scale = LLUI::sGLScaleFactor.mV[ VX ];
- if ( ui_scale != prev_ui_scale )
- {
- mMediaSource->setPageZoomFactor( ui_scale );
- prev_ui_scale = ui_scale;
- }
- }
+ mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
// scale texture to fit the space using texture coords
gGL.getTexUnit(0)->bind(media_texture);
@@ -838,14 +814,6 @@ void LLMediaCtrl::draw()
x_offset = (r.getWidth() - width) / 2;
y_offset = (r.getHeight() - height) / 2;
- if(mIgnoreUIScale)
- {
- x_offset = llround((F32)x_offset * LLUI::sGLScaleFactor.mV[VX]);
- y_offset = llround((F32)y_offset * LLUI::sGLScaleFactor.mV[VY]);
- width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]);
- height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]);
- }
-
// draw the browser
gGL.begin( LLRender::QUADS );
if (! media_plugin->getTextureCoordsOpenGL())
@@ -912,14 +880,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
}
- x = mIgnoreUIScale ? llround((F32)x * LLUI::sGLScaleFactor.mV[VX]) : x;
+ x = llround((F32)x * LLUI::sGLScaleFactor.mV[VX]);
if ( ! coords_opengl )
{
- y = mIgnoreUIScale ? llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]) : y;
+ y = llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]);
}
else
{
- y = mIgnoreUIScale ? llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]) : getRect().getHeight() - y;
+ y = llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]);
};
}
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 3c0436e27a..7f2a5e1642 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -51,7 +51,6 @@ public:
Optional start_url;
Optional border_visible,
- ignore_ui_scale,
hide_loading,
decouple_texture_size,
trusted_content,
@@ -125,9 +124,6 @@ public:
bool getFrequentUpdates() { return mFrequentUpdates; };
void setFrequentUpdates( bool frequentUpdatesIn ) { mFrequentUpdates = frequentUpdatesIn; };
- void setIgnoreUIScale(bool ignore) { mIgnoreUIScale = ignore; }
- bool getIgnoreUIScale() { return mIgnoreUIScale; }
-
void setAlwaysRefresh(bool refresh) { mAlwaysRefresh = refresh; }
bool getAlwaysRefresh() { return mAlwaysRefresh; }
@@ -181,28 +177,29 @@ public:
const S32 mTextureDepthBytes;
LLUUID mMediaTextureID;
LLViewBorder* mBorder;
- bool mFrequentUpdates;
- bool mForceUpdate;
- bool mTrusted;
- std::string mHomePageUrl;
- std::string mHomePageMimeType;
- std::string mCurrentNavUrl;
- std::string mErrorPageURL;
- std::string mTarget;
- bool mIgnoreUIScale;
- bool mAlwaysRefresh;
+ bool mFrequentUpdates,
+ mForceUpdate,
+ mTrusted,
+ mAlwaysRefresh,
+ mTakeFocusOnClick,
+ mStretchToFill,
+ mMaintainAspectRatio,
+ mHideLoading,
+ mHidingInitialLoad,
+ mClearCache,
+ mHoverTextChanged,
+ mDecoupleTextureSize;
+
+ std::string mHomePageUrl,
+ mHomePageMimeType,
+ mCurrentNavUrl,
+ mErrorPageURL,
+ mTarget;
viewer_media_t mMediaSource;
- bool mTakeFocusOnClick;
- bool mStretchToFill;
- bool mMaintainAspectRatio;
- bool mHideLoading;
- bool mHidingInitialLoad;
- bool mDecoupleTextureSize;
- S32 mTextureWidth;
- S32 mTextureHeight;
- bool mClearCache;
+ S32 mTextureWidth,
+ mTextureHeight;
+
class LLWindowShade* mWindowShade;
- bool mHoverTextChanged;
LLContextMenu* mContextMenu;
};
diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml
index b9c415633f..0637eedfb2 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml
@@ -23,6 +23,5 @@
right="-1"
top="1"
bottom="-1"
- ignore_ui_scale="false"
name="browser"/>
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 090c4e0d61..e8f63afe1d 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -32,8 +32,7 @@ top="600"
start_url=""
top="0"
height="600"
- width="980"
- ignore_ui_scale="false"/>
+ width="980"/>
Date: Thu, 27 Oct 2011 13:39:19 -0700
Subject: moved zoom factor management to llviewermediaimpl
---
indra/newview/llviewermedia.cpp | 6 ++++--
indra/newview/llviewermedia.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index fdb281b7f1..dfad871dd7 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1715,7 +1715,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
mNavigateSuspended(false),
mNavigateSuspendedDeferred(false),
mIsUpdated(false),
- mTrustedBrowser(false)
+ mTrustedBrowser(false),
+ mZoomFactor(1.0)
{
// Set up the mute list observer if it hasn't been set up already.
@@ -2305,8 +2306,9 @@ void LLViewerMediaImpl::clearCache()
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::setPageZoomFactor( double factor )
{
- if(mMediaSource)
+ if(mMediaSource && factor != mZoomFactor)
{
+ mZoomFactor = factor;
mMediaSource->set_page_zoom_factor( factor );
}
}
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index a475d03542..3db9f0b4e0 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -417,6 +417,7 @@ private:
private:
// a single media url with some data and an impl.
LLPluginClassMedia* mMediaSource;
+ F64 mZoomFactor;
LLUUID mTextureId;
bool mMovieImageHasMips;
std::string mMediaURL; // The last media url set with NavigateTo
--
cgit v1.2.3
From 5c868a90f2e30245771aa1ef402645d6d3f12ab1 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Thu, 27 Oct 2011 17:39:07 -0400
Subject: SH-2635 FIX - always send crash report if previous session froze
---
indra/newview/llappviewer.cpp | 39 +++------------------------------------
1 file changed, 3 insertions(+), 36 deletions(-)
mode change 100644 => 100755 indra/newview/llappviewer.cpp
(limited to 'indra/newview')
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
old mode 100644
new mode 100755
index ecfd101eeb..dc88c81d6a
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2825,48 +2825,15 @@ void LLAppViewer::initUpdater()
void LLAppViewer::checkForCrash(void)
{
-
#if LL_SEND_CRASH_REPORTS
if (gLastExecEvent == LAST_EXEC_FROZE)
{
- llinfos << "Last execution froze, requesting to send crash report." << llendl;
- //
- // Pop up a freeze or crash warning dialog
- //
- S32 choice;
- const S32 cb = gCrashSettings.getS32("CrashSubmitBehavior");
- if(cb == CRASH_BEHAVIOR_ASK)
- {
- std::ostringstream msg;
- msg << LLTrans::getString("MBFrozenCrashed");
- std::string alert = LLTrans::getString("APP_NAME") + " " + LLTrans::getString("MBAlert");
- choice = OSMessageBox(msg.str(),
- alert,
- OSMB_YESNO);
- }
- else if(cb == CRASH_BEHAVIOR_NEVER_SEND)
- {
- choice = OSBTN_NO;
- }
- else
- {
- choice = OSBTN_YES;
- }
-
- if (OSBTN_YES == choice)
- {
- llinfos << "Sending crash report." << llendl;
+ llinfos << "Last execution froze, sending a crash report." << llendl;
- bool report_freeze = true;
- handleCrashReporting(report_freeze);
- }
- else
- {
- llinfos << "Not sending crash report." << llendl;
- }
+ bool report_freeze = true;
+ handleCrashReporting(report_freeze);
}
#endif // LL_SEND_CRASH_REPORTS
-
}
//
--
cgit v1.2.3
From 988278d236d789f490eed24a662a6ffe2be6455a Mon Sep 17 00:00:00 2001
From: Leyla Farazha
Date: Thu, 27 Oct 2011 16:13:27 -0700
Subject: EXP-1475 Tongue out of position when incoming/outgoing call dialog
shown for first time when speak button is left toolbar
---
indra/newview/skins/default/textures/textures.xml | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index bb91d32c6c..0f3769f0f8 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -190,6 +190,10 @@ with the same filename but different name
+
+
+
+
--
cgit v1.2.3
From e86adb53f4df0cb0b9d8ea9b6cc805782d9fcf71 Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Thu, 27 Oct 2011 17:20:12 -0700
Subject: EXP-1479 FIX Chat history does not open when selecting toggle on chat
floater and issue with minimizing and opening chat floater
---
indra/newview/skins/default/xui/en/floater_chat_bar.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
index e7eb7652c7..87606c1a2a 100644
--- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
@@ -24,7 +24,7 @@
follow="all"
width="380"
height="0"
- visible="true"
+ visible="false"
filename="panel_nearby_chat.xml"
name="nearby_chat" />
Date: Fri, 28 Oct 2011 07:27:54 -0400
Subject: STORM-1105 "Traffic: 0" shown for two cases (traffic actually 0, and
waiting for data)
---
indra/newview/llfloaterland.cpp | 13 +++++++++----
indra/newview/llviewerparcelmgr.cpp | 8 ++++----
indra/newview/llviewerparcelmgr.h | 2 ++
indra/newview/skins/default/xui/en/floater_about_land.xml | 2 +-
4 files changed, 16 insertions(+), 9 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 4746f93009..2bb1075ec4 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -433,7 +433,6 @@ BOOL LLPanelLandGeneral::postBuild()
mTextDwell = getChild("DwellText");
-
mBtnBuyLand = getChild("Buy Land...");
mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
@@ -696,20 +695,26 @@ void LLPanelLandGeneral::refresh()
S32 area;
S32 claim_price;
S32 rent_price;
- F32 dwell;
+ F32 dwell = DWELL_NAN;
LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
&claim_price,
&rent_price,
&for_sale,
&dwell);
-
// Area
LLUIString price = getString("area_size_text");
price.setArg("[AREA]", llformat("%d",area));
mTextPriceLabel->setText(getString("area_text"));
mTextPrice->setText(price.getString());
- mTextDwell->setText(llformat("%.0f", dwell));
+ if (dwell == DWELL_NAN)
+ {
+ mTextDwell->setText(LLTrans::getString("LoadingData"));
+ }
+ else
+ {
+ mTextDwell->setText(llformat("%.0f", dwell));
+ }
if (for_sale)
{
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 8db72da1ee..d6002e7320 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -113,7 +113,7 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mRequestResult(0),
mWestSouth(),
mEastNorth(),
- mSelectedDwell(0.f),
+ mSelectedDwell(DWELL_NAN),
mAgentParcelSequenceID(-1),
mHoverRequestResult(0),
mHoverWestSouth(),
@@ -233,7 +233,7 @@ void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out,
S32 price = 0;
S32 rent = 0;
BOOL for_sale = FALSE;
- F32 dwell = 0.f;
+ F32 dwell = DWELL_NAN;
if (mSelected)
{
@@ -579,7 +579,7 @@ void LLViewerParcelMgr::deselectLand()
mCurrentParcel->mBanList.clear();
//mCurrentParcel->mRenterList.reset();
- mSelectedDwell = 0.f;
+ mSelectedDwell = DWELL_NAN;
// invalidate parcel selection so that existing users of this selection can clean up
mCurrentParcelSelection->setParcel(NULL);
@@ -1663,7 +1663,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
LLViewerParcelMgr::getInstance()->requestParcelMediaURLFilter();
// Request dwell for this land, if it's not public land.
- LLViewerParcelMgr::getInstance()->mSelectedDwell = 0.f;
+ LLViewerParcelMgr::getInstance()->mSelectedDwell = DWELL_NAN;
if (0 != local_id)
{
LLViewerParcelMgr::getInstance()->sendParcelDwellRequest();
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 68d8978ea8..cac8d8391c 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -43,6 +43,8 @@ class LLParcel;
class LLViewerTexture;
class LLViewerRegion;
+const F32 DWELL_NAN = -1.0f; // A dwell having this value will be displayed as Loading...
+
// Constants for sendLandOwner
//const U32 NO_NEIGHBOR_JOIN = 0x0;
//const U32 ALL_NEIGHBOR_JOIN = U32( NORTH_MASK
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index eaffbf5fa6..1c7b354221 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -487,7 +487,7 @@
name="DwellText"
top_delta="0"
width="186">
- 0
+ Loading...
Date: Fri, 28 Oct 2011 16:26:20 -0500
Subject: SH-2633 Fix for avatar hair turning white when editing appearance
---
indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl | 5 +++--
.../app_settings/shaders/class1/deferred/avatarAlphaV.glsl | 10 ++++++----
.../app_settings/shaders/class1/objects/simpleNoColorV.glsl | 6 ++++--
.../app_settings/shaders/class2/deferred/avatarAlphaV.glsl | 7 ++++---
.../shaders/class2/windlight/atmosphericsVarsV.glsl | 4 +++-
indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl | 6 ++++--
6 files changed, 24 insertions(+), 14 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
index 2901e18db8..19203ab670 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
@@ -32,6 +32,7 @@ ATTRIBUTE vec2 texcoord0;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+uniform vec4 color;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
@@ -61,8 +62,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0,0,0,0));
- vertex_color = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0,0,0,0));
+ vertex_color = col;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
index acbc3f7e15..d7b90978ba 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
@@ -52,6 +52,8 @@ VARYING vec2 vary_texcoord0;
uniform float near_clip;
+uniform vec4 color;
+
uniform vec4 light_position[8];
uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
@@ -123,17 +125,17 @@ void main()
col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb;
+ vary_pointlight_col = col.rgb*color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb;
- vary_directional = atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
+ vary_ambient = col.rgb*color.rgb;
+ vary_directional = color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
- col.rgb = min(col.rgb, 1.0);
+ col.rgb = col.rgb * color.rgb;
vertex_color = col;
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
index 706627e175..0be52a52af 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
@@ -28,6 +28,8 @@ uniform mat4 texture_matrix0;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
+uniform vec4 color;
+
ATTRIBUTE vec3 position;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec2 texcoord0;
@@ -50,8 +52,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.));
- vertex_color = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0.));
+ vertex_color = col;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
index 63c7a6b13d..9c7a332417 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
@@ -49,6 +49,7 @@ VARYING vec3 vary_pointlight_col;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+uniform vec4 color;
uniform float near_clip;
uniform float shadow_offset;
@@ -125,17 +126,17 @@ void main()
col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb;
+ vary_pointlight_col = col.rgb*color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb;
+ vary_ambient = col.rgb*color.rgb;
vary_directional = atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
- col.rgb = min(col.rgb, 1.0);
+ col.rgb = col.rgb*color.rgb;
vertex_color = col;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
index 01605e5b25..ba2ed6b1ce 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -27,6 +27,7 @@
VARYING vec3 vary_AdditiveColor;
VARYING float vary_AtmosAttenuation;
+vec3 additive_color;
vec3 atmos_attenuation;
vec3 sunlit_color;
vec3 amblit_color;
@@ -43,7 +44,7 @@ vec3 getAmblitColor()
vec3 getAdditiveColor()
{
- return vary_AdditiveColor;
+ return additive_color;
}
vec3 getAtmosAttenuation()
{
@@ -72,6 +73,7 @@ void setAmblitColor(vec3 v)
void setAdditiveColor(vec3 v)
{
+ additive_color = v;
vary_AdditiveColor = v;
}
diff --git a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
index 7fb3cb6552..721054b5ad 100644
--- a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
@@ -37,6 +37,8 @@ vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
void calcAtmospherics(vec3 inPositionEye);
+uniform vec4 color;
+
uniform vec4 gWindDir;
uniform vec4 gSinWaveParams;
uniform vec4 gGravity;
@@ -125,8 +127,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.0));
- vertex_color = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0.0));
+ vertex_color = col;
gl_Position = projection_matrix * pos;
}
--
cgit v1.2.3
From 4cdf3961253b49093bf3e2fceda0099cedef4295 Mon Sep 17 00:00:00 2001
From: Jonathan Yap
Date: Fri, 28 Oct 2011 17:48:24 -0400
Subject: STORM-591 As a music fan, I want audio to fade in gently so my
immersion is increased Co-written with Robin Cornelius
---
indra/newview/app_settings/settings.xml | 22 ++
indra/newview/lloverlaybar.cpp | 378 --------------------------------
indra/newview/lloverlaybar.h | 95 --------
indra/newview/llpanelnearbymedia.cpp | 24 +-
indra/newview/llpanelnearbymedia.h | 1 -
indra/newview/llvieweraudio.cpp | 211 +++++++++++++++++-
indra/newview/llvieweraudio.h | 41 ++++
indra/newview/llviewermedia.cpp | 22 +-
indra/newview/llviewerparcelmgr.cpp | 55 +++--
9 files changed, 320 insertions(+), 529 deletions(-)
delete mode 100644 indra/newview/lloverlaybar.cpp
delete mode 100644 indra/newview/lloverlaybar.h
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3c53a9d44c..c7300cc1bb 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -192,6 +192,28 @@
Value
1
+ AudioMusicFadeIn
+
+ Comment
+ Fade in time in seconds for music streams
+ Persist
+ 1
+ Type
+ F32
+ Value
+ 5.0
+
+ AudioMusicFadeOut
+
+ Comment
+ Fade out time in seconds for music streams
+ Persist
+ 1
+ Type
+ F32
+ Value
+ 5.0
+
AudioLevelAmbient
Comment
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp
deleted file mode 100644
index c2bbec0470..0000000000
--- a/indra/newview/lloverlaybar.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-/**
- * @file lloverlaybar.cpp
- * @brief LLOverlayBar class implementation
- *
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-// Temporary buttons that appear at the bottom of the screen when you
-// are in a mode.
-
-#include "llviewerprecompiledheaders.h"
-
-#include "lloverlaybar.h"
-
-#include "llaudioengine.h"
-#include "llrender.h"
-#include "llagent.h"
-#include "llbutton.h"
-#include "llfocusmgr.h"
-#include "llimview.h"
-#include "llmediaremotectrl.h"
-#include "llparcel.h"
-#include "lltextbox.h"
-#include "llui.h"
-#include "llviewercontrol.h"
-#include "llviewertexturelist.h"
-#include "llviewerjoystick.h"
-#include "llviewermedia.h"
-#include "llviewermenu.h" // handle_reset_view()
-#include "llviewermedia.h"
-#include "llviewerparcelmedia.h"
-#include "llviewerparcelmgr.h"
-#include "lluictrlfactory.h"
-#include "llviewerwindow.h"
-#include "llvoiceclient.h"
-#include "llvoavatarself.h"
-#include "llvoiceremotectrl.h"
-#include "llmediactrl.h"
-#include "llselectmgr.h"
-
-//
-// Globals
-//
-
-LLOverlayBar *gOverlayBar = NULL;
-
-extern S32 MENU_BAR_HEIGHT;
-
-//
-// Functions
-//
-
-
-
-void* LLOverlayBar::createMediaRemote(void* userdata)
-{
- LLOverlayBar *self = (LLOverlayBar*)userdata;
- self->mMediaRemote = new LLMediaRemoteCtrl ();
- return self->mMediaRemote;
-}
-
-void* LLOverlayBar::createVoiceRemote(void* userdata)
-{
- LLOverlayBar *self = (LLOverlayBar*)userdata;
- self->mVoiceRemote = new LLVoiceRemoteCtrl();
- return self->mVoiceRemote;
-}
-
-LLOverlayBar::LLOverlayBar()
- : LLPanel(),
- mMediaRemote(NULL),
- mVoiceRemote(NULL),
- mMusicState(STOPPED)
-{
- setMouseOpaque(FALSE);
- setIsChrome(TRUE);
-
- mBuilt = false;
-
- mFactoryMap["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this);
- mFactoryMap["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this);
-
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml");
-}
-
-BOOL LLOverlayBar::postBuild()
-{
- childSetAction("Set Not Busy",onClickSetNotBusy,this);
- childSetAction("Mouselook",onClickMouselook,this);
- childSetAction("Stand Up",onClickStandUp,this);
- childSetAction("Flycam",onClickFlycam,this);
- childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
-
- mVoiceRemote->expandOrCollapse();
- mMediaRemote->expandOrCollapse();
-
- setFocusRoot(TRUE);
- mBuilt = true;
-
- layoutButtons();
- return TRUE;
-}
-
-LLOverlayBar::~LLOverlayBar()
-{
- // LLView destructor cleans up children
-}
-
-// virtual
-void LLOverlayBar::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
- LLView::reshape(width, height, called_from_parent);
-
- if (mBuilt)
- {
- layoutButtons();
- }
-}
-
-void LLOverlayBar::layoutButtons()
-{
- LLView* state_buttons_panel = getChildView("state_buttons");
-
- if (state_buttons_panel->getVisible())
- {
- LLViewQuery query;
- LLWidgetTypeFilter widget_filter;
- query.addPreFilter(LLEnabledFilter::getInstance());
- query.addPreFilter(&widget_filter);
-
- child_list_t button_list = query(state_buttons_panel);
-
- const S32 MAX_BAR_WIDTH = 600;
- S32 bar_width = llclamp(state_buttons_panel->getRect().getWidth(), 0, MAX_BAR_WIDTH);
-
- // calculate button widths
- const S32 MAX_BUTTON_WIDTH = 150;
- const S32 STATUS_BAR_PAD = 10;
- S32 segment_width = llclamp(lltrunc((F32)(bar_width) / (F32)button_list.size()), 0, MAX_BUTTON_WIDTH);
- S32 btn_width = segment_width - STATUS_BAR_PAD;
-
- // Evenly space all buttons, starting from left
- S32 left = 0;
- S32 bottom = 1;
-
- for (child_list_reverse_iter_t child_iter = button_list.rbegin();
- child_iter != button_list.rend(); ++child_iter)
- {
- LLView *view = *child_iter;
- LLRect r = view->getRect();
- r.setOriginAndSize(left, bottom, btn_width, r.getHeight());
- view->setRect(r);
- left += segment_width;
- }
- }
-}
-
-// Per-frame updates of visibility
-void LLOverlayBar::refresh()
-{
- BOOL buttons_changed = FALSE;
-
- BOOL im_received = gIMMgr->getIMReceived();
- LLButton* button = getChild("IM Received");
- if (button && button->getVisible() != im_received)
- {
- button->setVisible(im_received);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL busy = gAgent.getBusy();
- button = getChild("Set Not Busy");
- if (button && button->getVisible() != busy)
- {
- button->setVisible(busy);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL flycam = LLViewerJoystick::getInstance()->getOverrideCamera();
- button = getChild("Flycam");
- if (button && button->getVisible() != flycam)
- {
- button->setVisible(flycam);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL mouselook_grabbed;
- mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX)
- || gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX);
- button = getChild("Mouselook");
-
- if (button && button->getVisible() != mouselook_grabbed)
- {
- button->setVisible(mouselook_grabbed);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL sitting = FALSE;
- if (gAgent.getAvatarObject())
- {
- sitting = gAgent.getAvatarObject()->isSitting();
- }
- button = getChild("Stand Up");
-
- if (button && button->getVisible() != sitting)
- {
- button->setVisible(sitting);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
-
- moveChildToBackOfTabGroup(mMediaRemote);
- moveChildToBackOfTabGroup(mVoiceRemote);
-
- // turn off the whole bar in mouselook
- if (gAgent.cameraMouselook())
- {
- childSetVisible("media_remote_container", FALSE);
- childSetVisible("voice_remote_container", FALSE);
- childSetVisible("state_buttons", FALSE);
- }
- else
- {
- // update "remotes"
- childSetVisible("media_remote_container", TRUE);
- childSetVisible("voice_remote_container", LLVoiceClient::getInstance()->voiceEnabled());
- childSetVisible("state_buttons", TRUE);
- }
-
- // always let user toggle into and out of chatbar
- childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
-
- if (buttons_changed)
- {
- layoutButtons();
- }
-}
-
-//-----------------------------------------------------------------------
-// Static functions
-//-----------------------------------------------------------------------
-
-// static
-void LLOverlayBar::onClickSetNotBusy(void*)
-{
- gAgent.clearBusy();
-}
-
-
-// static
-void LLOverlayBar::onClickFlycam(void*)
-{
- LLViewerJoystick::getInstance()->toggleFlycam();
-}
-
-// static
-void LLOverlayBar::onClickResetView(void* data)
-{
- handle_reset_view();
-}
-
-//static
-void LLOverlayBar::onClickMouselook(void*)
-{
- gAgent.changeCameraToMouselook();
-}
-
-//static
-void LLOverlayBar::onClickStandUp(void*)
-{
- LLSelectMgr::getInstance()->deselectAllForStandingUp();
- gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// static media helpers
-// *TODO: Move this into an audio manager abstraction
-//static
-void LLOverlayBar::mediaStop(void*)
-{
- if (!gOverlayBar)
- {
- // return;
- }
- LLViewerParcelMedia::stop();
-}
-//static
-void LLOverlayBar::toggleMediaPlay(void*)
-{
- if (!gOverlayBar)
- {
- // return;
- }
-
-
- if (LLViewerParcelMedia::getStatus() == LLViewerMediaImpl::MEDIA_PAUSED)
- {
- LLViewerParcelMedia::start();
- }
- else if(LLViewerParcelMedia::getStatus() == LLViewerMediaImpl::MEDIA_PLAYING)
- {
- LLViewerParcelMedia::pause();
- }
- else
- {
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (parcel)
- {
- LLViewerParcelMedia::play(parcel);
- }
- }
-}
-
-//static
-void LLOverlayBar::toggleMusicPlay(void*)
-{
- if (gAudiop->isInternetStreamPlaying() != 1)
- {
- if (gAudiop)
- {
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if ( parcel )
- {
- // this doesn't work properly when crossing parcel boundaries - even when the
- // stream is stopped, it doesn't return the right thing - commenting out for now.
- // if ( gAudiop->isInternetStreamPlaying() == 0 )
- {
- gAudiop->startInternetStream(parcel->getMusicURL());
- }
- }
- }
- }
- //else
- //{
- // gOverlayBar->mMusicState = PAUSED; // desired state
- // if (gAudiop)
- // {
- // gAudiop->pauseInternetStream(1);
- // }
- //}
- else
- {
- if (gAudiop)
- {
- gAudiop->stopInternetStream();
- }
- }
-}
-
diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h
deleted file mode 100644
index b36f5ebb73..0000000000
--- a/indra/newview/lloverlaybar.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * @file lloverlaybar.h
- * @brief LLOverlayBar class definition
- *
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLOVERLAYBAR_H
-#define LL_LLOVERLAYBAR_H
-
-#include "llpanel.h"
-
-// "Constants" loaded from settings.xml at start time
-extern S32 STATUS_BAR_HEIGHT;
-
-class LLButton;
-class LLLineEditor;
-class LLMediaRemoteCtrl;
-class LLMessageSystem;
-class LLTextBox;
-class LLTextEditor;
-class LLUICtrl;
-class LLUUID;
-class LLFrameTimer;
-class LLStatGraph;
-class LLSlider;
-class LLVoiceRemoteCtrl;
-
-class LLOverlayBar
-: public LLPanel
-{
-public:
- LLOverlayBar();
- ~LLOverlayBar();
-
- /*virtual*/ void refresh();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
- /*virtual*/ BOOL postBuild();
-
- void layoutButtons();
-
- // helpers for returning desired state
- BOOL musicPlaying() { return mMusicState == PLAYING; }
-
- static void onClickSetNotBusy(void* data);
- static void onClickMouselook(void* data);
- static void onClickStandUp(void* data);
- static void onClickResetView(void* data);
- static void onClickFlycam(void* data);
-
- //static media helper functions
- static void toggleMediaPlay(void*);
- static void toggleMusicPlay(void*);
- static void musicPause(void*);
- static void musicStop(void*);
- static void mediaStop(void*);
-
- static void toggleAudioVolumeFloater(void*);
-
-protected:
- static void* createMediaRemote(void* userdata);
- static void* createVoiceRemote(void* userdata);
-
- void enableMediaButtons();
-
-protected:
- LLMediaRemoteCtrl* mMediaRemote;
- LLVoiceRemoteCtrl* mVoiceRemote;
- bool mBuilt; // dialog constructed yet?
- enum { STOPPED=0, PLAYING=1, PAUSED=2 };
- S32 mMusicState;
-};
-
-extern LLOverlayBar* gOverlayBar;
-
-#endif
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 2bbd15ae11..53fc64f089 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -52,6 +52,7 @@
#include "llvovolume.h"
#include "llstatusbar.h"
#include "llsdutil.h"
+#include "llvieweraudio.h"
#include "llfloaterreg.h"
#include "llfloaterpreference.h" // for the gear icon
@@ -808,7 +809,7 @@ bool LLPanelNearByMedia::setDisabled(const LLUUID &row_id, bool disabled)
if (row_id == PARCEL_AUDIO_LIST_ITEM_UUID)
{
if (disabled) onClickParcelAudioStop();
- else onClickParcelAudioStart();
+ else onClickParcelAudioPlay();
return true;
}
else if (row_id == PARCEL_MEDIA_LIST_ITEM_UUID)
@@ -857,24 +858,11 @@ void LLPanelNearByMedia::onClickParcelMediaPause()
LLViewerParcelMedia::pause();
}
-void LLPanelNearByMedia::onClickParcelAudioStart()
-{
- // User *explicitly* started the internet stream, so keep the stream
- // playing and updated as they cross to other parcels etc.
- mParcelAudioAutoStart = true;
-
- if (!gAudiop)
- return;
-
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
-}
-
void LLPanelNearByMedia::onClickParcelAudioPlay()
{
// User *explicitly* started the internet stream, so keep the stream
// playing and updated as they cross to other parcels etc.
mParcelAudioAutoStart = true;
-
if (!gAudiop)
return;
@@ -883,8 +871,9 @@ void LLPanelNearByMedia::onClickParcelAudioPlay()
// 'false' means unpause
gAudiop->pauseInternetStream(false);
}
- else {
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
}
}
@@ -894,11 +883,10 @@ void LLPanelNearByMedia::onClickParcelAudioStop()
// re-start audio when i.e. they move to another parcel, until
// they explicitly start it again.
mParcelAudioAutoStart = false;
-
if (!gAudiop)
return;
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
void LLPanelNearByMedia::onClickParcelAudioPause()
diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h
index be4d313743..c3634de9b4 100644
--- a/indra/newview/llpanelnearbymedia.h
+++ b/indra/newview/llpanelnearbymedia.h
@@ -115,7 +115,6 @@ private:
void onClickParcelMediaPause();
void onClickParcelAudioPlay();
void onClickParcelAudioStop();
- void onClickParcelAudioStart();
void onClickParcelAudioPause();
void onCheckAutoPlay();
void onAdvancedButtonClick();
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index f7fa5690d6..8fd1ca3807 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -37,9 +37,212 @@
#include "llvoiceclient.h"
#include "llviewermedia.h"
#include "llprogressview.h"
+#include "llcallbacklist.h"
/////////////////////////////////////////////////////////
+LLViewerAudio::LLViewerAudio() :
+ mDone(true),
+ mFadeState(FADE_IDLE),
+ mFadeTime(),
+ mIdleListnerActive(false)
+{
+}
+
+LLViewerAudio::~LLViewerAudio()
+{
+}
+
+void LLViewerAudio::registerIdleListener()
+{
+ if(mIdleListnerActive==false)
+ {
+ mIdleListnerActive = true;
+ doOnIdleRepeating(boost::bind(boost::bind(&LLViewerAudio::onIdleUpdate, this)));
+ }
+
+}
+
+void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI)
+{
+ llinfos << "DBG streamURI: " << streamURI << llendl;
+ llinfos << "DBG mNextStreamURI: " << mNextStreamURI << llendl;
+ if (mFadeState == FADE_OUT) {llinfos << "DBG mFadeState: FADE_OUT " << llendl;}
+ if (mFadeState == FADE_IN) {llinfos << "DBG mFadeState: FADE_IN " << llendl;}
+ if (mFadeState == FADE_IDLE) {llinfos << "DBG mFadeState: FADE_IDLE " << llendl;}
+
+ // Old and new stream are identical
+ if (mNextStreamURI == streamURI)
+ {
+ return;
+ }
+
+ // Record the URI we are going to be switching to
+ mNextStreamURI = streamURI;
+
+ if (mFadeState == FADE_IDLE)
+ {
+ // If a stream is playing fade it out first
+ if (!gAudiop->getInternetStreamURL().empty())
+ {
+ mFadeState = FADE_OUT;
+llinfos << "DBG new mFadeState: OUT" << llendl;
+ }
+ // Otherwise the new stream can be faded in
+ else
+ {
+ mFadeState = FADE_IN;
+llinfos << "DBG new mFadeState: IN" << llendl;
+
+ gAudiop->startInternetStream(mNextStreamURI);
+ startFading();
+ registerIdleListener();
+ return;
+ }
+ }
+
+ if (mFadeState == FADE_OUT)
+ {
+ startFading();
+ registerIdleListener();
+ return;
+ }
+
+ if (mFadeState == FADE_IN)
+ {
+ registerIdleListener();
+ return;
+ }
+}
+
+// We want onIdleUpdate callback to keep firing whilst we are fading out. Once we have completed the fade
+// out, we switch the stream and start a fade in, and we don't care about idle updates anymore.
+// A return of false from onIdleUpdate means it will be called again next idle update.
+// A return of true means we have finished with it and the callback will be deleted.
+bool LLViewerAudio::onIdleUpdate()
+{
+ if (mDone)
+ {
+ if (mFadeState == FADE_OUT) {llinfos << "DBG mFadeState: FADE_OUT " << llendl;}
+ if (mFadeState == FADE_IN) {llinfos << "DBG mFadeState: FADE_IN " << llendl;}
+ if (mFadeState == FADE_IDLE) {llinfos << "DBG mFadeState: FADE_IDLE " << llendl;}
+
+ // This should be a rare or never occurring state.
+ if (mFadeState == FADE_IDLE)
+ {
+ deregisterIdleListener();
+ return true; // Stop calling onIdleUpdate
+ }
+
+ // we have finished the current fade operation
+ if (mFadeState == FADE_OUT)
+ {
+ // Clear URI
+ gAudiop->startInternetStream(LLStringUtil::null);
+ gAudiop->stopInternetStream();
+
+ if (!mNextStreamURI.empty())
+ {
+ mFadeState = FADE_IN;
+llinfos << "DBG new mFadeState: IN" << llendl;
+ gAudiop->startInternetStream(mNextStreamURI);
+ startFading();
+ return false;
+ }
+ else
+ {
+ mFadeState = FADE_IDLE;
+llinfos << "DBG new mFadeState: IDLE" << llendl;
+ deregisterIdleListener();
+ return true; // Stop calling onIdleUpdate
+ }
+ }
+ else if (mFadeState == FADE_IN)
+ {
+ if (mNextStreamURI != gAudiop->getInternetStreamURL())
+ {
+ mFadeState = FADE_OUT;
+ startFading();
+ return false;
+llinfos << "DBG new mFadeState: OUT" << llendl;
+ }
+ else
+ {
+ mFadeState = FADE_IDLE;
+llinfos << "DBG new mFadeState: IDLE" << llendl;
+ deregisterIdleListener();
+ return true; // Stop calling onIdleUpdate
+ }
+ }
+ }
+
+ return false;
+}
+
+void LLViewerAudio::stopInternetStreamWithAutoFade()
+{
+llinfos << "DBG stopping stream" << llendl;
+ mFadeState = FADE_IDLE;
+llinfos << "DBG new mFadeState: IDLE" << llendl;
+ mNextStreamURI = LLStringUtil::null;
+ mDone = true;
+llinfos << "DBG mDone: true" << llendl;
+
+ gAudiop->startInternetStream(LLStringUtil::null);
+ gAudiop->stopInternetStream();
+}
+
+void LLViewerAudio::startFading()
+{
+llinfos << "DBG startFading" << llendl;
+
+ if(mDone)
+ {
+ // The fade state here should only be one of FADE_IN or FADE_OUT, but, in case it is not,
+ // rather than check for both states assume a fade in and check for the fade out case.
+ mFadeTime = llmax(0.0f, gSavedSettings.getF32("AudioMusicFadeIn"));
+ if (LLViewerAudio::getInstance()->getFadeState() == LLViewerAudio::FADE_OUT)
+ {
+ mFadeTime = llmax(0.0f, gSavedSettings.getF32("AudioMusicFadeOut"));
+ }
+ stream_fade_timer.reset();
+ stream_fade_timer.setTimerExpirySec(mFadeTime);
+ mDone = false;
+llinfos << "DBG mDone: false" << llendl;
+ }
+}
+
+F32 LLViewerAudio::getFadeVolume()
+{
+ F32 fade_volume = 1.0f;
+
+ if (stream_fade_timer.hasExpired())
+ {
+ mDone = true;
+ // If we have been fading out set volume to 0 until the next fade state occurs to prevent
+ // an audio transient.
+ if (LLViewerAudio::getInstance()->getFadeState() == LLViewerAudio::FADE_OUT)
+ {
+ fade_volume = 0.0f;
+ }
+ }
+
+ if (!mDone)
+ {
+ // Calculate how far we are into the fade time
+ fade_volume = stream_fade_timer.getElapsedTimeF32() / mFadeTime;
+
+ if (LLViewerAudio::getInstance()->getFadeState() == LLViewerAudio::FADE_OUT)
+ {
+ // If we are not fading in then we are fading out, so invert the fade
+ // direction; start loud and move towards zero volume.
+ fade_volume = 1.0f - fade_volume;
+ }
+ }
+
+ return fade_volume;
+}
+
void init_audio()
{
if (!gAudiop)
@@ -145,9 +348,11 @@ void audio_update_volume(bool force_update)
{
F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");
BOOL music_muted = gSavedSettings.getBOOL("MuteMusic");
- music_volume = mute_volume * master_volume * music_volume;
- gAudiop->setInternetStreamGain ( music_muted || progress_view_visible ? 0.f : music_volume );
-
+ F32 fade_volume = LLViewerAudio::getInstance()->getFadeVolume();
+llinfos << "DBG fade_volume:" << fade_volume << llendl;
+
+ music_volume = mute_volume * master_volume * music_volume * fade_volume;
+ gAudiop->setInternetStreamGain (music_muted ? 0.f : music_volume);
}
// Streaming Media
diff --git a/indra/newview/llvieweraudio.h b/indra/newview/llvieweraudio.h
index e5916285fb..316d7b32d2 100644
--- a/indra/newview/llvieweraudio.h
+++ b/indra/newview/llvieweraudio.h
@@ -27,6 +27,10 @@
#ifndef LL_VIEWERAUDIO_H
#define LL_VIEWERAUDIO_H
+#include "llframetimer.h"
+#include "llthread.h"
+#include "llsingleton.h"
+
// comment out to turn off wind
#define kAUDIO_ENABLE_WIND
//#define kAUDIO_ENABLE_WATER 1 // comment out to turn off water
@@ -38,4 +42,41 @@ void audio_update_volume(bool force_update = true);
void audio_update_listener();
void audio_update_wind(bool force_update = true);
+class LLViewerAudio : public LLSingleton
+{
+public:
+
+ enum EFadeState
+ {
+ FADE_IDLE,
+ FADE_IN,
+ FADE_OUT,
+ };
+
+ LLViewerAudio();
+ virtual ~LLViewerAudio();
+
+ void startInternetStreamWithAutoFade(std::string streamURI);
+ void stopInternetStreamWithAutoFade();
+
+ bool LLViewerAudio::onIdleUpdate();
+
+ EFadeState getFadeState() { return mFadeState; }
+ bool isDone() { return mDone; };
+ F32 getFadeVolume();
+
+private:
+
+ bool mDone;
+ F32 mFadeTime;
+ std::string mNextStreamURI;
+ EFadeState mFadeState;
+ LLFrameTimer stream_fade_timer;
+ bool mIdleListnerActive;
+
+ void registerIdleListener();
+ void deregisterIdleListener() { mIdleListnerActive = false; };
+ void startFading();
+};
+
#endif //LL_VIEWER_H
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 41b4dc01e8..148bfbf080 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -66,7 +66,7 @@
//#include "llfirstuse.h"
#include "llviewernetwork.h"
#include "llwindow.h"
-
+#include "llvieweraudio.h"
#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows.
#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows.
@@ -967,7 +967,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
{
if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
{
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
}
pimpl->setPriority(new_priority);
@@ -1069,13 +1069,24 @@ void LLViewerMedia::setAllMediaEnabled(bool val)
gAudiop &&
LLViewerMedia::hasParcelAudio())
{
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
+ if (LLAudioEngine::AUDIO_PAUSED == gAudiop->isInternetStreamPlaying())
+ {
+ // 'false' means unpause
+ gAudiop->pauseInternetStream(false);
+ }
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
+ }
}
}
else {
// This actually unloads the impl, as opposed to "stop"ping the media
LLViewerParcelMedia::stop();
- if (gAudiop) gAudiop->stopInternetStream();
+ if (gAudiop)
+ {
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
+ }
}
}
@@ -1488,8 +1499,7 @@ void LLViewerMedia::setOpenIDCookie()
new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()),
headers);
- // FUI: No longer perform the user_status query
- //doOnetimeEarlyHTTPRequests();
+ doOnetimeEarlyHTTPRequests();
}
}
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 8db72da1ee..928a84e7eb 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -67,6 +67,7 @@
#include "llworld.h"
#include "roles_constants.h"
#include "llweb.h"
+#include "llvieweraudio.h"
const F32 PARCEL_COLLISION_DRAW_SECS = 1.f;
@@ -1725,7 +1726,11 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
else
{
- // look for music.
+ // Check for video
+ LLViewerParcelMedia::update( parcel );
+
+ // Then check for music. Do this last, as there may be a delay waiting for
+ // the stream fading thread to finish.
if (gAudiop)
{
if (parcel)
@@ -1736,46 +1741,36 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
std::string music_url = music_url_raw;
LLStringUtil::trim(music_url);
- // On entering a new parcel, stop the last stream if the
- // new parcel has a different music url. (Empty URL counts
- // as different.)
const std::string& stream_url = gAudiop->getInternetStreamURL();
- if (music_url.empty() || music_url != stream_url)
+ // If there is a new music URL and it's valid, play it.
+ if (music_url.size() > 12)
{
- // URL is different from one currently playing.
- gAudiop->stopInternetStream();
-
- // If there is a new music URL and it's valid, play it.
- if (music_url.size() > 12)
+ if (music_url.substr(0,7) == "http://")
{
- if (music_url.substr(0,7) == "http://")
- {
- optionally_start_music(music_url);
- }
- else
- {
- llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl;
- // clears the URL
- gAudiop->startInternetStream(LLStringUtil::null);
- }
+ optionally_start_music(music_url);
}
- else if (!gAudiop->getInternetStreamURL().empty())
+ else
{
- llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
- gAudiop->startInternetStream(LLStringUtil::null);
+ llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl;
+ // clears the URL
+ // null value causes fade out
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
}
}
+ else if (!gAudiop->getInternetStreamURL().empty())
+ {
+ llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
+ // null value causes fade out
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
+ }
}
else
{
// Public land has no music
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
}//if gAudiop
-
- // now check for video
- LLViewerParcelMedia::update( parcel );
};
}
@@ -1794,7 +1789,11 @@ void optionally_start_music(const std::string& music_url)
gSavedSettings.getBOOL("MediaTentativeAutoPlay")))
{
llinfos << "Starting parcel music " << music_url << llendl;
- gAudiop->startInternetStream(music_url);
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(music_url);
+ }
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
}
}
}
--
cgit v1.2.3
From 5663f41a7a3dafb4650b49ebc0c86140136239cd Mon Sep 17 00:00:00 2001
From: Jonathan Yap
Date: Fri, 28 Oct 2011 17:54:42 -0400
Subject: STORM-591 Fix minor merge error regression
---
indra/newview/llviewermedia.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 148bfbf080..a85f70b599 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1499,7 +1499,8 @@ void LLViewerMedia::setOpenIDCookie()
new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()),
headers);
- doOnetimeEarlyHTTPRequests();
+ // FUI: No longer perform the user_status query
+ //doOnetimeEarlyHTTPRequests();
}
}
--
cgit v1.2.3
From c8f88d1d595d3ca0fdf504c1d365edd191791237 Mon Sep 17 00:00:00 2001
From: Jonathan Yap
Date: Fri, 28 Oct 2011 19:04:20 -0400
Subject: STORM-1674 Set Help ID for new Translaton Settings floater
---
indra/newview/skins/default/xui/en/floater_translation_settings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
index c03f751265..a212ce7889 100644
--- a/indra/newview/skins/default/xui/en/floater_translation_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -4,7 +4,7 @@
height="310"
layout="topleft"
name="floater_translation_settings"
- help_topic="environment_editor_floater"
+ help_topic="translation_settings"
save_rect="true"
title="CHAT TRANSLATION SETTINGS"
width="485">
--
cgit v1.2.3
From e1023d614c7e9b0a1619e1ff917dbc37fa344aa8 Mon Sep 17 00:00:00 2001
From: eli
Date: Fri, 28 Oct 2011 16:27:34 -0700
Subject: sync with viewer-development
---
.../newview/skins/default/xui/da/floater_about.xml | 2 +-
.../xui/en/floater_translation_settings.xml | 244 +++++++++++++++++++++
indra/newview/skins/default/xui/en/menu_viewer.xml | 10 +
.../default/xui/en/panel_preferences_chat.xml | 127 +----------
indra/newview/skins/default/xui/en/strings.xml | 6 +
.../newview/skins/default/xui/pl/floater_about.xml | 2 +-
indra/newview/skins/default/xui/ru/strings.xml | 2 +-
.../newview/skins/default/xui/zh/floater_about.xml | 2 +-
8 files changed, 276 insertions(+), 119 deletions(-)
create mode 100644 indra/newview/skins/default/xui/en/floater_translation_settings.xml
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml
index 0ccaab73ba..fc8bc33096 100644
--- a/indra/newview/skins/default/xui/da/floater_about.xml
+++ b/indra/newview/skins/default/xui/da/floater_about.xml
@@ -10,7 +10,7 @@
Du er ved [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] i regionen [REGION] lokaliseret ved <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
CPU: [CPU]
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
new file mode 100644
index 0000000000..c03f751265
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -0,0 +1,244 @@
+
+
+
+ Bing appID not verified. Please try again.
+ Google API key not verified. Please try again.
+
+ Bing appID verified.
+ Google API key verified.
+
+
+
+ Translate chat into:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Choose translation service:
+
+
+
+
+
+
+
+
+ Bing [http://www.bing.com/developers/createapp.aspx AppID]:
+
+
+
+
+
+ Google [http://code.google.com/apis/language/translate/v2/getting_started.html#auth API key]:
+
+
+
+
+
+ [http://code.google.com/apis/language/translate/v2/pricing.html Pricing] | [https://code.google.com/apis/console Stats]
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 63e50b0b9f..01f9c23afd 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2437,6 +2437,16 @@
parameter="raycast" />
+
+
+
+
-
-
-
-
- Use machine translation while chatting (powered by Google)
-
-
- Translate chat into:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index c4031de0f8..24cec13c4c 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2183,6 +2183,8 @@ Returns a string with the requested data about the region
Stomach
Left Pec
Right Pec
+ Neck
+ Avatar Center
Invalid Attachment Point
@@ -3529,6 +3531,10 @@ Try enclosing path to the editor with double quotes.
Error parsing the external editor command.
External editor failed to run.
+
+ Translation failed: [REASON]
+ Error parsing translation response.
+
Esc
Space
diff --git a/indra/newview/skins/default/xui/pl/floater_about.xml b/indra/newview/skins/default/xui/pl/floater_about.xml
index 637325ddd0..409429ffaa 100644
--- a/indra/newview/skins/default/xui/pl/floater_about.xml
+++ b/indra/newview/skins/default/xui/pl/floater_about.xml
@@ -10,7 +10,7 @@
Położenie [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] w [REGION] zlokalizowanym w <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
Procesor: [CPU]
diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml
index d52cee6b0d..0134298166 100644
--- a/indra/newview/skins/default/xui/ru/strings.xml
+++ b/indra/newview/skins/default/xui/ru/strings.xml
@@ -4252,7 +4252,7 @@ support@secondlife.com.
Женщина – ух ты!
- /поклониться
+ /поклон
/хлопнуть
diff --git a/indra/newview/skins/default/xui/zh/floater_about.xml b/indra/newview/skins/default/xui/zh/floater_about.xml
index 0ac85d399e..7e19c124a1 100644
--- a/indra/newview/skins/default/xui/zh/floater_about.xml
+++ b/indra/newview/skins/default/xui/zh/floater_about.xml
@@ -10,7 +10,7 @@
You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
CPU:[CPU]
--
cgit v1.2.3
From 403cdb863d8ebc4ba059ebb07e689e16f963b443 Mon Sep 17 00:00:00 2001
From: Jonathan Yap
Date: Fri, 28 Oct 2011 22:04:20 -0400
Subject: =?UTF-8?q?STORM-1222=20System=20message=20when=20trying=20to=20te?=
=?UTF-8?q?leport=20back=20to=20Welcome=20Island=20isn=C2=B4t=20localized?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
indra/newview/skins/default/xui/da/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/de/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/en/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/es/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/fr/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/it/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/ja/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/pl/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/pt/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/ru/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/tr/teleport_strings.xml | 4 ++++
indra/newview/skins/default/xui/zh/teleport_strings.xml | 4 ++++
12 files changed, 48 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/da/teleport_strings.xml b/indra/newview/skins/default/xui/da/teleport_strings.xml
index 071aab46f4..0d89fae986 100644
--- a/indra/newview/skins/default/xui/da/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/da/teleport_strings.xml
@@ -19,6 +19,10 @@ Hvis du stadig ikke kan teleporte, prøv venligst at logge ud og ligge ind for a
Beklager, systemet kunne ikke fuldføre teleport forbindelse.
Prøv igen om lidt.
+
+
+ Du kan ikke teleportere tilbage til Welcome Island.
+Gå til 'Welcome Island Puclic' for at prøve tutorial igen.
Beklager, du har ikke adgang til denne teleport destination.
diff --git a/indra/newview/skins/default/xui/de/teleport_strings.xml b/indra/newview/skins/default/xui/de/teleport_strings.xml
index 69c952c532..bbfc830688 100644
--- a/indra/newview/skins/default/xui/de/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/de/teleport_strings.xml
@@ -19,6 +19,10 @@ Wenn der Teleport dann immer noch nicht funktioniert, melden Sie sich bitte ab u
Das System konnte keine Teleport-Verbindung herstellen.
Versuchen Sie es später noch einmal.
+
+
+ Sie können nicht zurück nach Welcome Island teleportieren.
+Gehen Sie zu „Welcome Island Public“ und wiederholen sie das Tutorial.
Sie haben leider keinen Zugang zu diesem Teleport-Ziel.
diff --git a/indra/newview/skins/default/xui/en/teleport_strings.xml b/indra/newview/skins/default/xui/en/teleport_strings.xml
index bae821d3b5..dce6b8dd6d 100644
--- a/indra/newview/skins/default/xui/en/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/en/teleport_strings.xml
@@ -19,6 +19,10 @@ If you still cannot teleport, please log out and log back in to resolve the prob
Sorry, but system was unable to complete the teleport connection.
Try again in a moment.
+
+
+You cannot teleport back to Welcome Island.
+Go to 'Welcome Island Public' to repeat the tutorial.
Sorry, you do not have access to that teleport destination.
diff --git a/indra/newview/skins/default/xui/es/teleport_strings.xml b/indra/newview/skins/default/xui/es/teleport_strings.xml
index e0e0061729..e785a7ac40 100644
--- a/indra/newview/skins/default/xui/es/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/es/teleport_strings.xml
@@ -18,6 +18,10 @@ Si sigues recibiendo este mensaje, por favor, acude al [SUPPORT_SITE].
Lo sentimos, pero el sistema no ha podido completar el teleporte.
Vuelva a intentarlo en un momento.
+
+
+ No puede teleportarse de vuelta a la Welcome Island ('Isla de Ayuda').
+Vaya a la 'Welcome Island Public' ('Isla Pública de Ayuda') para repetir el tutorial.
Lo sentimos, pero no tienes acceso al destino de este teleporte.
diff --git a/indra/newview/skins/default/xui/fr/teleport_strings.xml b/indra/newview/skins/default/xui/fr/teleport_strings.xml
index 7c291c0984..401b272c81 100644
--- a/indra/newview/skins/default/xui/fr/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/fr/teleport_strings.xml
@@ -19,6 +19,10 @@ Si vous ne parvenez toujours pas à être téléporté, déconnectez-vous puis r
Désolé, la connexion vers votre lieu de téléportation n'a pas abouti.
Veuillez réessayer dans un moment.
+
+
+ Vous ne pouvez pas retourner sur Welcome Island.
+Pour répéter le didacticiel, veuillez aller sur Welcome Island Public.
Désolé, vous n'avez pas accès à cette destination.
diff --git a/indra/newview/skins/default/xui/it/teleport_strings.xml b/indra/newview/skins/default/xui/it/teleport_strings.xml
index 7a1046abd3..a0b324d8fb 100644
--- a/indra/newview/skins/default/xui/it/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/it/teleport_strings.xml
@@ -18,6 +18,10 @@ Se si continua a visualizzare questo messaggio, consulta la pagina [SUPPORT_SITE
Spiacenti, il sistema non riesce a completare il teletrasporto. Riprova tra un attimo.
+
+ Non è possibile per te ritornare all'Welcome Island.
+Vai alla 'Welcome Island Public' per ripetere il tutorial.
+
Spiacenti, ma non hai accesso nel luogo di destinazione richiesto.
diff --git a/indra/newview/skins/default/xui/ja/teleport_strings.xml b/indra/newview/skins/default/xui/ja/teleport_strings.xml
index 2f67d43707..04ea1c2438 100644
--- a/indra/newview/skins/default/xui/ja/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/ja/teleport_strings.xml
@@ -19,6 +19,10 @@
申し訳ございませんが、システムはテレポートの接続を完了できませんでした。
もう少し後でやり直してください。
+
+
+ Welcome Islandには戻ることができません。
+「Welcome Island Public」に行き、
残念ながら、そのテレポート目的地へのアクセスがありません。
diff --git a/indra/newview/skins/default/xui/pl/teleport_strings.xml b/indra/newview/skins/default/xui/pl/teleport_strings.xml
index 57fb55bf4c..0366c3fdbc 100644
--- a/indra/newview/skins/default/xui/pl/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/pl/teleport_strings.xml
@@ -19,6 +19,10 @@ Jeśli nadal nie możesz się teleportować wyloguj się i ponownie zaloguj.
Przepraszamy, ale nie udało się przeprowadzić teleportacji. Spróbuj jeszcze raz.
+
+ Brak możliwości ponownej teleportacji do Welcome Island.
+Odwiedź 'Welcome Island Public' by powtórzyć szkolenie.
+
Przepraszamy, ale nie masz dostępu do miejsca docelowego.
diff --git a/indra/newview/skins/default/xui/pt/teleport_strings.xml b/indra/newview/skins/default/xui/pt/teleport_strings.xml
index 11ea0f4195..f8ded1ce69 100644
--- a/indra/newview/skins/default/xui/pt/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/pt/teleport_strings.xml
@@ -18,6 +18,10 @@ Se você continuar a receber esta mensagem, por favor consulte o [SUPPORT_SITE].
Desculpe, não foi possível para o sistema executar o teletransporte. Tente novamente dentro de alguns instantes.
+
+ Você não pode se tele-transportar de volta à Ilha de Welcome.
+Vá para a Ilha de Welcome Pública para repetir este tutorial.
+
Desculpe, você não tem acesso ao destino deste teletransporte.
diff --git a/indra/newview/skins/default/xui/ru/teleport_strings.xml b/indra/newview/skins/default/xui/ru/teleport_strings.xml
index 6a7a181046..296562e6f1 100644
--- a/indra/newview/skins/default/xui/ru/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/ru/teleport_strings.xml
@@ -19,6 +19,10 @@
Системе не удалось выполнить подключение телепорта.
Повторите попытку позже.
+
+
+ Вы не можете телепортироваться обратно на Остров Помощи.
+Телепортируйтесь на Общественный Остров Помощи, чтобы повторить обучение
У вас нет доступа к точке назначения этого телепорта.
diff --git a/indra/newview/skins/default/xui/tr/teleport_strings.xml b/indra/newview/skins/default/xui/tr/teleport_strings.xml
index c0c4be1393..c506bb8a58 100644
--- a/indra/newview/skins/default/xui/tr/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/tr/teleport_strings.xml
@@ -19,6 +19,10 @@ Hala ışınlanamıyorsanız, sorunu çözmek için lütfen çıkış yapıp otu
Üzgünüz fakat sistem ışınlama bağlantısını tamamlayamadı.
Bir dakika sonra tekrar deneyin.
+
+
+You cannot teleport back to Welcome Island.
+Go to 'Welcome Island Public' to repeat the tutorial.
Üzgünüz, bu ışınlanma hedef konumuna erişim hakkına sahip değilsiniz.
diff --git a/indra/newview/skins/default/xui/zh/teleport_strings.xml b/indra/newview/skins/default/xui/zh/teleport_strings.xml
index ffb4c903bb..bfdb107810 100644
--- a/indra/newview/skins/default/xui/zh/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/zh/teleport_strings.xml
@@ -19,6 +19,10 @@
抱歉,不過系統無法完成瞬間傳送的聯接。
請稍後再試。
+
+
+ 您不能瞬间转移回“援助岛”。
+去“公共援助岛”重复您的教程。
抱歉,你並沒有權限進入要瞬間傳送的目的地。
--
cgit v1.2.3
From 526f71053a9fb18e95993343a0fd826023bda683 Mon Sep 17 00:00:00 2001
From: Jonathan Yap
Date: Sat, 29 Oct 2011 05:01:23 -0400
Subject: STORM-591 Comment out debugging llinfos lines
---
indra/newview/llvieweraudio.cpp | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 8fd1ca3807..10ba54356c 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -65,12 +65,12 @@ void LLViewerAudio::registerIdleListener()
void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI)
{
- llinfos << "DBG streamURI: " << streamURI << llendl;
+/* llinfos << "DBG streamURI: " << streamURI << llendl;
llinfos << "DBG mNextStreamURI: " << mNextStreamURI << llendl;
if (mFadeState == FADE_OUT) {llinfos << "DBG mFadeState: FADE_OUT " << llendl;}
if (mFadeState == FADE_IN) {llinfos << "DBG mFadeState: FADE_IN " << llendl;}
if (mFadeState == FADE_IDLE) {llinfos << "DBG mFadeState: FADE_IDLE " << llendl;}
-
+*/
// Old and new stream are identical
if (mNextStreamURI == streamURI)
{
@@ -86,13 +86,13 @@ void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI)
if (!gAudiop->getInternetStreamURL().empty())
{
mFadeState = FADE_OUT;
-llinfos << "DBG new mFadeState: OUT" << llendl;
+//llinfos << "DBG new mFadeState: OUT" << llendl;
}
// Otherwise the new stream can be faded in
else
{
mFadeState = FADE_IN;
-llinfos << "DBG new mFadeState: IN" << llendl;
+//llinfos << "DBG new mFadeState: IN" << llendl;
gAudiop->startInternetStream(mNextStreamURI);
startFading();
@@ -123,10 +123,10 @@ bool LLViewerAudio::onIdleUpdate()
{
if (mDone)
{
- if (mFadeState == FADE_OUT) {llinfos << "DBG mFadeState: FADE_OUT " << llendl;}
+/* if (mFadeState == FADE_OUT) {llinfos << "DBG mFadeState: FADE_OUT " << llendl;}
if (mFadeState == FADE_IN) {llinfos << "DBG mFadeState: FADE_IN " << llendl;}
if (mFadeState == FADE_IDLE) {llinfos << "DBG mFadeState: FADE_IDLE " << llendl;}
-
+*/
// This should be a rare or never occurring state.
if (mFadeState == FADE_IDLE)
{
@@ -144,7 +144,7 @@ bool LLViewerAudio::onIdleUpdate()
if (!mNextStreamURI.empty())
{
mFadeState = FADE_IN;
-llinfos << "DBG new mFadeState: IN" << llendl;
+//llinfos << "DBG new mFadeState: IN" << llendl;
gAudiop->startInternetStream(mNextStreamURI);
startFading();
return false;
@@ -152,7 +152,7 @@ llinfos << "DBG new mFadeState: IN" << llendl;
else
{
mFadeState = FADE_IDLE;
-llinfos << "DBG new mFadeState: IDLE" << llendl;
+//llinfos << "DBG new mFadeState: IDLE" << llendl;
deregisterIdleListener();
return true; // Stop calling onIdleUpdate
}
@@ -164,12 +164,12 @@ llinfos << "DBG new mFadeState: IDLE" << llendl;
mFadeState = FADE_OUT;
startFading();
return false;
-llinfos << "DBG new mFadeState: OUT" << llendl;
+//llinfos << "DBG new mFadeState: OUT" << llendl;
}
else
{
mFadeState = FADE_IDLE;
-llinfos << "DBG new mFadeState: IDLE" << llendl;
+//llinfos << "DBG new mFadeState: IDLE" << llendl;
deregisterIdleListener();
return true; // Stop calling onIdleUpdate
}
@@ -181,12 +181,12 @@ llinfos << "DBG new mFadeState: IDLE" << llendl;
void LLViewerAudio::stopInternetStreamWithAutoFade()
{
-llinfos << "DBG stopping stream" << llendl;
+//llinfos << "DBG stopping stream" << llendl;
mFadeState = FADE_IDLE;
-llinfos << "DBG new mFadeState: IDLE" << llendl;
+//llinfos << "DBG new mFadeState: IDLE" << llendl;
mNextStreamURI = LLStringUtil::null;
mDone = true;
-llinfos << "DBG mDone: true" << llendl;
+//llinfos << "DBG mDone: true" << llendl;
gAudiop->startInternetStream(LLStringUtil::null);
gAudiop->stopInternetStream();
@@ -194,7 +194,7 @@ llinfos << "DBG mDone: true" << llendl;
void LLViewerAudio::startFading()
{
-llinfos << "DBG startFading" << llendl;
+//llinfos << "DBG startFading" << llendl;
if(mDone)
{
@@ -208,7 +208,7 @@ llinfos << "DBG startFading" << llendl;
stream_fade_timer.reset();
stream_fade_timer.setTimerExpirySec(mFadeTime);
mDone = false;
-llinfos << "DBG mDone: false" << llendl;
+//llinfos << "DBG mDone: false" << llendl;
}
}
@@ -349,7 +349,7 @@ void audio_update_volume(bool force_update)
F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");
BOOL music_muted = gSavedSettings.getBOOL("MuteMusic");
F32 fade_volume = LLViewerAudio::getInstance()->getFadeVolume();
-llinfos << "DBG fade_volume:" << fade_volume << llendl;
+//llinfos << "DBG fade_volume:" << fade_volume << llendl;
music_volume = mute_volume * master_volume * music_volume * fade_volume;
gAudiop->setInternetStreamGain (music_muted ? 0.f : music_volume);
--
cgit v1.2.3
From 130d017085a4fa609970245a49b6d1a97de404b2 Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Mon, 31 Oct 2011 12:01:10 -0700
Subject: * Updated inventory code to handle creation of the "Received Items"
panel when the sim notifies the viewer that the folder is created.
Unfortunately, the sim is not yet doing this so a relog is required to
properly get this working.
---
indra/newview/llinventorymodel.cpp | 10 +++++-----
indra/newview/llsidepanelinventory.cpp | 21 ++++++---------------
2 files changed, 11 insertions(+), 20 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index fb02fe0ff7..dc25689fa3 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2528,9 +2528,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
LLPointer tfolder = new LLViewerInventoryCategory(gAgent.getID());
tfolder->unpackMessage(msg, _PREHASH_FolderData, i);
- //llinfos << "unpaked folder '" << tfolder->getName() << "' ("
- // << tfolder->getUUID() << ") in " << tfolder->getParentUUID()
- // << llendl;
+ llinfos << "unpacked folder '" << tfolder->getName() << "' ("
+ << tfolder->getUUID() << ") in " << tfolder->getParentUUID()
+ << llendl;
if(tfolder->getUUID().notNull())
{
folders.push_back(tfolder);
@@ -2570,8 +2570,8 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
LLPointer titem = new LLViewerInventoryItem;
titem->unpackMessage(msg, _PREHASH_ItemData, i);
- //llinfos << "unpaked item '" << titem->getName() << "' in "
- // << titem->getParentUUID() << llendl;
+ llinfos << "unpaked item '" << titem->getName() << "' in "
+ << titem->getParentUUID() << llendl;
U32 callback_id;
msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id);
if(titem->getUUID().notNull())
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index a24f6b24f0..91f8035556 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -113,21 +113,13 @@ public:
switch (added_category_type)
{
case LLFolderType::FT_INBOX:
+ mSidepanelInventory->enableInbox(true);
mSidepanelInventory->observeInboxModifications(added_category->getUUID());
break;
case LLFolderType::FT_OUTBOX:
+ mSidepanelInventory->enableOutbox(true);
mSidepanelInventory->observeOutboxModifications(added_category->getUUID());
break;
- case LLFolderType::FT_NONE:
- // HACK until sim update to properly create folder with system type
- if (added_category->getName() == "Received Items")
- {
- mSidepanelInventory->observeInboxModifications(added_category->getUUID());
- }
- else if (added_category->getName() == "Merchant Outbox")
- {
- mSidepanelInventory->observeOutboxModifications(added_category->getUUID());
- }
default:
break;
}
@@ -288,7 +280,6 @@ BOOL LLSidepanelInventory::postBuild()
gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));
gSavedSettings.getControl("InventoryDisplayOutbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayOutboxChanged));
- updateInboxOutbox();
// Update the verbs buttons state.
updateVerbs();
@@ -316,20 +307,20 @@ void LLSidepanelInventory::updateInboxOutbox()
// Set up observer for inbox changes, if we have an inbox already
if (!inbox_id.isNull())
{
- observeInboxModifications(inbox_id);
-
// Enable the display of the inbox if it exists
enableInbox(true);
+
+ observeInboxModifications(inbox_id);
}
#if ENABLE_MERCHANT_OUTBOX_PANEL
// Set up observer for outbox changes, if we have an outbox already
if (!outbox_id.isNull())
{
- observeOutboxModifications(outbox_id);
-
// Enable the display of the outbox if it exists
enableOutbox(true);
+
+ observeOutboxModifications(outbox_id);
}
#endif
}
--
cgit v1.2.3
From 948b56e7c288471ce87838d12cb17b3f34885274 Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Mon, 31 Oct 2011 12:05:56 -0700
Subject: * Added "clear all" button to the toybox floater with corresponding
functions added to LLToolBarView to perform the action. * Updated toybox to
new height size per XD.
---
indra/newview/llfloatertoybox.cpp | 21 +++++++++++++++
indra/newview/llfloatertoybox.h | 1 +
indra/newview/lltoolbarview.cpp | 30 ++++++++++++++++++++++
indra/newview/lltoolbarview.h | 4 +++
.../skins/default/xui/en/floater_toybox.xml | 24 ++++++++++++-----
.../newview/skins/default/xui/en/notifications.xml | 18 +++++++++++--
6 files changed, 90 insertions(+), 8 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
index f527937e8f..324afe661f 100644
--- a/indra/newview/llfloatertoybox.cpp
+++ b/indra/newview/llfloatertoybox.cpp
@@ -42,6 +42,7 @@ LLFloaterToybox::LLFloaterToybox(const LLSD& key)
, mToolBar(NULL)
{
mCommitCallbackRegistrar.add("Toybox.RestoreDefaults", boost::bind(&LLFloaterToybox::onBtnRestoreDefaults, this));
+ mCommitCallbackRegistrar.add("Toybox.ClearAll", boost::bind(&LLFloaterToybox::onBtnClearAll, this));
}
LLFloaterToybox::~LLFloaterToybox()
@@ -121,15 +122,35 @@ static bool finish_restore_toybox(const LLSD& notification, const LLSD& response
{
LLToolBarView::loadDefaultToolbars();
}
+
return false;
}
+
+static bool finish_clear_all_toybox(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+ if (option == 0)
+ {
+ LLToolBarView::clearAllToolbars();
+ }
+
+ return false;
+}
+
static LLNotificationFunctorRegistration finish_restore_toybox_reg("ConfirmRestoreToybox", finish_restore_toybox);
+static LLNotificationFunctorRegistration finish_clear_all_toybox_reg("ConfirmClearAllToybox", finish_clear_all_toybox);
void LLFloaterToybox::onBtnRestoreDefaults()
{
LLNotificationsUtil::add("ConfirmRestoreToybox");
}
+void LLFloaterToybox::onBtnClearAll()
+{
+ LLNotificationsUtil::add("ConfirmClearAllToybox");
+}
+
BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,
diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h
index 6f0275b8fe..10aee0e6f5 100644
--- a/indra/newview/llfloatertoybox.h
+++ b/indra/newview/llfloatertoybox.h
@@ -50,6 +50,7 @@ public:
std::string& tooltip_msg);
protected:
+ void onBtnClearAll();
void onBtnRestoreDefaults();
void onToolBarButtonEnter(LLView* button);
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index ed1dfbb8cd..5ff0ccfeb2 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -315,6 +315,19 @@ bool LLToolBarView::loadToolbars(bool force_default)
return true;
}
+bool LLToolBarView::clearToolbars()
+{
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ if (mToolbars[i])
+ {
+ mToolbars[i]->clearCommandsList();
+ }
+ }
+
+ return true;
+}
+
//static
bool LLToolBarView::loadDefaultToolbars()
{
@@ -332,6 +345,23 @@ bool LLToolBarView::loadDefaultToolbars()
return retval;
}
+//static
+bool LLToolBarView::clearAllToolbars()
+{
+ bool retval = false;
+
+ if (gToolBarView)
+ {
+ retval = gToolBarView->clearToolbars();
+ if (retval)
+ {
+ gToolBarView->saveToolbars();
+ }
+ }
+
+ return retval;
+}
+
void LLToolBarView::saveToolbars() const
{
if (!mToolbarsLoaded)
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 4307d10258..f871d522a2 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -93,10 +93,14 @@ public:
// Loads the toolbars from the existing user or default settings
bool loadToolbars(bool force_default = false); // return false if load fails
+
+ // Clears all buttons off the toolbars
+ bool clearToolbars();
void setToolBarsVisible(bool visible);
static bool loadDefaultToolbars();
+ static bool clearAllToolbars();
static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton);
static BOOL handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);
diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml
index ef3951a1cd..493d44a9cf 100644
--- a/indra/newview/skins/default/xui/en/floater_toybox.xml
+++ b/indra/newview/skins/default/xui/en/floater_toybox.xml
@@ -5,7 +5,7 @@
can_minimize="false"
can_resize="false"
default_tab_group="1"
- height="460"
+ height="330"
help_topic="toybox"
layout="topleft"
legacy_header_height="18"
@@ -46,7 +46,7 @@
Buttons will appear as shown or as icon-only depending on each toolbar's settings.
+ top="266" />
+
+
+
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 3ed8c30ca8..e4458f33b1 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4636,7 +4636,21 @@ Are you sure you want to quit?
name="ConfirmRestoreToybox"
type="alertmodal">
-Are you sure you want to restore your default buttons and toolbars?
+This action will restore your default buttons and toolbars.
+
+You cannot undo this action.
+
+
+
+
+
+This action will return all buttons to the toolbox and your toolbars will be empty.
You cannot undo this action.
-
+
Date: Mon, 31 Oct 2011 14:59:10 -0700
Subject: * Added support for items at the top level of "Received Items"
instead of just folders. Top-level inbox items are counted both in the
total item count and in the fresh item count.
---
indra/newview/llfolderviewitem.h | 4 +
indra/newview/llpanelmarketplaceinbox.cpp | 15 +++
indra/newview/llpanelmarketplaceinboxinventory.cpp | 107 +++++++++++++++++----
indra/newview/llpanelmarketplaceinboxinventory.h | 36 +++++--
.../xui/en/widgets/inbox_folder_view_item.xml | 19 ++++
5 files changed, 154 insertions(+), 27 deletions(-)
create mode 100644 indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml
(limited to 'indra/newview')
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 676eaf825d..a26515821d 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -556,6 +556,10 @@ public:
folders_t::const_iterator getFoldersBegin() const { return mFolders.begin(); }
folders_t::const_iterator getFoldersEnd() const { return mFolders.end(); }
folders_t::size_type getFoldersCount() const { return mFolders.size(); }
+
+ items_t::const_iterator getItemsBegin() const { return mItems.begin(); }
+ items_t::const_iterator getItemsEnd() const { return mItems.end(); }
+ items_t::size_type getItemsCount() const { return mItems.size(); }
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index ac528947a4..7cb4bbf891 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -151,6 +151,20 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const
fresh_item_count++;
}
}
+
+ LLFolderViewFolder::items_t::const_iterator items_it = inbox_folder->getItemsBegin();
+ LLFolderViewFolder::items_t::const_iterator items_end = inbox_folder->getItemsEnd();
+
+ for (; items_it != items_end; ++items_it)
+ {
+ const LLFolderViewItem * item_view = *items_it;
+ const LLInboxFolderViewItem * inbox_item_view = dynamic_cast(item_view);
+
+ if (inbox_item_view && inbox_item_view->isFresh())
+ {
+ fresh_item_count++;
+ }
+ }
}
}
@@ -171,6 +185,7 @@ U32 LLPanelMarketplaceInbox::getTotalItemCount() const
if (inbox_folder)
{
item_count += inbox_folder->getFoldersCount();
+ item_count += inbox_folder->getItemsCount();
}
}
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index 2e4bf55d51..b9fb5b8c55 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -45,6 +45,7 @@
static LLDefaultChildRegistry::Register r1("inbox_inventory_panel");
static LLDefaultChildRegistry::Register r2("inbox_folder_view_folder");
+static LLDefaultChildRegistry::Register r3("inbox_folder_view_item");
//
@@ -137,7 +138,7 @@ LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge
LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge)
{
- LLFolderViewItem::Params params;
+ LLInboxFolderViewItem::Params params;
params.name = bridge->getDisplayName();
params.icon = bridge->getIcon();
@@ -171,10 +172,6 @@ LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p)
#endif
}
-LLInboxFolderViewFolder::~LLInboxFolderViewFolder()
-{
-}
-
// virtual
void LLInboxFolderViewFolder::draw()
{
@@ -190,6 +187,20 @@ void LLInboxFolderViewFolder::draw()
LLFolderViewFolder::draw();
}
+void LLInboxFolderViewFolder::selectItem()
+{
+ LLFolderViewFolder::selectItem();
+
+ deFreshify();
+}
+
+void LLInboxFolderViewFolder::toggleOpen()
+{
+ LLFolderViewFolder::toggleOpen();
+
+ deFreshify();
+}
+
void LLInboxFolderViewFolder::computeFreshness()
{
const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity");
@@ -218,20 +229,6 @@ void LLInboxFolderViewFolder::deFreshify()
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
-void LLInboxFolderViewFolder::selectItem()
-{
- LLFolderViewFolder::selectItem();
-
- deFreshify();
-}
-
-void LLInboxFolderViewFolder::toggleOpen()
-{
- LLFolderViewFolder::toggleOpen();
-
- deFreshify();
-}
-
void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc)
{
mCreationDate = creation_date_utc;
@@ -246,9 +243,81 @@ void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc)
// LLInboxFolderViewItem Implementation
//
+LLInboxFolderViewItem::LLInboxFolderViewItem(const Params& p)
+ : LLFolderViewItem(p)
+ , LLBadgeOwner(getHandle())
+ , mFresh(false)
+{
+#if SUPPORTING_FRESH_ITEM_COUNT
+ computeFreshness();
+
+ initBadgeParams(p.new_badge());
+#endif
+}
+
BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
return TRUE;
}
+// virtual
+void LLInboxFolderViewItem::draw()
+{
+#if SUPPORTING_FRESH_ITEM_COUNT
+ if (!badgeHasParent())
+ {
+ addBadgeToParentPanel();
+ }
+
+ setBadgeVisibility(mFresh);
+#endif
+
+ LLFolderViewItem::draw();
+}
+
+void LLInboxFolderViewItem::selectItem()
+{
+ LLFolderViewItem::selectItem();
+
+ deFreshify();
+}
+
+void LLInboxFolderViewItem::computeFreshness()
+{
+ const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity");
+
+ if (last_expansion_utc > 0)
+ {
+ mFresh = (mCreationDate > last_expansion_utc);
+
+#if DEBUGGING_FRESHNESS
+ if (mFresh)
+ {
+ llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << llendl;
+ }
+#endif
+ }
+ else
+ {
+ mFresh = true;
+ }
+}
+
+void LLInboxFolderViewItem::deFreshify()
+{
+ mFresh = false;
+
+ gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+}
+
+void LLInboxFolderViewItem::setCreationDate(time_t creation_date_utc)
+{
+ mCreationDate = creation_date_utc;
+
+ if (mParentFolder == mRoot)
+ {
+ computeFreshness();
+ }
+}
+
// eof
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h
index 46eeb9ea7f..09b14ec547 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.h
+++ b/indra/newview/llpanelmarketplaceinboxinventory.h
@@ -69,16 +69,15 @@ public:
};
LLInboxFolderViewFolder(const Params& p);
- ~LLInboxFolderViewFolder();
void draw();
- void computeFreshness();
- void deFreshify();
-
void selectItem();
void toggleOpen();
+ void computeFreshness();
+ void deFreshify();
+
bool isFresh() const { return mFresh; }
protected:
@@ -88,15 +87,36 @@ protected:
};
-class LLInboxFolderViewItem : public LLFolderViewItem
+class LLInboxFolderViewItem : public LLFolderViewItem, public LLBadgeOwner
{
public:
- LLInboxFolderViewItem(const Params& p)
- : LLFolderViewItem(p)
+ struct Params : public LLInitParam::Block
{
- }
+ Optional new_badge;
+
+ Params()
+ : new_badge("new_badge")
+ {
+ }
+ };
+
+ LLInboxFolderViewItem(const Params& p);
BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+
+ void draw();
+
+ void selectItem();
+
+ void computeFreshness();
+ void deFreshify();
+
+ bool isFresh() const { return mFresh; }
+
+protected:
+ void setCreationDate(time_t creation_date_utc);
+
+ bool mFresh;
};
#endif //LL_INBOXINVENTORYPANEL_H
diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml
new file mode 100644
index 0000000000..7a7a6e9a09
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml
@@ -0,0 +1,19 @@
+
+
+
+
--
cgit v1.2.3
From 5406ebad3e2073a860ced69094bbfb76880ce999 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 31 Oct 2011 17:20:44 -0500
Subject: SH-2521 Put back "high detail" terrain render when basic shaders
disabled (still broken).
---
indra/newview/lldrawpoolterrain.cpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index d61df9c048..3e9d30283a 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -198,7 +198,7 @@ void LLDrawPoolTerrain::render(S32 pass)
return;
}
// Render simplified land if video card can't do sufficient multitexturing
- if (!LLGLSLShader::sNoFixedFunction || !gGLManager.mHasARBEnvCombine || (gGLManager.mNumTextureUnits < 2))
+ if (!gGLManager.mHasARBEnvCombine || (gGLManager.mNumTextureUnits < 2))
{
renderSimple(); // Render without multitexture
return;
@@ -223,11 +223,16 @@ void LLDrawPoolTerrain::render(S32 pass)
{
gPipeline.enableLightsStatic();
- if (sDetailMode == 0){
+ if (sDetailMode == 0)
+ {
renderSimple();
- } else if (gGLManager.mNumTextureUnits < 4){
+ }
+ else if (gGLManager.mNumTextureUnits < 4)
+ {
renderFull2TU();
- } else {
+ }
+ else
+ {
renderFull4TU();
}
}
--
cgit v1.2.3
From f76143a74ebbd9faf84fdcdee7fbf81a4090aafc Mon Sep 17 00:00:00 2001
From: eli
Date: Mon, 31 Oct 2011 16:25:34 -0700
Subject: sync with viewer-development
---
.../skins/default/xui/en/floater_chat_bar.xml | 97 ++++++++++++----------
.../skins/default/xui/en/floater_outgoing_call.xml | 1 +
.../skins/default/xui/en/floater_toybox.xml | 2 +-
.../default/xui/en/floater_voice_controls.xml | 2 +-
.../newview/skins/default/xui/en/menu_toolbars.xml | 2 +-
indra/newview/skins/default/xui/en/menu_viewer.xml | 11 ++-
.../skins/default/xui/en/panel_status_bar.xml | 7 +-
.../skins/default/xui/en/panel_topinfo_bar.xml | 2 +-
indra/newview/skins/default/xui/en/strings.xml | 6 +-
.../skins/default/xui/en/widgets/toolbar.xml | 4 +
10 files changed, 78 insertions(+), 56 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
index 989b4a0580..87606c1a2a 100644
--- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
@@ -15,6 +15,7 @@
min_height="60"
min_width="150"
can_resize="true"
+ default_tab_group="1"
name="chat_bar"
width="380">
-
-
-
-
-
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
index 9db6568ee3..ffbb6aa28b 100644
--- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
@@ -8,6 +8,7 @@
layout="topleft"
name="outgoing call"
help_topic="outgoing_call"
+ save_dock_state="true"
title="CALLING"
width="410">
-
+
-
+
+
+
+ name="balance_bg">
[mthnum,datetime,utc]/[day,datetime,utc]/[year,datetime,utc]
-
+
Balance
Credits
Debits
@@ -3711,6 +3711,10 @@ Try enclosing path to the editor with double quotes.
Changing camera angle
Volume controls for calls and people near you in world
+ currently in your bottom toolbar
+ currently in your left toolbar
+ currently in your right toolbar
+
Retain%
Detail
diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
index 7e7a9c61cf..0aa478ace9 100644
--- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
@@ -30,6 +30,8 @@
image_overlay_alignment="left"
use_ellipses="true"
auto_resize="true"
+ button_flash_count="99999"
+ button_flash_rate="1.0"
flash_color="EmphasisColor"/>
--
cgit v1.2.3
From b4edfb1c1dea7940d10c7fd9a699f49562f3096e Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Tue, 1 Nov 2011 16:32:00 +0200
Subject: STORM-1676 FIXED Removed "Powered by Google" label from the nearby
chat floater.
---
indra/newview/skins/default/xui/da/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/da/panel_preferences_chat.xml | 2 +-
indra/newview/skins/default/xui/de/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/de/panel_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/de/panel_preferences_chat.xml | 2 +-
indra/newview/skins/default/xui/en/panel_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/es/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/es/panel_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/es/panel_preferences_chat.xml | 2 +-
indra/newview/skins/default/xui/fr/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/fr/panel_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/fr/panel_preferences_chat.xml | 2 +-
indra/newview/skins/default/xui/it/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/it/panel_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/it/panel_preferences_chat.xml | 4 ++--
indra/newview/skins/default/xui/ja/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/ja/panel_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/ja/panel_preferences_chat.xml | 4 ++--
indra/newview/skins/default/xui/pl/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/pl/panel_preferences_chat.xml | 2 +-
indra/newview/skins/default/xui/pt/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/pt/panel_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/pt/panel_preferences_chat.xml | 2 +-
indra/newview/skins/default/xui/ru/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/ru/panel_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/ru/panel_preferences_chat.xml | 2 +-
indra/newview/skins/default/xui/tr/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/tr/panel_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/tr/panel_preferences_chat.xml | 2 +-
indra/newview/skins/default/xui/zh/floater_nearby_chat.xml | 2 +-
indra/newview/skins/default/xui/zh/panel_preferences_chat.xml | 2 +-
31 files changed, 33 insertions(+), 33 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/da/floater_nearby_chat.xml b/indra/newview/skins/default/xui/da/floater_nearby_chat.xml
index bd17224259..76bc40edac 100644
--- a/indra/newview/skins/default/xui/da/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/da/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
index f0f6242fff..890a3038ef 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
@@ -31,7 +31,7 @@
- Benyt maskinel oversættelse ved chat (håndteret af Google)
+ Benyt maskinel oversættelse ved chat
Oversæt chat til :
diff --git a/indra/newview/skins/default/xui/de/floater_nearby_chat.xml b/indra/newview/skins/default/xui/de/floater_nearby_chat.xml
index bbb4114200..2aabbb18f2 100644
--- a/indra/newview/skins/default/xui/de/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/de/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/de/panel_nearby_chat.xml b/indra/newview/skins/default/xui/de/panel_nearby_chat.xml
index c3ce42efa1..2068c39024 100644
--- a/indra/newview/skins/default/xui/de/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/de/panel_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml
index 104f89b80c..04f6c27330 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml
@@ -31,7 +31,7 @@
- Beim Chatten Maschinenübersetzung verwenden (von Google bereitgestellt)
+ Beim Chatten Maschinenübersetzung verwenden
Chat übersetzen in:
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml
index f766236b2e..d492f9bd68 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml
@@ -11,7 +11,7 @@
control_name="TranslateChat"
enabled="true"
height="16"
- label="Translate chat (powered by Google)"
+ label="Translate chat"
layout="topleft"
left="5"
name="translate_chat_checkbox"
diff --git a/indra/newview/skins/default/xui/es/floater_nearby_chat.xml b/indra/newview/skins/default/xui/es/floater_nearby_chat.xml
index 1fee9ab056..b3b8cdcfff 100644
--- a/indra/newview/skins/default/xui/es/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/es/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/es/panel_nearby_chat.xml b/indra/newview/skins/default/xui/es/panel_nearby_chat.xml
index 95ce14c9a7..5a852a6711 100644
--- a/indra/newview/skins/default/xui/es/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/es/panel_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
index 4625075aa5..e822585566 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
@@ -31,7 +31,7 @@
- Usar en el chat el traductor automático de Google
+ Usar en el chat el traductor automático
Traducir el chat al:
diff --git a/indra/newview/skins/default/xui/fr/floater_nearby_chat.xml b/indra/newview/skins/default/xui/fr/floater_nearby_chat.xml
index 9b1b21c434..8bbd34baae 100644
--- a/indra/newview/skins/default/xui/fr/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/fr/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_chat.xml b/indra/newview/skins/default/xui/fr/panel_nearby_chat.xml
index 98eddf196b..31cb3308e3 100644
--- a/indra/newview/skins/default/xui/fr/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/fr/panel_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml
index 646f53704c..fa026d8106 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml
@@ -31,7 +31,7 @@
- Utiliser la traduction automatique lors des chats (fournie par Google)
+ Utiliser la traduction automatique lors des chats
Traduire le chat en :
diff --git a/indra/newview/skins/default/xui/it/floater_nearby_chat.xml b/indra/newview/skins/default/xui/it/floater_nearby_chat.xml
index 4c41df8a62..9e81899880 100644
--- a/indra/newview/skins/default/xui/it/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/it/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/it/panel_nearby_chat.xml b/indra/newview/skins/default/xui/it/panel_nearby_chat.xml
index 7afc3cd7e7..1b529e2737 100644
--- a/indra/newview/skins/default/xui/it/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/it/panel_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_chat.xml b/indra/newview/skins/default/xui/it/panel_preferences_chat.xml
index 72e687b6d1..1a0a1d8434 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_chat.xml
@@ -29,9 +29,9 @@
-
+
- Usa la traduzione meccanica durante le chat (tecnologia Google)
+ Usa la traduzione meccanica durante le chat
Traduci chat in:
diff --git a/indra/newview/skins/default/xui/ja/floater_nearby_chat.xml b/indra/newview/skins/default/xui/ja/floater_nearby_chat.xml
index a29c6a0630..bcddcc6907 100644
--- a/indra/newview/skins/default/xui/ja/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/ja/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/ja/panel_nearby_chat.xml b/indra/newview/skins/default/xui/ja/panel_nearby_chat.xml
index 4334659557..aca055bb43 100644
--- a/indra/newview/skins/default/xui/ja/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/ja/panel_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml b/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml
index c8584ccaae..1502442a06 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml
@@ -29,9 +29,9 @@
-
+
- チャット中に内容を機械翻訳する(Google翻訳)
+ チャット中に内容を機械翻訳する
翻訳する言語:
diff --git a/indra/newview/skins/default/xui/pl/floater_nearby_chat.xml b/indra/newview/skins/default/xui/pl/floater_nearby_chat.xml
index 7dc3e1f22e..214d465f1c 100644
--- a/indra/newview/skins/default/xui/pl/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/pl/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml
index be730eb73f..7fd1029e6a 100644
--- a/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml
@@ -31,7 +31,7 @@
- Użyj translatora podczas rozmowy (wspierany przez Google)
+ Użyj translatora podczas rozmowy
Przetłumacz czat na:
diff --git a/indra/newview/skins/default/xui/pt/floater_nearby_chat.xml b/indra/newview/skins/default/xui/pt/floater_nearby_chat.xml
index 60edfa505f..653861f7d8 100644
--- a/indra/newview/skins/default/xui/pt/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/pt/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/pt/panel_nearby_chat.xml b/indra/newview/skins/default/xui/pt/panel_nearby_chat.xml
index 9d44c7f62d..15470dc94a 100644
--- a/indra/newview/skins/default/xui/pt/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/pt/panel_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml
index e5aa42aae0..f98659aa73 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml
@@ -31,7 +31,7 @@
- Traduzir bate-papo automaticamente (via Google)
+ Traduzir bate-papo automaticamente
Traduzir bate-papo para:
diff --git a/indra/newview/skins/default/xui/ru/floater_nearby_chat.xml b/indra/newview/skins/default/xui/ru/floater_nearby_chat.xml
index fd3c9f3512..184c753e40 100644
--- a/indra/newview/skins/default/xui/ru/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/ru/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/ru/panel_nearby_chat.xml b/indra/newview/skins/default/xui/ru/panel_nearby_chat.xml
index a371040b74..1d26eecf87 100644
--- a/indra/newview/skins/default/xui/ru/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/ru/panel_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml b/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml
index 5e4130667f..f1095065a5 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml
@@ -30,7 +30,7 @@
- Использовать машинный перевод во время общения (используется Google)
+ Использовать машинный перевод во время общения
Переводить чат на:
diff --git a/indra/newview/skins/default/xui/tr/floater_nearby_chat.xml b/indra/newview/skins/default/xui/tr/floater_nearby_chat.xml
index 6570c4379c..6b12ad0ef5 100644
--- a/indra/newview/skins/default/xui/tr/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/tr/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/tr/panel_nearby_chat.xml b/indra/newview/skins/default/xui/tr/panel_nearby_chat.xml
index 73da726cb2..c405105e00 100644
--- a/indra/newview/skins/default/xui/tr/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/tr/panel_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml
index aeef737420..9c9e960715 100644
--- a/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml
@@ -30,7 +30,7 @@
- Sohbet ederken makine çevirisi kullanılsın (Google tarafından desteklenir)
+ Sohbet ederken makine çevirisi kullanılsın
Sohbeti şu dile çevir:
diff --git a/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml b/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml
index f0c34acb06..38a5dab523 100644
--- a/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/zh/floater_nearby_chat.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml b/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml
index fc326c2ce2..738c77fd08 100644
--- a/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml
@@ -30,7 +30,7 @@
- 聊天時使用機器自動進行翻譯(由 Google 所提供)
+ 聊天時使用機器自動進行翻譯
聊天翻譯為:
--
cgit v1.2.3
From 5b1f9f3c5e9176a971c942da7688d8b194b12ed3 Mon Sep 17 00:00:00 2001
From: Paul ProductEngine
Date: Tue, 1 Nov 2011 18:11:21 +0200
Subject: EXP-1489 FIXED (Cannot build notifications not being shown when chat
floater closed with chat log toggled open)
- Need to check visibility of the floater itself, not only chat panel in it. So I added this check.
---
indra/newview/llnotificationtiphandler.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 2a08a29842..aa009a76fa 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -29,6 +29,7 @@
#include "llfloaterreg.h"
#include "llnearbychat.h"
+#include "llnearbychatbar.h"
#include "llnotificationhandler.h"
#include "llnotifications.h"
#include "lltoastnotifypanel.h"
@@ -93,7 +94,8 @@ bool LLTipHandler::processNotification(const LLSD& notify)
// don't show toast if Nearby Chat is opened
LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
- if (nearby_chat->getVisible())
+ LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance();
+ if (nearby_chat_bar->getVisible() && nearby_chat->getVisible())
{
return false;
}
--
cgit v1.2.3
From ba2fa73aaab5415c38fd9f489c590d8cba05e24f Mon Sep 17 00:00:00 2001
From: Paul ProductEngine
Date: Tue, 1 Nov 2011 18:54:21 +0200
Subject: EXP-1472 FIXED (More spillover list scrolls up after selecting any
content menu item)
- Saving last scroll position of menu
---
indra/newview/llfavoritesbar.cpp | 2 ++
1 file changed, 2 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 6c9058caf1..1f269fb666 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -1197,7 +1197,9 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
LLToggleableMenu* menu = (LLToggleableMenu*) mOverflowMenuHandle.get();
if (mRestoreOverflowMenu && menu && !menu->getVisible())
{
+ menu->resetScrollPositionOnShow(false);
showDropDownMenu();
+ menu->resetScrollPositionOnShow(true);
}
}
--
cgit v1.2.3
From 3ae3d04e7e73f414a2e17c1be7cf7cca4f894c72 Mon Sep 17 00:00:00 2001
From: Paul ProductEngine
Date: Tue, 1 Nov 2011 19:23:32 +0200
Subject: EXP-1452 FIXED (minimum height of NEARBY CHAT window can be
circumvented by minimizing it.)
Reason: visibility state of chat was always set to true when floater unminimized
Solution: save visibility state of the chat to restore it after floater unminimized
---
indra/newview/llnearbychatbar.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4674c85324..6e22c7fea0 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -403,8 +403,16 @@ void LLNearbyChatBar::setMinimized(BOOL b)
{
if (b != LLFloater::isMinimized())
{
+ LLView* nearby_chat = getChildView("nearby_chat");
+
+ static bool is_visible = nearby_chat->getVisible();
+ if (b)
+ {
+ is_visible = nearby_chat->getVisible();
+ }
+
+ nearby_chat->setVisible(b ? false : is_visible);
LLFloater::setMinimized(b);
- getChildView("nearby_chat")->setVisible(!b);
}
}
--
cgit v1.2.3
From 74fcb62b3dc0084c61cdf611b2b95ab3b03203bd Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 1 Nov 2011 12:33:59 -0500
Subject: SH-2546 Fix for black avatars and terrain on GF Go 7800 (use vec3
instead of float on varying parameters).
---
.../app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl | 2 +-
.../app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
index e8e56e12c1..765b0927c3 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
@@ -26,7 +26,7 @@
VARYING vec3 vary_SunlitColor;
VARYING vec3 vary_AdditiveColor;
-VARYING float vary_AtmosAttenuation;
+VARYING vec3 vary_AtmosAttenuation;
vec3 getSunlitColor()
{
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
index ba2ed6b1ce..99dbee15ee 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -25,7 +25,7 @@
VARYING vec3 vary_AdditiveColor;
-VARYING float vary_AtmosAttenuation;
+VARYING vec3 vary_AtmosAttenuation;
vec3 additive_color;
vec3 atmos_attenuation;
@@ -80,5 +80,5 @@ void setAdditiveColor(vec3 v)
void setAtmosAttenuation(vec3 v)
{
atmos_attenuation = v;
- vary_AtmosAttenuation = v.r;
+ vary_AtmosAttenuation = v;
}
--
cgit v1.2.3
From 108cdf58c2def80cf6c88e35c85b6da1c3709b76 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 1 Nov 2011 12:47:06 -0500
Subject: SH-2620 Force FXAA shader to off on OSX
---
indra/newview/pipeline.cpp | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 76ad7fd83e..85a7691ead 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6405,6 +6405,10 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
bool multisample = RenderFSAASamples > 1;
+#if LL_DARWIN //force FXAA to off on OSX (SH-2620)
+ multisample = false;
+#endif
+
if (multisample)
{
//bake out texture2D with RGBL for FXAA shader
--
cgit v1.2.3
From b58229a64e2a5c8178f3ac05f944b6cfecc5466b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 1 Nov 2011 14:33:20 -0500
Subject: SH-1427 Fix for sunlight color getting clobbered for non-deferred
atmospheric shaders.
---
.../app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
index 89b6a52909..4fe0ef9caf 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-uniform vec4 sunlight_color;
+uniform vec4 sunlight_color_copy;
uniform vec4 light_ambient;
vec3 atmosAmbient(vec3 light)
@@ -33,7 +33,7 @@ vec3 atmosAmbient(vec3 light)
vec3 atmosAffectDirectionalLight(float lightIntensity)
{
- return sunlight_color.rgb * lightIntensity;
+ return sunlight_color_copy.rgb * lightIntensity;
}
vec3 atmosGetDiffuseSunlightColor()
--
cgit v1.2.3
From b6b463dd3927148d1bb20f0bb9aa624ddaed15c4 Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Tue, 1 Nov 2011 15:30:54 -0700
Subject: EXP-1452 FIX minimum height of NEARBY CHAT window can be circumvented
by minimizing it.
---
indra/newview/llnearbychat.cpp | 25 +++++++++++++------------
indra/newview/llnearbychat.h | 6 +++---
indra/newview/llnearbychatbar.cpp | 9 ++++++---
3 files changed, 22 insertions(+), 18 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 3418462192..a7303ad035 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -60,13 +60,9 @@ static const S32 RESIZE_BAR_THICKNESS = 3;
static LLRegisterPanelClassWrapper t_panel_nearby_chat("panel_nearby_chat");
-LLNearbyChat::LLNearbyChat()
- : LLPanel()
- ,mChatHistory(NULL)
-{
-}
-
-LLNearbyChat::~LLNearbyChat()
+LLNearbyChat::LLNearbyChat(const LLNearbyChat::Params& p)
+: LLPanel(p),
+ mChatHistory(NULL)
{
}
@@ -178,15 +174,20 @@ bool LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata)
return false;
}
+void LLNearbyChat::removeScreenChat()
+{
+ LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
+ if(chat_channel)
+ {
+ chat_channel->removeToastsFromChannel();
+ }
+}
+
void LLNearbyChat::setVisible(BOOL visible)
{
if(visible)
{
- LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
- if(chat_channel)
- {
- chat_channel->removeToastsFromChannel();
- }
+ removeScreenChat();
}
LLPanel::setVisible(visible);
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index 5ef584c8ff..7c5975cbc5 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -37,8 +37,7 @@ class LLChatHistory;
class LLNearbyChat: public LLPanel
{
public:
- LLNearbyChat();
- ~LLNearbyChat();
+ LLNearbyChat(const Params& p = LLPanel::getDefaultParams());
BOOL postBuild ();
@@ -63,13 +62,14 @@ public:
void loadHistory();
static LLNearbyChat* getInstance();
+ void removeScreenChat();
private:
void getAllowedRect (LLRect& rect);
void onNearbySpeakers ();
-
+
private:
LLHandle mPopupMenuHandle;
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4674c85324..c612b14256 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -47,6 +47,7 @@
#include "llviewerwindow.h"
#include "llrootview.h"
#include "llviewerchat.h"
+#include "llnearbychat.h"
#include "llresizehandle.h"
@@ -401,11 +402,13 @@ void LLNearbyChatBar::onToggleNearbyChatPanel()
void LLNearbyChatBar::setMinimized(BOOL b)
{
- if (b != LLFloater::isMinimized())
+ LLNearbyChat* nearby_chat = getChild("nearby_chat");
+ // when unminimizing with nearby chat visible, go ahead and kill off screen chats
+ if (!b && nearby_chat->getVisible())
{
- LLFloater::setMinimized(b);
- getChildView("nearby_chat")->setVisible(!b);
+ nearby_chat->removeScreenChat();
}
+ LLFloater::setMinimized(b);
}
void LLNearbyChatBar::onChatBoxCommit()
--
cgit v1.2.3
From e3287fbe4cbb3ababe9b1d1be691ff4b90b45dd8 Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Tue, 1 Nov 2011 15:51:33 -0700
Subject: EXP-1500 : Hide the toolbars whenever the login box is shown. Also
clean up some old FUI debug that is not necessary anymore
---
indra/newview/app_settings/settings.xml | 11 -----------
indra/newview/llstartup.cpp | 8 +++++++-
indra/newview/llviewerwindow.cpp | 18 +++++++-----------
3 files changed, 14 insertions(+), 23 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3771222455..8f660008e5 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -2630,17 +2630,6 @@
Value
-1
- DebugToolbarFUI
-
- Comment
- Turn on the FUI Toolbars
- Persist
- 1
- Type
- Boolean
- Value
- 1
-
DebugViews
Comment
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index e62227fa3c..9d8d1be0f5 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -190,6 +190,7 @@
#include "lllogin.h"
#include "llevents.h"
#include "llstartuplistener.h"
+#include "lltoolbarview.h"
#if LL_WINDOWS
#include "lldxhardware.h"
@@ -2091,7 +2092,12 @@ void login_show()
#else
BOOL bUseDebugLogin = TRUE;
#endif
-
+ // Hide the toolbars: may happen to come back here if login fails after login agent but before login in region
+ if (gToolBarView)
+ {
+ gToolBarView->setVisible(FALSE);
+ }
+
LLPanelLogin::show( gViewerWindow->getWindowRectScaled(),
bUseDebugLogin || gSavedSettings.getBOOL("SecondLifeEnterprise"),
login_callback, NULL );
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 6fcbc401af..e23ba0faf7 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1789,17 +1789,13 @@ void LLViewerWindow::initBase()
mLoginPanelHolder = main_view->getChild("login_panel_holder")->getHandle();
// Create the toolbar view
- // *TODO: Eventually, suppress the existence of this debug setting and turn toolbar FUI on permanently
- if (gSavedSettings.getBOOL("DebugToolbarFUI"))
- {
- // Get a pointer to the toolbar view holder
- LLPanel* panel_holder = main_view->getChild("toolbar_view_holder");
- // Load the toolbar view from file
- gToolBarView = LLUICtrlFactory::getInstance()->createFromFile("panel_toolbar_view.xml", panel_holder, LLDefaultChildRegistry::instance());
- gToolBarView->setShape(panel_holder->getLocalRect());
- // Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI())
- gToolBarView->setVisible(FALSE);
- }
+ // Get a pointer to the toolbar view holder
+ LLPanel* panel_holder = main_view->getChild("toolbar_view_holder");
+ // Load the toolbar view from file
+ gToolBarView = LLUICtrlFactory::getInstance()->createFromFile("panel_toolbar_view.xml", panel_holder, LLDefaultChildRegistry::instance());
+ gToolBarView->setShape(panel_holder->getLocalRect());
+ // Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI())
+ gToolBarView->setVisible(FALSE);
// Constrain floaters to inside the menu and status bar regions.
gFloaterView = main_view->getChild("Floater View");
--
cgit v1.2.3
From 3ad6b8829bd45960d7f8d460a74d13d7d1562ef4 Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Tue, 1 Nov 2011 16:24:13 -0700
Subject: EXP-1480 FIX
---
indra/newview/app_settings/settings_per_account.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 6ed4480cb1..8cdd8ed838 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -36,7 +36,7 @@
DisplayDestinationsOnInitialRun
Comment
- Display the destinations guide when a user first launches FUI.
+ Display the destinations guide when a user first launches Second Life.
Persist
1
Type
--
cgit v1.2.3
From 1bea08335b6c2fa31f414db2fe7316a118b2ec18 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 2 Nov 2011 10:55:12 -0500
Subject: SH-2648 Fix for flickering shadows on 40% transparent objects.
---
indra/newview/pipeline.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 85a7691ead..fe29333ab2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8149,10 +8149,10 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
{
LLFastTimer ftm(FTM_SHADOW_ALPHA);
gDeferredShadowAlphaMaskProgram.bind();
- gDeferredShadowAlphaMaskProgram.setAlphaRange(0.6f, 1.f);
+ gDeferredShadowAlphaMaskProgram.setAlphaRange(0.598f, 1.f);
renderObjects(LLRenderPass::PASS_ALPHA_SHADOW, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR, TRUE);
gDeferredTreeShadowProgram.bind();
- gDeferredTreeShadowProgram.setAlphaRange(0.6f, 1.f);
+ gDeferredTreeShadowProgram.setAlphaRange(0.598f, 1.f);
renderObjects(LLRenderPass::PASS_GRASS, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, TRUE);
}
--
cgit v1.2.3
From 65e144d9fec4bb441050e73136ed95b48e6e363c Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Wed, 2 Nov 2011 19:05:13 +0200
Subject: STORM-1580 WIP Initial commit for PO review.
---
indra/newview/CMakeLists.txt | 15 +-
indra/newview/app_settings/settings.xml | 44 +-
indra/newview/llfloaterpostcard.cpp | 384 ---------
indra/newview/llfloaterpostcard.h | 79 --
indra/newview/llfloatersnapshot.cpp | 870 ++++++++++++++-------
indra/newview/llfloatersnapshot.h | 29 +-
indra/newview/llpanelpostprogress.cpp | 59 ++
indra/newview/llpanelpostresult.cpp | 90 +++
indra/newview/llpanelsnapshot.cpp | 109 +++
indra/newview/llpanelsnapshot.h | 58 ++
indra/newview/llpanelsnapshotinventory.cpp | 152 ++++
indra/newview/llpanelsnapshotlocal.cpp | 209 +++++
indra/newview/llpanelsnapshotoptions.cpp | 94 +++
indra/newview/llpanelsnapshotpostcard.cpp | 336 ++++++++
indra/newview/llpanelsnapshotprofile.cpp | 162 ++++
indra/newview/llpostcard.cpp | 160 ++++
indra/newview/llpostcard.h | 48 ++
indra/newview/llsidetraypanelcontainer.cpp | 7 +
indra/newview/llsidetraypanelcontainer.h | 5 +
indra/newview/llviewerfloaterreg.cpp | 2 -
indra/newview/llviewermedia.cpp | 7 +
indra/newview/llviewermenufile.cpp | 18 +-
indra/newview/llviewermessage.cpp | 4 +-
indra/newview/llviewerwindow.cpp | 6 +-
indra/newview/llviewerwindow.h | 2 +-
indra/newview/llwebprofile.cpp | 297 +++++++
indra/newview/llwebprofile.h | 69 ++
.../skins/default/textures/snapshot_download.png | Bin 0 -> 1621 bytes
.../skins/default/textures/snapshot_email.png | Bin 0 -> 1391 bytes
.../skins/default/textures/snapshot_inventory.png | Bin 0 -> 1371 bytes
.../skins/default/textures/snapshot_profile.png | Bin 0 -> 1479 bytes
indra/newview/skins/default/textures/textures.xml | 4 +
.../skins/default/xui/en/floater_postcard.xml | 149 ----
.../skins/default/xui/en/floater_snapshot.xml | 602 ++++++--------
.../skins/default/xui/en/panel_post_progress.xml | 55 ++
.../skins/default/xui/en/panel_post_result.xml | 78 ++
.../default/xui/en/panel_postcard_message.xml | 137 ++++
.../default/xui/en/panel_postcard_settings.xml | 102 +++
.../default/xui/en/panel_snapshot_inventory.xml | 146 ++++
.../skins/default/xui/en/panel_snapshot_local.xml | 191 +++++
.../default/xui/en/panel_snapshot_options.xml | 80 ++
.../default/xui/en/panel_snapshot_postcard.xml | 107 +++
.../default/xui/en/panel_snapshot_profile.xml | 165 ++++
indra/newview/skins/default/xui/en/strings.xml | 8 +
44 files changed, 3811 insertions(+), 1328 deletions(-)
delete mode 100644 indra/newview/llfloaterpostcard.cpp
delete mode 100644 indra/newview/llfloaterpostcard.h
create mode 100644 indra/newview/llpanelpostprogress.cpp
create mode 100644 indra/newview/llpanelpostresult.cpp
create mode 100644 indra/newview/llpanelsnapshot.cpp
create mode 100644 indra/newview/llpanelsnapshot.h
create mode 100644 indra/newview/llpanelsnapshotinventory.cpp
create mode 100644 indra/newview/llpanelsnapshotlocal.cpp
create mode 100644 indra/newview/llpanelsnapshotoptions.cpp
create mode 100644 indra/newview/llpanelsnapshotpostcard.cpp
create mode 100644 indra/newview/llpanelsnapshotprofile.cpp
create mode 100644 indra/newview/llpostcard.cpp
create mode 100644 indra/newview/llpostcard.h
create mode 100644 indra/newview/llwebprofile.cpp
create mode 100644 indra/newview/llwebprofile.h
create mode 100644 indra/newview/skins/default/textures/snapshot_download.png
create mode 100644 indra/newview/skins/default/textures/snapshot_email.png
create mode 100644 indra/newview/skins/default/textures/snapshot_inventory.png
create mode 100644 indra/newview/skins/default/textures/snapshot_profile.png
delete mode 100644 indra/newview/skins/default/xui/en/floater_postcard.xml
create mode 100644 indra/newview/skins/default/xui/en/panel_post_progress.xml
create mode 100644 indra/newview/skins/default/xui/en/panel_post_result.xml
create mode 100644 indra/newview/skins/default/xui/en/panel_postcard_message.xml
create mode 100644 indra/newview/skins/default/xui/en/panel_postcard_settings.xml
create mode 100644 indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml
create mode 100644 indra/newview/skins/default/xui/en/panel_snapshot_local.xml
create mode 100644 indra/newview/skins/default/xui/en/panel_snapshot_options.xml
create mode 100644 indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml
create mode 100644 indra/newview/skins/default/xui/en/panel_snapshot_profile.xml
(limited to 'indra/newview')
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index bef775cdb8..63b05f5a1d 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -219,7 +219,6 @@ set(viewer_SOURCE_FILES
llfloateropenobject.cpp
llfloaterpay.cpp
llfloaterperms.cpp
- llfloaterpostcard.cpp
llfloaterpostprocess.cpp
llfloaterpreference.cpp
llfloaterproperties.cpp
@@ -393,9 +392,17 @@ set(viewer_SOURCE_FILES
llpanelplaceprofile.cpp
llpanelplaces.cpp
llpanelplacestab.cpp
+ llpanelpostprogress.cpp
+ llpanelpostresult.cpp
llpanelprimmediacontrols.cpp
llpanelprofile.cpp
llpanelprofileview.cpp
+ llpanelsnapshot.cpp
+ llpanelsnapshotinventory.cpp
+ llpanelsnapshotlocal.cpp
+ llpanelsnapshotoptions.cpp
+ llpanelsnapshotpostcard.cpp
+ llpanelsnapshotprofile.cpp
llpanelteleporthistory.cpp
llpaneltiptoast.cpp
llpanelvoiceeffect.cpp
@@ -414,6 +421,7 @@ set(viewer_SOURCE_FILES
llpopupview.cpp
llpolymesh.cpp
llpolymorph.cpp
+ llpostcard.cpp
llpreview.cpp
llpreviewanim.cpp
llpreviewgesture.cpp
@@ -603,6 +611,7 @@ set(viewer_SOURCE_FILES
llwearablelist.cpp
llwearabletype.cpp
llweb.cpp
+ llwebprofile.cpp
llwebsharing.cpp
llwind.cpp
llwindowlistener.cpp
@@ -786,7 +795,6 @@ set(viewer_HEADER_FILES
llfloateropenobject.h
llfloaterpay.h
llfloaterperms.h
- llfloaterpostcard.h
llfloaterpostprocess.h
llfloaterpreference.h
llfloaterproperties.h
@@ -957,6 +965,7 @@ set(viewer_HEADER_FILES
llpanelprimmediacontrols.h
llpanelprofile.h
llpanelprofileview.h
+ llpanelsnapshot.h
llpanelteleporthistory.h
llpaneltiptoast.h
llpanelvoicedevicesettings.h
@@ -975,6 +984,7 @@ set(viewer_HEADER_FILES
llpolymesh.h
llpolymorph.h
llpopupview.h
+ llpostcard.h
llpreview.h
llpreviewanim.h
llpreviewgesture.h
@@ -1164,6 +1174,7 @@ set(viewer_HEADER_FILES
llwearablelist.h
llwearabletype.h
llweb.h
+ llwebprofile.h
llwebsharing.h
llwind.h
llwindowlistener.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5c0ea2f774..9812b2868f 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4667,6 +4667,17 @@
0.0.0
+ LastSnapshotToProfileHeight
+
+ Comment
+ The height of the last profile snapshot, in px
+ Persist
+ 1
+ Type
+ S32
+ Value
+ 768
+
LastSnapshotToEmailHeight
Comment
@@ -4678,6 +4689,17 @@
Value
768
+ LastSnapshotToProfileWidth
+
+ Comment
+ The width of the last profile snapshot, in px
+ Persist
+ 1
+ Type
+ S32
+ Value
+ 1024
+
LastSnapshotToEmailWidth
Comment
@@ -4733,17 +4755,6 @@
Value
512
- LastSnapshotType
-
- Comment
- Select this as next type of snapshot to take (0 = postcard, 1 = texture, 2 = local image)
- Persist
- 1
- Type
- S32
- Value
- 0
-
LeftClickShowMenu
Comment
@@ -10608,6 +10619,17 @@
Value
0
+ SnapshotProfileLastResolution
+
+ Comment
+ Take next profile snapshot at this resolution
+ Persist
+ 1
+ Type
+ S32
+ Value
+ 0
+
SnapshotPostcardLastResolution
Comment
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
deleted file mode 100644
index 3bcbb987f7..0000000000
--- a/indra/newview/llfloaterpostcard.cpp
+++ /dev/null
@@ -1,384 +0,0 @@
-/**
- * @file llfloaterpostcard.cpp
- * @brief Postcard send floater, allows setting name, e-mail address, etc.
- *
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterpostcard.h"
-
-#include "llfontgl.h"
-#include "llsys.h"
-#include "llgl.h"
-#include "v3dmath.h"
-#include "lldir.h"
-
-#include "llagent.h"
-#include "llui.h"
-#include "lllineeditor.h"
-#include "llbutton.h"
-#include "lltexteditor.h"
-#include "llfloaterreg.h"
-#include "llnotificationsutil.h"
-#include "llviewercontrol.h"
-#include "llviewernetwork.h"
-#include "lluictrlfactory.h"
-#include "lluploaddialog.h"
-#include "llviewerstats.h"
-#include "llviewerwindow.h"
-#include "llstatusbar.h"
-#include "llviewerregion.h"
-#include "lleconomy.h"
-#include "message.h"
-
-#include "llimagejpeg.h"
-#include "llimagej2c.h"
-#include "llvfile.h"
-#include "llvfs.h"
-#include "llviewertexture.h"
-#include "llassetuploadresponders.h"
-#include "llagentui.h"
-
-#include //boost.regex lib
-
-///----------------------------------------------------------------------------
-/// Local function declarations, constants, enums, and typedefs
-///----------------------------------------------------------------------------
-
-///----------------------------------------------------------------------------
-/// Class LLFloaterPostcard
-///----------------------------------------------------------------------------
-
-LLFloaterPostcard::LLFloaterPostcard(const LLSD& key)
-: LLFloater(key),
- mJPEGImage(NULL),
- mViewerImage(NULL),
- mHasFirstMsgFocus(false)
-{
-}
-
-// Destroys the object
-LLFloaterPostcard::~LLFloaterPostcard()
-{
- mJPEGImage = NULL; // deletes image
-}
-
-BOOL LLFloaterPostcard::postBuild()
-{
- // pick up the user's up-to-date email address
- gAgent.sendAgentUserInfoRequest();
-
- childSetAction("cancel_btn", onClickCancel, this);
- childSetAction("send_btn", onClickSend, this);
-
- getChildView("from_form")->setEnabled(FALSE);
-
- std::string name_string;
- LLAgentUI::buildFullname(name_string);
- getChild("name_form")->setValue(LLSD(name_string));
-
- // For the first time a user focusess to .the msg box, all text will be selected.
- getChild("msg_form")->setFocusChangedCallback(boost::bind(onMsgFormFocusRecieved, _1, this));
-
- getChild("to_form")->setFocus(TRUE);
-
- return TRUE;
-}
-
-// static
-LLFloaterPostcard* LLFloaterPostcard::showFromSnapshot(LLImageJPEG *jpeg, LLViewerTexture *img, const LLVector2 &image_scale, const LLVector3d& pos_taken_global)
-{
- // Take the images from the caller
- // It's now our job to clean them up
- LLFloaterPostcard* instance = LLFloaterReg::showTypedInstance("postcard", LLSD(img->getID()));
-
- if (instance) // may be 0 if we're in mouselook mode
- {
- instance->mJPEGImage = jpeg;
- instance->mViewerImage = img;
- instance->mImageScale = image_scale;
- instance->mPosTakenGlobal = pos_taken_global;
- }
-
- return instance;
-}
-
-void LLFloaterPostcard::draw()
-{
- LLGLSUIDefault gls_ui;
- LLFloater::draw();
-
- if(!isMinimized() && mViewerImage.notNull() && mJPEGImage.notNull())
- {
- // Force the texture to be 100% opaque when the floater is focused.
- F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
- LLRect rect(getRect());
-
- // first set the max extents of our preview
- rect.translate(-rect.mLeft, -rect.mBottom);
- rect.mLeft += 320;
- rect.mRight -= 10;
- rect.mTop -= 27;
- rect.mBottom = rect.mTop - 130;
-
- // then fix the aspect ratio
- F32 ratio = (F32)mJPEGImage->getWidth() / (F32)mJPEGImage->getHeight();
- if ((F32)rect.getWidth() / (F32)rect.getHeight() >= ratio)
- {
- rect.mRight = LLRect::tCoordType((F32)rect.mLeft + ((F32)rect.getHeight() * ratio));
- }
- else
- {
- rect.mBottom = LLRect::tCoordType((F32)rect.mTop - ((F32)rect.getWidth() / ratio));
- }
- {
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gl_rect_2d(rect, LLColor4(0.f, 0.f, 0.f, 1.f) % alpha);
- rect.stretch(-1);
- }
- {
-
- glMatrixMode(GL_TEXTURE);
- glPushMatrix();
- {
- glScalef(mImageScale.mV[VX], mImageScale.mV[VY], 1.f);
- glMatrixMode(GL_MODELVIEW);
- gl_draw_scaled_image(rect.mLeft,
- rect.mBottom,
- rect.getWidth(),
- rect.getHeight(),
- mViewerImage.get(),
- LLColor4::white % alpha);
- }
- glMatrixMode(GL_TEXTURE);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- }
- }
-}
-
-// static
-void LLFloaterPostcard::onClickCancel(void* data)
-{
- if (data)
- {
- LLFloaterPostcard *self = (LLFloaterPostcard *)data;
-
- self->closeFloater(false);
- }
-}
-
-class LLSendPostcardResponder : public LLAssetUploadResponder
-{
-public:
- LLSendPostcardResponder(const LLSD &post_data,
- const LLUUID& vfile_id,
- LLAssetType::EType asset_type):
- LLAssetUploadResponder(post_data, vfile_id, asset_type)
- {
- }
- // *TODO define custom uploadFailed here so it's not such a generic message
- void uploadComplete(const LLSD& content)
- {
- // we don't care about what the server returns from this post, just clean up the UI
- LLUploadDialog::modalUploadFinished();
- }
-};
-
-// static
-void LLFloaterPostcard::onClickSend(void* data)
-{
- if (data)
- {
- LLFloaterPostcard *self = (LLFloaterPostcard *)data;
-
- std::string from(self->getChild("from_form")->getValue().asString());
- std::string to(self->getChild("to_form")->getValue().asString());
-
- boost::regex emailFormat("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
-
- if (to.empty() || !boost::regex_match(to, emailFormat))
- {
- LLNotificationsUtil::add("PromptRecipientEmail");
- return;
- }
-
- if (from.empty() || !boost::regex_match(from, emailFormat))
- {
- LLNotificationsUtil::add("PromptSelfEmail");
- return;
- }
-
- std::string subject(self->getChild("subject_form")->getValue().asString());
- if(subject.empty() || !self->mHasFirstMsgFocus)
- {
- LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLFloaterPostcard::missingSubjMsgAlertCallback, self, _1, _2));
- return;
- }
-
- if (self->mJPEGImage.notNull())
- {
- self->sendPostcard();
- }
- else
- {
- LLNotificationsUtil::add("ErrorProcessingSnapshot");
- }
- }
-}
-
-// static
-void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
-{
- LLFloaterPostcard *self = (LLFloaterPostcard *)user_data;
-
- LLUploadDialog::modalUploadFinished();
-
- if (result)
- {
- LLSD args;
- args["REASON"] = std::string(LLAssetStorage::getErrorString(result));
- LLNotificationsUtil::add("ErrorUploadingPostcard", args);
- }
- else
- {
- // only create the postcard once the upload succeeds
-
- // request the postcard
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessage("SendPostcard");
- msg->nextBlock("AgentData");
- msg->addUUID("AgentID", gAgent.getID());
- msg->addUUID("SessionID", gAgent.getSessionID());
- msg->addUUID("AssetID", self->mAssetID);
- msg->addVector3d("PosGlobal", self->mPosTakenGlobal);
- msg->addString("To", self->getChild("to_form")->getValue().asString());
- msg->addString("From", self->getChild("from_form")->getValue().asString());
- msg->addString("Name", self->getChild("name_form")->getValue().asString());
- msg->addString("Subject", self->getChild("subject_form")->getValue().asString());
- msg->addString("Msg", self->getChild("msg_form")->getValue().asString());
- msg->addBOOL("AllowPublish", FALSE);
- msg->addBOOL("MaturePublish", FALSE);
- gAgent.sendReliableMessage();
- }
-
- self->closeFloater();
-}
-
-// static
-void LLFloaterPostcard::updateUserInfo(const std::string& email)
-{
- LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("postcard");
- for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin();
- iter != inst_list.end(); ++iter)
- {
- LLFloater* instance = *iter;
- const std::string& text = instance->getChild("from_form")->getValue().asString();
- if (text.empty())
- {
- // there's no text in this field yet, pre-populate
- instance->getChild("from_form")->setValue(LLSD(email));
- }
- }
-}
-
-void LLFloaterPostcard::onMsgFormFocusRecieved(LLFocusableElement* receiver, void* data)
-{
- LLFloaterPostcard* self = (LLFloaterPostcard *)data;
- if(self)
- {
- LLTextEditor* msgForm = self->getChild("msg_form");
- if(msgForm && msgForm == receiver && msgForm->hasFocus() && !(self->mHasFirstMsgFocus))
- {
- self->mHasFirstMsgFocus = true;
- msgForm->setText(LLStringUtil::null);
- }
- }
-}
-
-bool LLFloaterPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if(0 == option)
- {
- // User clicked OK
- if((getChild("subject_form")->getValue().asString()).empty())
- {
- // Stuff the subject back into the form.
- getChild("subject_form")->setValue(getString("default_subject"));
- }
-
- if(!mHasFirstMsgFocus)
- {
- // The user never switched focus to the messagee window.
- // Using the default string.
- getChild("msg_form")->setValue(getString("default_message"));
- }
-
- sendPostcard();
- }
- return false;
-}
-
-void LLFloaterPostcard::sendPostcard()
-{
- mTransactionID.generate();
- mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID());
- LLVFile::writeFile(mJPEGImage->getData(), mJPEGImage->getDataSize(), gVFS, mAssetID, LLAssetType::AT_IMAGE_JPEG);
-
- // upload the image
- std::string url = gAgent.getRegion()->getCapability("SendPostcard");
- if(!url.empty())
- {
- llinfos << "Send Postcard via capability" << llendl;
- LLSD body = LLSD::emptyMap();
- // the capability already encodes: agent ID, region ID
- body["pos-global"] = mPosTakenGlobal.getValue();
- body["to"] = getChild("to_form")->getValue().asString();
- body["from"] = getChild("from_form")->getValue().asString();
- body["name"] = getChild("name_form")->getValue().asString();
- body["subject"] = getChild("subject_form")->getValue().asString();
- body["msg"] = getChild("msg_form")->getValue().asString();
- LLHTTPClient::post(url, body, new LLSendPostcardResponder(body, mAssetID, LLAssetType::AT_IMAGE_JPEG));
- }
- else
- {
- gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE);
- }
-
- // give user feedback of the event
- gViewerWindow->playSnapshotAnimAndSound();
- LLUploadDialog::modalUploadDialog(getString("upload_message"));
-
- // don't destroy the window until the upload is done
- // this way we keep the information in the form
- setVisible(FALSE);
-
- // also remove any dependency on another floater
- // so that we can be sure to outlive it while we
- // need to.
- LLFloater* dependee = getDependee();
- if (dependee)
- dependee->removeDependentFloater(this);
-}
diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h
deleted file mode 100644
index 472592154f..0000000000
--- a/indra/newview/llfloaterpostcard.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file llfloaterpostcard.h
- * @brief Postcard send floater, allows setting name, e-mail address, etc.
- *
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLOATERPOSTCARD_H
-#define LL_LLFLOATERPOSTCARD_H
-
-#include "llfloater.h"
-#include "llcheckboxctrl.h"
-
-#include "llpointer.h"
-
-class LLTextEditor;
-class LLLineEditor;
-class LLButton;
-class LLViewerTexture;
-class LLImageJPEG;
-
-class LLFloaterPostcard
-: public LLFloater
-{
-public:
- LLFloaterPostcard(const LLSD& key);
- virtual ~LLFloaterPostcard();
-
- virtual BOOL postBuild();
- virtual void draw();
-
- static LLFloaterPostcard* showFromSnapshot(LLImageJPEG *jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global);
-
- static void onClickCancel(void* data);
- static void onClickSend(void* data);
-
- static void uploadCallback(const LLUUID& asset_id,
- void *user_data,
- S32 result, LLExtStat ext_status);
-
- static void updateUserInfo(const std::string& email);
-
- static void onMsgFormFocusRecieved(LLFocusableElement* receiver, void* data);
- bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response);
-
- void sendPostcard();
-
-private:
-
- LLPointer mJPEGImage;
- LLPointer mViewerImage;
- LLTransactionID mTransactionID;
- LLAssetID mAssetID;
- LLVector2 mImageScale;
- LLVector3d mPosTakenGlobal;
- bool mHasFirstMsgFocus;
-};
-
-
-#endif // LL_LLFLOATERPOSTCARD_H
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 8105844b0d..c8c66931a1 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -42,6 +42,8 @@
#include "llcombobox.h"
#include "lleconomy.h"
#include "lllandmarkactions.h"
+#include "llpanelsnapshot.h"
+#include "llsidetraypanelcontainer.h"
#include "llsliderctrl.h"
#include "llspinctrl.h"
#include "llviewercontrol.h"
@@ -50,9 +52,7 @@
#include "llviewercamera.h"
#include "llviewerwindow.h"
#include "llviewermenufile.h" // upload_new_resource()
-#include "llfloaterpostcard.h"
#include "llcheckboxctrl.h"
-#include "llradiogroup.h"
#include "llslurl.h"
#include "lltoolfocus.h"
#include "lltoolmgr.h"
@@ -76,18 +76,17 @@
#include "llimagej2c.h"
#include "lllocalcliprect.h"
#include "llnotificationsutil.h"
+#include "llpostcard.h"
#include "llresmgr.h" // LLLocale
#include "llvfile.h"
#include "llvfs.h"
+#include "llwebprofile.h"
#include "llwindow.h"
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
-S32 LLFloaterSnapshot::sUIWinHeightLong = 530 ;
-S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 240 ;
-S32 LLFloaterSnapshot::sUIWinWidth = 215 ;
-
+LLRect LLFloaterSnapshot::sThumbnailPlaceholderRect;
LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
@@ -101,6 +100,9 @@ S32 BORDER_WIDTH = 6;
const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
+static std::string lastSnapshotWidthName(S32 shot_type);
+static std::string lastSnapshotHeightName(S32 shot_type);
+
static LLDefaultChildRegistry::Register r("snapshot_floater_view");
///----------------------------------------------------------------------------
@@ -108,6 +110,7 @@ static LLDefaultChildRegistry::Register r("snapshot_float
///----------------------------------------------------------------------------
class LLSnapshotLivePreview : public LLView
{
+ LOG_CLASS(LLSnapshotLivePreview);
public:
enum ESnapshotType
{
@@ -154,6 +157,7 @@ public:
F32 getAspect() ;
LLRect getImageRect();
BOOL isImageScaled();
+ const LLVector3d& getPosTakenGlobal() const { return mPosTakenGlobal; }
void setSnapshotType(ESnapshotType type) { mSnapshotType = type; }
void setSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat type) { mSnapshotFormat = type; }
@@ -161,10 +165,12 @@ public:
void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; }
void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f);
void saveWeb();
- LLFloaterPostcard* savePostcard();
void saveTexture();
BOOL saveLocal();
+ LLPointer getFormattedImage() const { return mFormattedImage; }
+ LLPointer getEncodedImage() const { return mPreviewImageEncoded; }
+
BOOL setThumbnailImageSize() ;
void generateThumbnailImage(BOOL force_update = FALSE) ;
void resetThumbnailImage() { mThumbnailImage = NULL ; }
@@ -327,7 +333,8 @@ BOOL LLSnapshotLivePreview::isImageScaled()
}
void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay)
-{
+{
+ lldebugs << "updateSnapshot: mSnapshotUpToDate = " << mSnapshotUpToDate << llendl;
if (mSnapshotUpToDate)
{
S32 old_image_index = mCurImageIndex;
@@ -367,6 +374,7 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail
{
mSnapshotDelayTimer.start();
mSnapshotDelayTimer.setTimerExpirySec(delay);
+ LLFloaterSnapshot::preUpdate();
}
if(new_thumbnail)
{
@@ -629,8 +637,10 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize()
F32 window_aspect_ratio = ((F32)window_width) / ((F32)window_height);
// UI size for thumbnail
- S32 max_width = LLFloaterSnapshot::getUIWinWidth() - 20;
- S32 max_height = 90;
+ // *FIXME: the rect does not change, so maybe there's no need to recalculate max w/h.
+ const LLRect& thumbnail_rect = LLFloaterSnapshot::getThumbnailPlaceholderRect();
+ S32 max_width = thumbnail_rect.getWidth();
+ S32 max_height = thumbnail_rect.getHeight();
if (window_aspect_ratio > (F32)max_width / max_height)
{
@@ -746,7 +756,15 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
//static
BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
{
- LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview;
+ LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview;
+
+#if 1 // XXX tmp
+ if (previewp->mWidth[previewp->mCurImageIndex] == 0 || previewp->mHeight[previewp->mCurImageIndex] == 0)
+ {
+ llwarns << "Incorrect dimensions: " << previewp->mWidth[previewp->mCurImageIndex] << "x" << previewp->mHeight[previewp->mCurImageIndex] << llendl;
+ return FALSE;
+ }
+#endif
LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin();
LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion();
@@ -774,6 +792,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
// time to produce a snapshot
+ lldebugs << "producing snapshot" << llendl;
if (!previewp->mPreviewImage)
{
previewp->mPreviewImage = new LLImageRaw;
@@ -809,6 +828,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
if(previewp->getSnapshotType() == SNAPSHOT_TEXTURE)
{
+ lldebugs << "Encoding new image of format J2C" << llendl;
LLPointer formatted = new LLImageJ2C;
LLPointer scaled = new LLImageRaw(
previewp->mPreviewImage->getData(),
@@ -841,6 +861,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
{
format = previewp->getSnapshotFormat();
}
+ lldebugs << "Encoding new image of format " << format << llendl;
switch(format)
{
@@ -920,12 +941,15 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
{
previewp->generateThumbnailImage() ;
}
+ lldebugs << "done creating snapshot" << llendl;
+ LLFloaterSnapshot::postUpdate();
return TRUE;
}
void LLSnapshotLivePreview::setSize(S32 w, S32 h)
{
+ lldebugs << "setSize(" << w << ", " << h << ")" << llendl;
mWidth[mCurImageIndex] = w;
mHeight[mCurImageIndex] = h;
}
@@ -936,40 +960,9 @@ void LLSnapshotLivePreview::getSize(S32& w, S32& h) const
h = mHeight[mCurImageIndex];
}
-LLFloaterPostcard* LLSnapshotLivePreview::savePostcard()
-{
- if(mViewerImage[mCurImageIndex].isNull())
- {
- //this should never happen!!
- llwarns << "The snapshot image has not been generated!" << llendl ;
- return NULL ;
- }
-
- // calculate and pass in image scale in case image data only use portion
- // of viewerimage buffer
- LLVector2 image_scale(1.f, 1.f);
- if (!isImageScaled())
- {
- image_scale.setVec(llmin(1.f, (F32)mWidth[mCurImageIndex] / (F32)getCurrentImage()->getWidth()), llmin(1.f, (F32)mHeight[mCurImageIndex] / (F32)getCurrentImage()->getHeight()));
- }
-
- LLImageJPEG* jpg = dynamic_cast(mFormattedImage.get());
- if(!jpg)
- {
- llwarns << "Formatted image not a JPEG" << llendl;
- return NULL;
- }
- LLFloaterPostcard* floater = LLFloaterPostcard::showFromSnapshot(jpg, mViewerImage[mCurImageIndex], image_scale, mPosTakenGlobal);
- // relinquish lifetime of jpeg image to postcard floater
- mFormattedImage = NULL;
- mDataSize = 0;
- updateSnapshot(FALSE, FALSE);
-
- return floater;
-}
-
void LLSnapshotLivePreview::saveTexture()
{
+ lldebugs << "saving texture: " << mPreviewImage->getWidth() << "x" << mPreviewImage->getHeight() << llendl;
// gen a new uuid for this asset
LLTransactionID tid;
tid.generate();
@@ -982,6 +975,7 @@ void LLSnapshotLivePreview::saveTexture()
mPreviewImage->getComponents());
scaled->biasedScaleToPowerOfTwo(512);
+ lldebugs << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << llendl;
if (formatted->encode(scaled, 0.0f))
{
@@ -1020,9 +1014,10 @@ void LLSnapshotLivePreview::saveTexture()
BOOL LLSnapshotLivePreview::saveLocal()
{
- BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage);
+ BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage, true);
// Relinquish image memory. Save button will be disabled as a side-effect.
+ lldebugs << "resetting formatted image after saving to disk" << llendl;
mFormattedImage = NULL;
mDataSize = 0;
updateSnapshot(FALSE, FALSE);
@@ -1080,29 +1075,40 @@ public:
mAvatarPauseHandles.clear();
}
- static void onClickDiscard(void* data);
- static void onClickKeep(void* data);
- static void onCommitSave(LLUICtrl* ctrl, void* data);
static void onClickNewSnapshot(void* data);
static void onClickAutoSnap(LLUICtrl *ctrl, void* data);
//static void onClickAdvanceSnap(LLUICtrl *ctrl, void* data);
- static void onClickLess(void* data) ;
static void onClickMore(void* data) ;
static void onClickUICheck(LLUICtrl *ctrl, void* data);
static void onClickHUDCheck(LLUICtrl *ctrl, void* data);
static void onClickKeepOpenCheck(LLUICtrl *ctrl, void* data);
+#if 0
static void onClickKeepAspectCheck(LLUICtrl *ctrl, void* data);
- static void onCommitQuality(LLUICtrl* ctrl, void* data);
+#endif
+ static void applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL checked);
static void onCommitResolution(LLUICtrl* ctrl, void* data) { updateResolution(ctrl, data); }
static void updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update = TRUE);
static void onCommitFreezeFrame(LLUICtrl* ctrl, void* data);
static void onCommitLayerTypes(LLUICtrl* ctrl, void*data);
+ static void onImageQualityChange(LLFloaterSnapshot* view, S32 quality_val);
+ static void onImageFormatChange(LLFloaterSnapshot* view);
+#if 0
static void onCommitSnapshotType(LLUICtrl* ctrl, void* data);
- static void onCommitSnapshotFormat(LLUICtrl* ctrl, void* data);
static void onCommitCustomResolution(LLUICtrl *ctrl, void* data);
+#endif
+ static void applyCustomResolution(LLFloaterSnapshot* view, S32 w, S32 h);
+ static void onSnapshotUploadFinished(LLSideTrayPanelContainer* panel_container, bool status);
+ static void onSendingPostcardFinished(LLSideTrayPanelContainer* panel_container, bool status);
static void resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height) ;
static BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value);
+ static LLPanelSnapshot* getActivePanel(LLFloaterSnapshot* floater, bool ok_if_not_found = true);
+ static LLSnapshotLivePreview::ESnapshotType getActiveSnapshotType(LLFloaterSnapshot* floater);
+ static LLFloaterSnapshot::ESnapshotFormat getImageFormat(LLFloaterSnapshot* floater);
+ static LLSpinCtrl* getWidthSpinner(LLFloaterSnapshot* floater);
+ static LLSpinCtrl* getHeightSpinner(LLFloaterSnapshot* floater);
+ static void enableAspectRatioCheckbox(LLFloaterSnapshot* floater, BOOL enable);
+
static LLSnapshotLivePreview* getPreviewView(LLFloaterSnapshot *floater);
static void setResolution(LLFloaterSnapshot* floater, const std::string& comboname);
static void updateControls(LLFloaterSnapshot* floater);
@@ -1110,9 +1116,8 @@ public:
static void updateResolutionTextEntry(LLFloaterSnapshot* floater);
private:
- static LLSnapshotLivePreview::ESnapshotType getTypeIndex(LLFloaterSnapshot* floater);
+ static LLSnapshotLivePreview::ESnapshotType getTypeIndex(const std::string& id);
static LLSD getTypeName(LLSnapshotLivePreview::ESnapshotType index);
- static ESnapshotFormat getFormatIndex(LLFloaterSnapshot* floater);
static LLViewerWindow::ESnapshotType getLayerType(LLFloaterSnapshot* floater);
static void comboSetCustom(LLFloaterSnapshot *floater, const std::string& comboname);
static void checkAutoSnapshot(LLSnapshotLivePreview* floater, BOOL update_thumbnail = FALSE);
@@ -1126,6 +1131,77 @@ public:
bool mAspectRatioCheckOff ;
};
+// static
+LLPanelSnapshot* LLFloaterSnapshot::Impl::getActivePanel(LLFloaterSnapshot* floater, bool ok_if_not_found)
+{
+ LLSideTrayPanelContainer* panel_container = floater->getChild("panel_container");
+ LLPanelSnapshot* active_panel = dynamic_cast(panel_container->getCurrentPanel());
+ if (!ok_if_not_found)
+ {
+ llassert_always(active_panel != NULL);
+ }
+ return active_panel;
+}
+
+// static
+LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getActiveSnapshotType(LLFloaterSnapshot* floater)
+{
+ LLSnapshotLivePreview::ESnapshotType type = LLSnapshotLivePreview::SNAPSHOT_WEB;
+ std::string name;
+ LLPanelSnapshot* spanel = getActivePanel(floater);
+
+ if (spanel)
+ {
+ name = spanel->getName();
+ }
+
+ if (name == "panel_snapshot_postcard")
+ {
+ type = LLSnapshotLivePreview::SNAPSHOT_POSTCARD;
+ }
+ else if (name == "panel_snapshot_inventory")
+ {
+ type = LLSnapshotLivePreview::SNAPSHOT_TEXTURE;
+ }
+ else if (name == "panel_snapshot_local")
+ {
+ type = LLSnapshotLivePreview::SNAPSHOT_LOCAL;
+ }
+
+ return type;
+}
+
+// static
+LLFloaterSnapshot::ESnapshotFormat LLFloaterSnapshot::Impl::getImageFormat(LLFloaterSnapshot* floater)
+{
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ return active_panel ? active_panel->getImageFormat() : LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG;
+}
+
+// static
+LLSpinCtrl* LLFloaterSnapshot::Impl::getWidthSpinner(LLFloaterSnapshot* floater)
+{
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ return active_panel ? active_panel->getWidthSpinner() : floater->getChild("snapshot_width");
+}
+
+// static
+LLSpinCtrl* LLFloaterSnapshot::Impl::getHeightSpinner(LLFloaterSnapshot* floater)
+{
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ return active_panel ? active_panel->getHeightSpinner() : floater->getChild("snapshot_height");
+}
+
+// static
+void LLFloaterSnapshot::Impl::enableAspectRatioCheckbox(LLFloaterSnapshot* floater, BOOL enable)
+{
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ if (active_panel)
+ {
+ active_panel->enableAspectRatioCheckbox(enable);
+ }
+}
+
// static
LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(LLFloaterSnapshot *floater)
{
@@ -1134,12 +1210,10 @@ LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(LLFloaterSnapshot
}
// static
-LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getTypeIndex(LLFloaterSnapshot* floater)
+LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getTypeIndex(const std::string& id)
{
LLSnapshotLivePreview::ESnapshotType index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD;
- LLSD value = floater->getChild("snapshot_type_radio")->getValue();
- const std::string id = value.asString();
if (id == "postcard")
{
index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD;
@@ -1183,26 +1257,6 @@ LLSD LLFloaterSnapshot::Impl::getTypeName(LLSnapshotLivePreview::ESnapshotType i
return LLSD(id);
}
-// static
-LLFloaterSnapshot::ESnapshotFormat LLFloaterSnapshot::Impl::getFormatIndex(LLFloaterSnapshot* floater)
-{
- ESnapshotFormat index = SNAPSHOT_FORMAT_PNG;
- if(floater->hasChild("local_format_combo"))
- {
- LLComboBox* local_format_combo = floater->findChild("local_format_combo");
- const std::string id = local_format_combo->getSelectedItemLabel();
- if (id == "PNG")
- index = SNAPSHOT_FORMAT_PNG;
- else if (id == "JPEG")
- index = SNAPSHOT_FORMAT_JPEG;
- else if (id == "BMP")
- index = SNAPSHOT_FORMAT_BMP;
- }
- return index;
-}
-
-
-
// static
LLViewerWindow::ESnapshotType LLFloaterSnapshot::Impl::getLayerType(LLFloaterSnapshot* floater)
{
@@ -1229,12 +1283,27 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
{
LLSnapshotLivePreview* previewp = getPreviewView(floaterp);
- S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ;
+ bool advanced = gSavedSettings.getBOOL("AdvanceSnapshot");
+
+ // Show/hide advanced options.
+ LLPanel* advanced_options_panel = floaterp->getChild("advanced_options_panel");
+ floaterp->getChild("advanced_options_btn")->setToggleState(advanced);
+ if (advanced != advanced_options_panel->getVisible())
+ {
+ S32 panel_width = advanced_options_panel->getRect().getWidth();
+ floaterp->getChild("advanced_options_panel")->setVisible(advanced);
+ S32 floater_width = floaterp->getRect().getWidth();
+ floater_width += (advanced ? panel_width : -panel_width);
+ floaterp->reshape(floater_width, floaterp->getRect().getHeight());
+ }
- if(!gSavedSettings.getBOOL("AdvanceSnapshot")) //set to original window resolution
+ if(!advanced) //set to original window resolution
{
previewp->mKeepAspectRatio = TRUE;
+ floaterp->getChild("profile_size_combo")->setCurrentByIndex(0);
+ gSavedSettings.setS32("SnapshotProfileLastResolution", 0);
+
floaterp->getChild("postcard_size_combo")->setCurrentByIndex(0);
gSavedSettings.setS32("SnapshotPostcardLastResolution", 0);
@@ -1256,7 +1325,8 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
floaterp->getParent()->setMouseOpaque(TRUE);
// shrink to smaller layout
- floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getUIWinHeightLong() + delta_height);
+ // *TODO: unneeded?
+ floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getRect().getHeight());
// can see and interact with fullscreen preview now
if (previewp)
@@ -1286,7 +1356,8 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
else // turning off freeze frame mode
{
floaterp->getParent()->setMouseOpaque(FALSE);
- floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getUIWinHeightLong() + delta_height);
+ // *TODO: unneeded?
+ floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getRect().getHeight());
if (previewp)
{
previewp->setVisible(FALSE);
@@ -1315,43 +1386,39 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
// static
void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
{
- LLRadioGroup* snapshot_type_radio = floater->getChild("snapshot_type_radio");
- LLSnapshotLivePreview::ESnapshotType shot_type = (LLSnapshotLivePreview::ESnapshotType)gSavedSettings.getS32("LastSnapshotType");
- snapshot_type_radio->setSelectedByValue(getTypeName(shot_type), true);
-
+ LLSnapshotLivePreview::ESnapshotType shot_type = getActiveSnapshotType(floater);
ESnapshotFormat shot_format = (ESnapshotFormat)gSavedSettings.getS32("SnapshotFormat");
LLViewerWindow::ESnapshotType layer_type = getLayerType(floater);
+#if 0
floater->getChildView("share_to_web")->setVisible( gSavedSettings.getBOOL("SnapshotSharingEnabled"));
+#endif
+#if 0
floater->getChildView("postcard_size_combo")->setVisible( FALSE);
floater->getChildView("texture_size_combo")->setVisible( FALSE);
floater->getChildView("local_size_combo")->setVisible( FALSE);
+#endif
+ floater->getChild("profile_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotProfileLastResolution"));
floater->getChild("postcard_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotPostcardLastResolution"));
floater->getChild("texture_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotTextureLastResolution"));
floater->getChild("local_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotLocalLastResolution"));
+#if 0
floater->getChild("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat"));
+#endif
// *TODO: Separate settings for Web images from postcards
- floater->getChildView("send_btn")->setVisible( shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD ||
- shot_type == LLSnapshotLivePreview::SNAPSHOT_WEB);
- floater->getChildView("upload_btn")->setVisible(shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE);
- floater->getChildView("save_btn")->setVisible( shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
- floater->getChildView("keep_aspect_check")->setEnabled(shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE && !floater->impl.mAspectRatioCheckOff);
+ enableAspectRatioCheckbox(floater, shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE && !floater->impl.mAspectRatioCheckOff);
floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
+#if 0
BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot");
BOOL is_local = shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL;
BOOL show_slider = (shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD ||
shot_type == LLSnapshotLivePreview::SNAPSHOT_WEB ||
(is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG));
- floater->getChildView("more_btn")->setVisible( !is_advance); // the only item hidden in advanced mode
- floater->getChildView("less_btn")->setVisible( is_advance);
- floater->getChildView("type_label2")->setVisible( is_advance);
- floater->getChildView("format_label")->setVisible( is_advance && is_local);
- floater->getChildView("local_format_combo")->setVisible( is_advance && is_local);
floater->getChildView("layer_types")->setVisible( is_advance);
floater->getChildView("layer_type_label")->setVisible( is_advance);
floater->getChildView("snapshot_width")->setVisible( is_advance);
@@ -1363,47 +1430,59 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
floater->getChildView("freeze_frame_check")->setVisible( is_advance);
floater->getChildView("auto_snapshot_check")->setVisible( is_advance);
floater->getChildView("image_quality_slider")->setVisible( is_advance && show_slider);
+#endif
+
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ if (active_panel)
+ {
+ LLSpinCtrl* width_ctrl = getWidthSpinner(floater);
+ LLSpinCtrl* height_ctrl = getHeightSpinner(floater);
- if (gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot"))
- { //clamp snapshot resolution to window size when showing UI or HUD in snapshot
+ // Initialize spinners.
+ if (width_ctrl->getValue().asInteger() == 0)
+ {
+ S32 w = gSavedSettings.getS32(lastSnapshotWidthName(shot_type));
+ lldebugs << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << llendl;
+ width_ctrl->setValue(w);
+ }
+ if (height_ctrl->getValue().asInteger() == 0)
+ {
+ S32 h = gSavedSettings.getS32(lastSnapshotHeightName(shot_type));
+ lldebugs << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << llendl;
+ height_ctrl->setValue(h);
+ }
- LLSpinCtrl* width_ctrl = floater->getChild("snapshot_width");
- LLSpinCtrl* height_ctrl = floater->getChild("snapshot_height");
+ if (gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot"))
+ { //clamp snapshot resolution to window size when showing UI or HUD in snapshot
+ S32 width = gViewerWindow->getWindowWidthRaw();
+ S32 height = gViewerWindow->getWindowHeightRaw();
- S32 width = gViewerWindow->getWindowWidthRaw();
- S32 height = gViewerWindow->getWindowHeightRaw();
+ width_ctrl->setMaxValue(width);
- width_ctrl->setMaxValue(width);
-
- height_ctrl->setMaxValue(height);
+ height_ctrl->setMaxValue(height);
- if (width_ctrl->getValue().asInteger() > width)
- {
- width_ctrl->forceSetValue(width);
+ if (width_ctrl->getValue().asInteger() > width)
+ {
+ width_ctrl->forceSetValue(width);
+ }
+ if (height_ctrl->getValue().asInteger() > height)
+ {
+ height_ctrl->forceSetValue(height);
+ }
}
- if (height_ctrl->getValue().asInteger() > height)
+ else
{
- height_ctrl->forceSetValue(height);
+ width_ctrl->setMaxValue(6016);
+ height_ctrl->setMaxValue(6016);
}
}
- else
- {
- LLSpinCtrl* width = floater->getChild("snapshot_width");
- width->setMaxValue(6016);
- LLSpinCtrl* height = floater->getChild("snapshot_height");
- height->setMaxValue(6016);
- }
LLSnapshotLivePreview* previewp = getPreviewView(floater);
BOOL got_bytes = previewp && previewp->getDataSize() > 0;
BOOL got_snap = previewp && previewp->getSnapshotUpToDate();
// *TODO: Separate maximum size for Web images from postcards
- floater->getChildView("send_btn")->setEnabled((shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD ||
- shot_type == LLSnapshotLivePreview::SNAPSHOT_WEB) &&
- got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE);
- floater->getChildView("upload_btn")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap);
- floater->getChildView("save_btn")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap);
+ //lldebugs << "Is snapshot up-to-date? " << got_snap << llendl;
LLLocale locale(LLLocale::USER_LOCALE);
std::string bytes_string;
@@ -1411,9 +1490,25 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
{
LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 );
}
+
+ // FIXME: move this to the panel code
S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
- floater->getChild("texture")->setLabelArg("[AMOUNT]", llformat("%d",upload_cost));
- floater->getChild("upload_btn")->setLabelArg("[AMOUNT]", llformat("%d",upload_cost));
+ floater->getChild("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d",upload_cost));
+
+ // Update displayed image resolution.
+ LLTextBox* image_res_tb = floater->getChild("image_res_text");
+ image_res_tb->setVisible(got_snap);
+ if (got_snap)
+ {
+#if 1
+ LLPointer img = previewp->getEncodedImage();
+#else
+ LLPointer fimg = previewp->getFormattedImage();
+#endif
+ image_res_tb->setTextArg("[WIDTH]", llformat("%d", img->getWidth()));
+ image_res_tb->setTextArg("[HEIGHT]", llformat("%d", img->getHeight()));
+ }
+
floater->getChild("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown"));
floater->getChild("file_size_label")->setColor(
shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD
@@ -1422,29 +1517,23 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
switch(shot_type)
{
- // *TODO: Separate settings for Web images from postcards
case LLSnapshotLivePreview::SNAPSHOT_WEB:
+ layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR;
+ floater->getChild("layer_types")->setValue("colors");
+ setResolution(floater, "profile_size_combo");
+ break;
case LLSnapshotLivePreview::SNAPSHOT_POSTCARD:
layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR;
floater->getChild("layer_types")->setValue("colors");
- if(is_advance)
- {
- setResolution(floater, "postcard_size_combo");
- }
+ setResolution(floater, "postcard_size_combo");
break;
case LLSnapshotLivePreview::SNAPSHOT_TEXTURE:
layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR;
floater->getChild("layer_types")->setValue("colors");
- if(is_advance)
- {
- setResolution(floater, "texture_size_combo");
- }
+ setResolution(floater, "texture_size_combo");
break;
case LLSnapshotLivePreview::SNAPSHOT_LOCAL:
- if(is_advance)
- {
- setResolution(floater, "local_size_combo");
- }
+ setResolution(floater, "local_size_combo");
break;
default:
break;
@@ -1458,15 +1547,23 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
previewp->setSnapshotFormat(shot_format);
previewp->setSnapshotBufferType(layer_type);
}
+
+ LLPanelSnapshot* current_panel = Impl::getActivePanel(floater);
+ if (current_panel)
+ {
+ LLSD info;
+ info["have-snapshot"] = got_snap;
+ current_panel->updateControls(info);
+ }
}
// static
void LLFloaterSnapshot::Impl::updateResolutionTextEntry(LLFloaterSnapshot* floater)
{
- LLSpinCtrl* width_spinner = floater->getChild("snapshot_width");
- LLSpinCtrl* height_spinner = floater->getChild("snapshot_height");
+ LLSpinCtrl* width_spinner = getWidthSpinner(floater);
+ LLSpinCtrl* height_spinner = getHeightSpinner(floater);
- if(getTypeIndex(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
+ if(getActiveSnapshotType(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
{
width_spinner->setAllowEdit(FALSE);
height_spinner->setAllowEdit(FALSE);
@@ -1488,81 +1585,6 @@ void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp,
}
}
-// static
-void LLFloaterSnapshot::Impl::onClickDiscard(void* data)
-{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
-
- if (view)
- {
- view->closeFloater();
- }
-}
-
-
-// static
-void LLFloaterSnapshot::Impl::onCommitSave(LLUICtrl* ctrl, void* data)
-{
- if (ctrl->getValue().asString() == "save as")
- {
- gViewerWindow->resetSnapshotLoc();
- }
- onClickKeep(data);
-}
-
-// static
-void LLFloaterSnapshot::Impl::onClickKeep(void* data)
-{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
- LLSnapshotLivePreview* previewp = getPreviewView(view);
-
- if (previewp)
- {
- switch (previewp->getSnapshotType())
- {
- case LLSnapshotLivePreview::SNAPSHOT_WEB:
- previewp->saveWeb();
- break;
-
- case LLSnapshotLivePreview::SNAPSHOT_POSTCARD:
- {
- LLFloaterPostcard* floater = previewp->savePostcard();
- // if still in snapshot mode, put postcard floater in snapshot floaterview
- // and link it to snapshot floater
- if (floater && !gSavedSettings.getBOOL("CloseSnapshotOnKeep"))
- {
- gFloaterView->removeChild(floater);
- gSnapshotFloaterView->addChild(floater);
- view->addDependentFloater(floater, FALSE);
- }
- }
- break;
-
- case LLSnapshotLivePreview::SNAPSHOT_TEXTURE:
- previewp->saveTexture();
- break;
-
- case LLSnapshotLivePreview::SNAPSHOT_LOCAL:
- previewp->saveLocal();
- break;
-
- default:
- break;
- }
-
- if (gSavedSettings.getBOOL("CloseSnapshotOnKeep"))
- {
- view->closeFloater();
- }
- else
- {
- checkAutoSnapshot(previewp);
- }
-
- updateControls(view);
- }
-}
-
// static
void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
{
@@ -1590,32 +1612,19 @@ void LLFloaterSnapshot::Impl::onClickAutoSnap(LLUICtrl *ctrl, void* data)
void LLFloaterSnapshot::Impl::onClickMore(void* data)
{
- gSavedSettings.setBOOL( "AdvanceSnapshot", TRUE );
+ BOOL visible = gSavedSettings.getBOOL("AdvanceSnapshot");
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
if (view)
{
+ gSavedSettings.setBOOL("AdvanceSnapshot", !visible);
+#if 0
view->translate( 0, view->getUIWinHeightShort() - view->getUIWinHeightLong() );
view->reshape(view->getRect().getWidth(), view->getUIWinHeightLong());
+#endif
updateControls(view) ;
updateLayout(view) ;
- if(getPreviewView(view))
- {
- getPreviewView(view)->setThumbnailImageSize() ;
- }
- }
-}
-void LLFloaterSnapshot::Impl::onClickLess(void* data)
-{
- gSavedSettings.setBOOL( "AdvanceSnapshot", FALSE );
-
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
- if (view)
- {
- view->translate( 0, view->getUIWinHeightLong() - view->getUIWinHeightShort() );
- view->reshape(view->getRect().getWidth(), view->getUIWinHeightShort());
- updateControls(view) ;
- updateLayout(view) ;
+ // *TODO: redundant?
if(getPreviewView(view))
{
getPreviewView(view)->setThumbnailImageSize() ;
@@ -1655,17 +1664,24 @@ void LLFloaterSnapshot::Impl::onClickHUDCheck(LLUICtrl *ctrl, void* data)
void LLFloaterSnapshot::Impl::onClickKeepOpenCheck(LLUICtrl* ctrl, void* data)
{
LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
-
gSavedSettings.setBOOL( "CloseSnapshotOnKeep", !check->get() );
}
+#if 0
// static
void LLFloaterSnapshot::Impl::onClickKeepAspectCheck(LLUICtrl* ctrl, void* data)
{
LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
- gSavedSettings.setBOOL( "KeepAspectForSnapshot", check->get() );
-
LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ applyKeepAspectCheck(view, check->get());
+}
+#endif
+
+// static
+void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL checked)
+{
+ gSavedSettings.setBOOL("KeepAspectForSnapshot", checked);
+
if (view)
{
LLSnapshotLivePreview* previewp = getPreviewView(view) ;
@@ -1687,20 +1703,6 @@ void LLFloaterSnapshot::Impl::onClickKeepAspectCheck(LLUICtrl* ctrl, void* data)
}
}
-// static
-void LLFloaterSnapshot::Impl::onCommitQuality(LLUICtrl* ctrl, void* data)
-{
- LLSliderCtrl* slider = (LLSliderCtrl*)ctrl;
- S32 quality_val = llfloor((F32)slider->getValue().asReal());
-
- LLSnapshotLivePreview* previewp = getPreviewView((LLFloaterSnapshot *)data);
- if (previewp)
- {
- previewp->setSnapshotQuality(quality_val);
- }
- checkAutoSnapshot(previewp, TRUE);
-}
-
// static
void LLFloaterSnapshot::Impl::onCommitFreezeFrame(LLUICtrl* ctrl, void* data)
{
@@ -1723,18 +1725,16 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
LLSnapshotLivePreview *previewp = getPreviewView(view) ;
// Don't round texture sizes; textures are commonly stretched in world, profiles, etc and need to be "squashed" during upload, not cropped here
-#if 0
- if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE == getTypeIndex(view))
+ if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE == getActiveSnapshotType(view))
{
previewp->mKeepAspectRatio = FALSE ;
return ;
}
-#endif
if(0 == index) //current window size
{
view->impl.mAspectRatioCheckOff = true ;
- view->getChildView("keep_aspect_check")->setEnabled(FALSE) ;
+ enableAspectRatioCheckbox(view, FALSE);
if(previewp)
{
@@ -1744,9 +1744,11 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
else if(-1 == index) //custom
{
view->impl.mAspectRatioCheckOff = false ;
+#if 0
//if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE != gSavedSettings.getS32("LastSnapshotType"))
+#endif
{
- view->getChildView("keep_aspect_check")->setEnabled(TRUE) ;
+ enableAspectRatioCheckbox(view, TRUE);
if(previewp)
{
@@ -1757,7 +1759,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
else
{
view->impl.mAspectRatioCheckOff = true ;
- view->getChildView("keep_aspect_check")->setEnabled(FALSE) ;
+ enableAspectRatioCheckbox(view, FALSE);
if(previewp)
{
@@ -1768,23 +1770,21 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
return ;
}
-static std::string lastSnapshotWidthName()
+static std::string lastSnapshotWidthName(S32 shot_type)
{
- switch(gSavedSettings.getS32("LastSnapshotType"))
+ switch (shot_type)
{
- // *TODO: Separate settings for Web snapshots and postcards
- case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToEmailWidth";
+ case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToProfileWidth";
case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: return "LastSnapshotToEmailWidth";
case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: return "LastSnapshotToInventoryWidth";
default: return "LastSnapshotToDiskWidth";
}
}
-static std::string lastSnapshotHeightName()
+static std::string lastSnapshotHeightName(S32 shot_type)
{
- switch(gSavedSettings.getS32("LastSnapshotType"))
+ switch (shot_type)
{
- // *TODO: Separate settings for Web snapshots and postcards
- case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToEmailHeight";
+ case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToProfileHeight";
case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: return "LastSnapshotToEmailHeight";
case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: return "LastSnapshotToInventoryHeight";
default: return "LastSnapshotToDiskHeight";
@@ -1799,10 +1799,12 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
if (!view || !combobox)
{
+ llassert(view && combobox);
return;
}
// save off all selected resolution values
+ gSavedSettings.setS32("SnapshotProfileLastResolution", view->getChild("profile_size_combo")->getCurrentIndex());
gSavedSettings.setS32("SnapshotPostcardLastResolution", view->getChild("postcard_size_combo")->getCurrentIndex());
gSavedSettings.setS32("SnapshotTextureLastResolution", view->getChild("texture_size_combo")->getCurrentIndex());
gSavedSettings.setS32("SnapshotLocalLastResolution", view->getChild("local_size_combo")->getCurrentIndex());
@@ -1824,16 +1826,44 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
if (width == 0 || height == 0)
{
// take resolution from current window size
+ lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl;
previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
}
else if (width == -1 || height == -1)
{
// load last custom value
- previewp->setSize(gSavedSettings.getS32(lastSnapshotWidthName()), gSavedSettings.getS32(lastSnapshotHeightName()));
+#if 1
+ LLPanelSnapshot* spanel = getActivePanel(view);
+ if (spanel)
+ {
+ lldebugs << "Loading typed res from panel " << spanel->getName() << llendl;
+ width = spanel->getTypedPreviewWidth();
+ height = spanel->getTypedPreviewWidth();
+ }
+ else
+ {
+ const S32 shot_type = getActiveSnapshotType(view);
+ lldebugs << "Loading saved res for shot_type " << shot_type << llendl;
+ width = gSavedSettings.getS32(lastSnapshotWidthName(shot_type));
+ height = gSavedSettings.getS32(lastSnapshotHeightName(shot_type));
+ }
+
+ llassert(width > 0 && height > 0);
+ previewp->setSize(width, height);
+#else
+ LLPanelSnapshot* spanel = getActivePanel(view);
+ if (spanel)
+ {
+ lldebugs << "Setting custom preview res : " << spanel->getTypedPreviewWidth() << "x" << spanel->getTypedPreviewHeight() << llendl;
+ previewp->setSize(spanel->getTypedPreviewWidth(), spanel->getTypedPreviewHeight());
+ }
+ //previewp->setSize(gSavedSettings.getS32(lastSnapshotWidthName()), gSavedSettings.getS32(lastSnapshotHeightName()));
+#endif
}
else
{
// use the resolution from the selected pre-canned drop-down choice
+ lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl;
previewp->setSize(width, height);
}
@@ -1853,10 +1883,10 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
resetSnapshotSizeOnUI(view, width, height) ;
}
- if(view->getChild("snapshot_width")->getValue().asInteger() != width || view->getChild("snapshot_height")->getValue().asInteger() != height)
+ if(getWidthSpinner(view)->getValue().asInteger() != width || getHeightSpinner(view)->getValue().asInteger() != height)
{
- view->getChild("snapshot_width")->setValue(width);
- view->getChild("snapshot_height")->setValue(height);
+ getWidthSpinner(view)->setValue(width);
+ getHeightSpinner(view)->setValue(height);
}
if(original_width != width || original_height != height)
@@ -1892,6 +1922,29 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data)
}
}
+// static
+void LLFloaterSnapshot::Impl::onImageQualityChange(LLFloaterSnapshot* view, S32 quality_val)
+{
+ LLSnapshotLivePreview* previewp = getPreviewView(view);
+ if (previewp)
+ {
+ previewp->setSnapshotQuality(quality_val);
+ }
+ checkAutoSnapshot(previewp, TRUE);
+}
+
+// static
+void LLFloaterSnapshot::Impl::onImageFormatChange(LLFloaterSnapshot* view)
+{
+ if (view)
+ {
+ gSavedSettings.setS32("SnapshotFormat", getImageFormat(view));
+ getPreviewView(view)->updateSnapshot(TRUE);
+ updateControls(view);
+ }
+}
+
+#if 0
//static
void LLFloaterSnapshot::Impl::onCommitSnapshotType(LLUICtrl* ctrl, void* data)
{
@@ -1903,9 +1956,10 @@ void LLFloaterSnapshot::Impl::onCommitSnapshotType(LLUICtrl* ctrl, void* data)
updateControls(view);
}
}
+#endif
-
-//static
+#if 0
+//static.
void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data)
{
LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
@@ -1916,8 +1970,7 @@ void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data)
updateControls(view);
}
}
-
-
+#endif
// Sets the named size combo to "custom" mode.
// static
@@ -1931,6 +1984,10 @@ void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshot* floater, const s
{
gSavedSettings.setS32("SnapshotPostcardLastResolution", combo->getCurrentIndex());
}
+ else if(comboname == "profile_size_combo")
+ {
+ gSavedSettings.setS32("SnapshotProfileLastResolution", combo->getCurrentIndex());
+ }
else if(comboname == "texture_size_combo")
{
gSavedSettings.setS32("SnapshotTextureLastResolution", combo->getCurrentIndex());
@@ -2027,21 +2084,29 @@ BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S3
//static
void LLFloaterSnapshot::Impl::resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height)
{
- view->getChild("snapshot_width")->forceSetValue(width);
- view->getChild("snapshot_height")->forceSetValue(height);
- gSavedSettings.setS32(lastSnapshotWidthName(), width);
- gSavedSettings.setS32(lastSnapshotHeightName(), height);
+ getWidthSpinner(view)->forceSetValue(width);
+ getHeightSpinner(view)->forceSetValue(height);
+ gSavedSettings.setS32(lastSnapshotWidthName(getActiveSnapshotType(view)), width);
+ gSavedSettings.setS32(lastSnapshotHeightName(getActiveSnapshotType(view)), height);
}
+#if 0
//static
void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* data)
{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ S32 w = llfloor((F32)getWidthSpinner(view)->getValue().asReal());
+ S32 h = llfloor((F32)getHeightSpinner(view)->getValue().asReal());
+ applyCustomResolution(view, w, h);
+}
+#endif
+
+// static
+void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshot* view, S32 w, S32 h)
+{
+ lldebugs << "applyCustomResolution(" << w << ", " << h << ")" << llendl;
if (view)
{
- S32 w = llfloor((F32)view->getChild("snapshot_width")->getValue().asReal());
- S32 h = llfloor((F32)view->getChild("snapshot_height")->getValue().asReal());
-
LLSnapshotLivePreview* previewp = getPreviewView(view);
if (previewp)
{
@@ -2073,7 +2138,7 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat
}
}
#endif
- previewp->setMaxImageSize((S32)((LLSpinCtrl *)ctrl)->getMaxValue()) ;
+ previewp->setMaxImageSize(getWidthSpinner(view)->getMaxValue()) ;
// Check image size changes the value of height and width
if(checkImageSize(previewp, w, h, w != curw, previewp->getMaxImageSize())
@@ -2085,19 +2150,33 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat
previewp->setSize(w,h);
checkAutoSnapshot(previewp, FALSE);
previewp->updateSnapshot(FALSE, TRUE);
+ comboSetCustom(view, "profile_size_combo");
comboSetCustom(view, "postcard_size_combo");
comboSetCustom(view, "texture_size_combo");
comboSetCustom(view, "local_size_combo");
}
}
- gSavedSettings.setS32(lastSnapshotWidthName(), w);
- gSavedSettings.setS32(lastSnapshotHeightName(), h);
+ gSavedSettings.setS32(lastSnapshotWidthName(getActiveSnapshotType(view)), w);
+ gSavedSettings.setS32(lastSnapshotHeightName(getActiveSnapshotType(view)), h);
updateControls(view);
}
}
+// static
+void LLFloaterSnapshot::Impl::onSnapshotUploadFinished(LLSideTrayPanelContainer* panel_container, bool status)
+{
+ panel_container->openPanel("panel_post_result", LLSD().with("post-result", status).with("post-type", "profile"));
+}
+
+
+// static
+void LLFloaterSnapshot::Impl::onSendingPostcardFinished(LLSideTrayPanelContainer* panel_container, bool status)
+{
+ panel_container->openPanel("panel_post_result", LLSD().with("post-result", status).with("post-type", "postcard"));
+}
+
///----------------------------------------------------------------------------
/// Class LLFloaterSnapshot
///----------------------------------------------------------------------------
@@ -2134,24 +2213,19 @@ BOOL LLFloaterSnapshot::postBuild()
LLWebSharing::instance().init();
}
+#if 0
childSetCommitCallback("snapshot_type_radio", Impl::onCommitSnapshotType, this);
childSetCommitCallback("local_format_combo", Impl::onCommitSnapshotFormat, this);
+#endif
childSetAction("new_snapshot_btn", Impl::onClickNewSnapshot, this);
- childSetAction("more_btn", Impl::onClickMore, this);
- childSetAction("less_btn", Impl::onClickLess, this);
-
- childSetAction("upload_btn", Impl::onClickKeep, this);
- childSetAction("send_btn", Impl::onClickKeep, this);
- childSetCommitCallback("save_btn", Impl::onCommitSave, this);
- childSetAction("discard_btn", Impl::onClickDiscard, this);
-
- childSetCommitCallback("image_quality_slider", Impl::onCommitQuality, this);
- getChild("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality"));
+ childSetAction("advanced_options_btn", Impl::onClickMore, this);
+#if 0
childSetCommitCallback("snapshot_width", Impl::onCommitCustomResolution, this);
childSetCommitCallback("snapshot_height", Impl::onCommitCustomResolution, this);
+#endif
childSetCommitCallback("ui_check", Impl::onClickUICheck, this);
getChild("ui_check")->setValue(gSavedSettings.getBOOL("RenderUIInSnapshot"));
@@ -2162,15 +2236,19 @@ BOOL LLFloaterSnapshot::postBuild()
childSetCommitCallback("keep_open_check", Impl::onClickKeepOpenCheck, this);
getChild("keep_open_check")->setValue(!gSavedSettings.getBOOL("CloseSnapshotOnKeep"));
+#if 0
childSetCommitCallback("keep_aspect_check", Impl::onClickKeepAspectCheck, this);
- getChild("keep_aspect_check")->setValue(gSavedSettings.getBOOL("KeepAspectForSnapshot"));
+#endif
+ impl.enableAspectRatioCheckbox(this, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
childSetCommitCallback("layer_types", Impl::onCommitLayerTypes, this);
getChild("layer_types")->setValue("colors");
getChildView("layer_types")->setEnabled(FALSE);
- getChild("snapshot_width")->setValue(gSavedSettings.getS32(lastSnapshotWidthName()));
- getChild("snapshot_height")->setValue(gSavedSettings.getS32(lastSnapshotHeightName()));
+#if 0 // leads to crash later if one of the settings values is 0
+ impl.getWidthSpinner(this)->setValue(gSavedSettings.getS32(lastSnapshotWidthName()));
+ impl.getHeightSpinner(this)->setValue(gSavedSettings.getS32(lastSnapshotHeightName()));
+#endif
getChild("freeze_frame_check")->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
childSetCommitCallback("freeze_frame_check", Impl::onCommitFreezeFrame, this);
@@ -2178,10 +2256,18 @@ BOOL LLFloaterSnapshot::postBuild()
getChild("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot"));
childSetCommitCallback("auto_snapshot_check", Impl::onClickAutoSnap, this);
+ childSetCommitCallback("profile_size_combo", Impl::onCommitResolution, this);
childSetCommitCallback("postcard_size_combo", Impl::onCommitResolution, this);
childSetCommitCallback("texture_size_combo", Impl::onCommitResolution, this);
childSetCommitCallback("local_size_combo", Impl::onCommitResolution, this);
+ LLSideTrayPanelContainer* panel_container = getChild("panel_container");
+ LLWebProfile::setImageUploadResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSnapshotUploadFinished, panel_container, _1));
+ LLPostCard::setPostResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSendingPostcardFinished, panel_container, _1));
+
+ // remember preview rect
+ sThumbnailPlaceholderRect = getChild("thumbnail_placeholder")->getRect();
+
// create preview window
LLRect full_screen_rect = getRootView()->getRect();
LLSnapshotLivePreview::Params p;
@@ -2221,9 +2307,8 @@ void LLFloaterSnapshot::draw()
{
if(previewp->getThumbnailImage())
{
- LLRect thumbnail_rect = getChild("thumbnail_placeholder")->getRect();
-
- S32 offset_x = (getRect().getWidth() - previewp->getThumbnailWidth()) / 2 ;
+ LLRect& thumbnail_rect = sThumbnailPlaceholderRect;
+ S32 offset_x = thumbnail_rect.mLeft + (thumbnail_rect.getWidth() - previewp->getThumbnailWidth()) / 2 ;
S32 offset_y = thumbnail_rect.mBottom + (thumbnail_rect.getHeight() - previewp->getThumbnailHeight()) / 2 ;
glMatrixMode(GL_MODELVIEW);
@@ -2256,6 +2341,44 @@ void LLFloaterSnapshot::onClose(bool app_quitting)
getParent()->setMouseOpaque(FALSE);
}
+// virtual
+S32 LLFloaterSnapshot::notify(const LLSD& info)
+{
+ // A child panel wants to change snapshot resolution.
+ if (info.has("combo-res-change"))
+ {
+ std::string combo_name = info["combo-res-change"]["control-name"].asString();
+ impl.updateResolution(getChild(combo_name), this);
+ return 1;
+ }
+
+ if (info.has("custom-res-change"))
+ {
+ LLSD res = info["custom-res-change"];
+ impl.applyCustomResolution(this, res["w"].asInteger(), res["h"].asInteger());
+ return 1;
+ }
+
+ if (info.has("keep-aspect-change"))
+ {
+ impl.applyKeepAspectCheck(this, info["keep-aspect-change"].asBoolean());
+ return 1;
+ }
+
+ if (info.has("image-quality-change"))
+ {
+ impl.onImageQualityChange(this, info["image-quality-change"].asInteger());
+ return 1;
+ }
+
+ if (info.has("image-format-change"))
+ {
+ impl.onImageFormatChange(this);
+ return 1;
+ }
+
+ return 0;
+}
//static
void LLFloaterSnapshot::update()
@@ -2276,6 +2399,159 @@ void LLFloaterSnapshot::update()
}
}
+// static
+LLFloaterSnapshot* LLFloaterSnapshot::getInstance()
+{
+ return LLFloaterReg::getTypedInstance("snapshot");
+}
+
+// static
+void LLFloaterSnapshot::saveTexture()
+{
+ lldebugs << "saveTexture" << llendl;
+
+ // FIXME: duplicated code
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return;
+ }
+ LLSnapshotLivePreview* previewp = Impl::getPreviewView(instance);
+ if (!previewp)
+ {
+ llassert(previewp != NULL);
+ return;
+ }
+
+ previewp->saveTexture();
+ instance->postSave();
+}
+
+// static
+void LLFloaterSnapshot::saveLocal()
+{
+ lldebugs << "saveLocal" << llendl;
+ // FIXME: duplicated code
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return;
+ }
+ LLSnapshotLivePreview* previewp = Impl::getPreviewView(instance);
+ if (!previewp)
+ {
+ llassert(previewp != NULL);
+ return;
+ }
+
+ previewp->saveLocal();
+ instance->postSave();
+}
+
+// static
+void LLFloaterSnapshot::preUpdate()
+{
+ // FIXME: duplicated code
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot");
+ if (instance)
+ {
+ instance->getChildView("refresh_icon")->setVisible(TRUE); // indicate refresh
+ }
+}
+
+// static
+void LLFloaterSnapshot::postUpdate()
+{
+ // FIXME: duplicated code
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot");
+ if (instance)
+ {
+ instance->getChildView("refresh_icon")->setVisible(FALSE);
+ }
+}
+
+// static
+void LLFloaterSnapshot::postSave()
+{
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return;
+ }
+
+ instance->impl.updateControls(instance);
+}
+
+// static
+void LLFloaterSnapshot::postPanelSwitch()
+{
+ LLFloaterSnapshot* instance = getInstance();
+ instance->impl.updateControls(instance);
+}
+
+// static
+LLPointer LLFloaterSnapshot::getImageData()
+{
+ // FIXME: May not work for textures.
+
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return NULL;
+ }
+
+ LLSnapshotLivePreview* previewp = Impl::getPreviewView(instance);
+ if (!previewp)
+ {
+ llassert(previewp != NULL);
+ return NULL;
+ }
+
+ LLPointer img = previewp->getFormattedImage();
+ if (!img.get())
+ {
+ llwarns << "Empty snapshot image data" << llendl;
+ llassert(img.get() != NULL);
+ }
+
+ return img;
+}
+
+// static
+const LLVector3d& LLFloaterSnapshot::getPosTakenGlobal()
+{
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return LLVector3d::zero;
+ }
+
+ LLSnapshotLivePreview* previewp = Impl::getPreviewView(instance);
+ if (!previewp)
+ {
+ llassert(previewp != NULL);
+ return LLVector3d::zero;
+ }
+
+ return previewp->getPosTakenGlobal();
+}
+
+// static
+void LLFloaterSnapshot::setAgentEmail(const std::string& email)
+{
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot");
+ if (instance)
+ {
+ LLSideTrayPanelContainer* panel_container = instance->getChild("panel_container");
+ LLPanel* postcard_panel = panel_container->getPanelByName("panel_snapshot_postcard");
+ postcard_panel->notify(LLSD().with("agent-email", email));
+ }
+}
///----------------------------------------------------------------------------
/// Class LLSnapshotFloaterView
diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h
index c92d9efde5..de69824ad0 100644
--- a/indra/newview/llfloatersnapshot.h
+++ b/indra/newview/llfloatersnapshot.h
@@ -27,11 +27,15 @@
#ifndef LL_LLFLOATERSNAPSHOT_H
#define LL_LLFLOATERSNAPSHOT_H
+#include "llimage.h"
#include "llfloater.h"
+class LLSpinCtrl;
class LLFloaterSnapshot : public LLFloater
{
+ LOG_CLASS(LLFloaterSnapshot);
+
public:
typedef enum e_snapshot_format
{
@@ -47,20 +51,29 @@ public:
/*virtual*/ void draw();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
+ /*virtual*/ S32 notify(const LLSD& info);
static void update();
-
- static S32 getUIWinHeightLong() {return sUIWinHeightLong ;}
- static S32 getUIWinHeightShort() {return sUIWinHeightShort ;}
- static S32 getUIWinWidth() {return sUIWinWidth ;}
+
+ // TODO: create a snapshot model instead
+ static LLFloaterSnapshot* getInstance();
+ static void saveTexture();
+ static void saveLocal();
+ static void preUpdate();
+ static void postUpdate();
+ static void postSave();
+ static void postPanelSwitch();
+ static LLPointer getImageData();
+ static const LLVector3d& getPosTakenGlobal();
+ static void setAgentEmail(const std::string& email);
+
+ static const LLRect& getThumbnailPlaceholderRect() { return sThumbnailPlaceholderRect; }
private:
+ static LLRect sThumbnailPlaceholderRect;
+
class Impl;
Impl& impl;
-
- static S32 sUIWinHeightLong ;
- static S32 sUIWinHeightShort ;
- static S32 sUIWinWidth ;
};
class LLSnapshotFloaterView : public LLFloaterView
diff --git a/indra/newview/llpanelpostprogress.cpp b/indra/newview/llpanelpostprogress.cpp
new file mode 100644
index 0000000000..9b7de2cb23
--- /dev/null
+++ b/indra/newview/llpanelpostprogress.cpp
@@ -0,0 +1,59 @@
+/**
+ * @file llpanelpostprogress.cpp
+ * @brief Displays progress of publishing a snapshot.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the termsllpanelpostprogress of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterreg.h"
+#include "llpanel.h"
+#include "llsidetraypanelcontainer.h"
+
+/**
+ * Displays progress of publishing a snapshot.
+ */
+class LLPanelPostProgress
+: public LLPanel
+{
+ LOG_CLASS(LLPanelPostProgress);
+
+public:
+ /*virtual*/ void onOpen(const LLSD& key);
+};
+
+static LLRegisterPanelClassWrapper panel_class("llpanelpostprogress");
+
+// virtual
+void LLPanelPostProgress::onOpen(const LLSD& key)
+{
+ if (key.has("post-type"))
+ {
+ std::string progress_text = getString(key["post-type"].asString() + "_" + "progress_str");
+ getChild("progress_lbl")->setText(progress_text);
+ }
+ else
+ {
+ llwarns << "Invalid key" << llendl;
+ }
+}
diff --git a/indra/newview/llpanelpostresult.cpp b/indra/newview/llpanelpostresult.cpp
new file mode 100644
index 0000000000..2b937d83b9
--- /dev/null
+++ b/indra/newview/llpanelpostresult.cpp
@@ -0,0 +1,90 @@
+/**
+ * @file llpanelpostresult.cpp
+ * @brief Result of publishing a snapshot (success/failure).
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterreg.h"
+#include "llpanel.h"
+#include "llsidetraypanelcontainer.h"
+
+/**
+ * Displays snapshot publishing result.
+ */
+class LLPanelPostResult
+: public LLPanel
+{
+ LOG_CLASS(LLPanelPostResult);
+
+public:
+ LLPanelPostResult();
+
+ /*virtual*/ void onOpen(const LLSD& key);
+private:
+ void onBack();
+ void onClose();
+};
+
+static LLRegisterPanelClassWrapper panel_class("llpanelpostresult");
+
+LLPanelPostResult::LLPanelPostResult()
+{
+ mCommitCallbackRegistrar.add("Snapshot.Result.Back", boost::bind(&LLPanelPostResult::onBack, this));
+ mCommitCallbackRegistrar.add("Snapshot.Result.Close", boost::bind(&LLPanelPostResult::onClose, this));
+}
+
+
+// virtual
+void LLPanelPostResult::onOpen(const LLSD& key)
+{
+ if (key.isMap() && key.has("post-result") && key.has("post-type"))
+ {
+ bool ok = key["post-result"].asBoolean();
+ std::string type = key["post-type"].asString();
+ std::string result_text = getString(type + "_" + (ok ? "succeeded_str" : "failed_str"));
+ getChild("result_lbl")->setText(result_text);
+ }
+ else
+ {
+ llwarns << "Invalid key" << llendl;
+ }
+}
+
+void LLPanelPostResult::onBack()
+{
+ LLSideTrayPanelContainer* parent = dynamic_cast(getParent());
+ if (!parent)
+ {
+ llwarns << "Cannot find panel container" << llendl;
+ return;
+ }
+
+ parent->openPreviousPanel();
+}
+
+void LLPanelPostResult::onClose()
+{
+ LLFloaterReg::hideInstance("snapshot");
+}
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
new file mode 100644
index 0000000000..e89e62c750
--- /dev/null
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -0,0 +1,109 @@
+/**
+ * @file llpanelsnapshot.cpp
+ * @brief Snapshot panel base class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llpanelsnapshot.h"
+
+// libs
+#include "llsliderctrl.h"
+#include "llspinctrl.h"
+#include "lltrans.h"
+
+// newview
+#include "llsidetraypanelcontainer.h"
+
+LLFloaterSnapshot::ESnapshotFormat LLPanelSnapshot::getImageFormat() const
+{
+ return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG;
+}
+
+LLSpinCtrl* LLPanelSnapshot::getWidthSpinner()
+{
+ return getChild(getWidthSpinnerName());
+}
+
+LLSpinCtrl* LLPanelSnapshot::getHeightSpinner()
+{
+ return getChild(getHeightSpinnerName());
+}
+
+S32 LLPanelSnapshot::getTypedPreviewWidth() const
+{
+ return getChild(getWidthSpinnerName())->getValue().asInteger();
+}
+
+S32 LLPanelSnapshot::getTypedPreviewHeight() const
+{
+ return getChild(getHeightSpinnerName())->getValue().asInteger();
+}
+
+void LLPanelSnapshot::enableAspectRatioCheckbox(BOOL enable)
+{
+ getChild(getAspectRatioCBName())->setEnabled(enable);
+}
+
+LLSideTrayPanelContainer* LLPanelSnapshot::getParentContainer()
+{
+ LLSideTrayPanelContainer* parent = dynamic_cast(getParent());
+ if (!parent)
+ {
+ llwarns << "Cannot find panel container" << llendl;
+ return NULL;
+ }
+
+ return parent;
+}
+
+void LLPanelSnapshot::updateImageQualityLevel()
+{
+ LLSliderCtrl* quality_slider = getChild("image_quality_slider");
+ S32 quality_val = llfloor((F32) quality_slider->getValue().asReal());
+
+ std::string quality_lvl;
+
+ if (quality_val < 20)
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_very_low");
+ }
+ else if (quality_val < 40)
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_low");
+ }
+ else if (quality_val < 60)
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_medium");
+ }
+ else if (quality_val < 80)
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_high");
+ }
+ else
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_very_high");
+ }
+
+ getChild("image_quality_level")->setTextArg("[QLVL]", quality_lvl);
+}
diff --git a/indra/newview/llpanelsnapshot.h b/indra/newview/llpanelsnapshot.h
new file mode 100644
index 0000000000..a227317d2f
--- /dev/null
+++ b/indra/newview/llpanelsnapshot.h
@@ -0,0 +1,58 @@
+/**
+ * @file llpanelsnapshot.h
+ * @brief Snapshot panel base class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELSNAPSHOT_H
+#define LL_LLPANELSNAPSHOT_H
+
+#include "llfloatersnapshot.h"
+
+class LLSideTrayPanelContainer;
+
+/**
+ * Snapshot panel base class.
+ */
+class LLPanelSnapshot: public LLPanel
+{
+public:
+ virtual std::string getWidthSpinnerName() const = 0;
+ virtual std::string getHeightSpinnerName() const = 0;
+ virtual std::string getAspectRatioCBName() const = 0;
+ virtual std::string getImageSizeComboName() const = 0;
+
+ virtual S32 getTypedPreviewWidth() const;
+ virtual S32 getTypedPreviewHeight() const;
+ virtual LLSpinCtrl* getWidthSpinner();
+ virtual LLSpinCtrl* getHeightSpinner();
+ virtual void enableAspectRatioCheckbox(BOOL enable);
+ virtual LLFloaterSnapshot::ESnapshotFormat getImageFormat() const;
+ virtual void updateControls(const LLSD& info) {} ///< Update controls from saved settings
+
+protected:
+ LLSideTrayPanelContainer* getParentContainer();
+ void updateImageQualityLevel();
+};
+
+#endif // LL_LLPANELSNAPSHOT_H
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
new file mode 100644
index 0000000000..6419c37494
--- /dev/null
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -0,0 +1,152 @@
+/**
+ * @file llpanelsnapshotinventory.cpp
+ * @brief The panel provides UI for saving snapshot as an inventory texture.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llcombobox.h"
+#include "llsidetraypanelcontainer.h"
+#include "llspinctrl.h"
+
+#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model
+#include "llpanelsnapshot.h"
+#include "llviewercontrol.h" // gSavedSettings
+
+/**
+ * The panel provides UI for saving snapshot as an inventory texture.
+ */
+class LLPanelSnapshotInventory
+: public LLPanelSnapshot
+{
+ LOG_CLASS(LLPanelSnapshotInventory);
+
+public:
+ LLPanelSnapshotInventory();
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ void updateCustomResControls(); ///< Show/hide custom resolution controls (spinners and checkbox)
+
+ /*virtual*/ std::string getWidthSpinnerName() const { return "inventory_snapshot_width"; }
+ /*virtual*/ std::string getHeightSpinnerName() const { return "inventory_snapshot_height"; }
+ /*virtual*/ std::string getAspectRatioCBName() const { return "inventory_keep_aspect_check"; }
+ /*virtual*/ std::string getImageSizeComboName() const { return "texture_size_combo"; }
+ /*virtual*/ void updateControls(const LLSD& info);
+
+ void onResolutionComboCommit(LLUICtrl* ctrl);
+ void onCustomResolutionCommit(LLUICtrl* ctrl);
+ void onKeepAspectRatioCommit(LLUICtrl* ctrl);
+ void onSend();
+ void onCancel();
+};
+
+static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotinventory");
+
+LLPanelSnapshotInventory::LLPanelSnapshotInventory()
+{
+ mCommitCallbackRegistrar.add("Inventory.Save", boost::bind(&LLPanelSnapshotInventory::onSend, this));
+ mCommitCallbackRegistrar.add("Inventory.Cancel", boost::bind(&LLPanelSnapshotInventory::onCancel, this));
+}
+
+// virtual
+BOOL LLPanelSnapshotInventory::postBuild()
+{
+ getChild(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionComboCommit, this, _1));
+ getChild(getWidthSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onCustomResolutionCommit, this, _1));
+ getChild(getHeightSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onCustomResolutionCommit, this, _1));
+ getChild(getAspectRatioCBName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onKeepAspectRatioCommit, this, _1));
+ return TRUE;
+}
+
+// virtual
+void LLPanelSnapshotInventory::onOpen(const LLSD& key)
+{
+#if 0
+ getChild(getImageSizeComboName())->selectNthItem(0); // FIXME? has no effect
+#endif
+ updateCustomResControls();
+}
+
+void LLPanelSnapshotInventory::updateCustomResControls()
+{
+ LLComboBox* combo = getChild(getImageSizeComboName());
+ S32 selected_idx = combo->getFirstSelectedIndex();
+ bool show = selected_idx == 0 || selected_idx == (combo->getItemCount() - 1); // Current Window or Custom selected
+
+ getChild(getWidthSpinnerName())->setVisible(show);
+ getChild(getHeightSpinnerName())->setVisible(show);
+ getChild(getAspectRatioCBName())->setVisible(show);
+}
+
+// virtual
+void LLPanelSnapshotInventory::updateControls(const LLSD& info)
+{
+ const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true;
+ getChild("save_btn")->setEnabled(have_snapshot);
+}
+
+void LLPanelSnapshotInventory::onResolutionComboCommit(LLUICtrl* ctrl)
+{
+ updateCustomResControls();
+
+ LLSD info;
+ info["combo-res-change"]["control-name"] = ctrl->getName();
+ LLFloaterSnapshot::getInstance()->notify(info);
+}
+
+void LLPanelSnapshotInventory::onCustomResolutionCommit(LLUICtrl* ctrl)
+{
+ LLSD info;
+ info["w"] = getChild(getWidthSpinnerName())->getValue().asInteger();;
+ info["h"] = getChild(getHeightSpinnerName())->getValue().asInteger();;
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("custom-res-change", info));
+}
+
+void LLPanelSnapshotInventory::onKeepAspectRatioCommit(LLUICtrl* ctrl)
+{
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("keep-aspect-change", ctrl->getValue().asBoolean()));
+}
+
+void LLPanelSnapshotInventory::onSend()
+{
+ // Switch to upload progress display.
+ LLSideTrayPanelContainer* parent = getParentContainer();
+ if (parent)
+ {
+ parent->openPanel("panel_post_progress", LLSD().with("post-type", "inventory"));
+ }
+
+ LLFloaterSnapshot::saveTexture();
+}
+
+void LLPanelSnapshotInventory::onCancel()
+{
+ LLSideTrayPanelContainer* parent = getParentContainer();
+ if (parent)
+ {
+ parent->openPreviousPanel();
+ }
+}
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
new file mode 100644
index 0000000000..5dc32d228f
--- /dev/null
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -0,0 +1,209 @@
+/**
+ * @file llpanelsnapshotlocal.cpp
+ * @brief The panel provides UI for saving snapshot to a local folder.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llcombobox.h"
+#include "llsidetraypanelcontainer.h"
+#include "llsliderctrl.h"
+#include "llspinctrl.h"
+
+#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model
+#include "llpanelsnapshot.h"
+#include "llviewercontrol.h" // gSavedSettings
+
+/**
+ * The panel provides UI for saving snapshot to a local folder.
+ */
+class LLPanelSnapshotLocal
+: public LLPanelSnapshot
+{
+ LOG_CLASS(LLPanelSnapshotLocal);
+
+public:
+ LLPanelSnapshotLocal();
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ /*virtual*/ std::string getWidthSpinnerName() const { return "local_snapshot_width"; }
+ /*virtual*/ std::string getHeightSpinnerName() const { return "local_snapshot_height"; }
+ /*virtual*/ std::string getAspectRatioCBName() const { return "local_keep_aspect_check"; }
+ /*virtual*/ std::string getImageSizeComboName() const { return "local_size_combo"; }
+ /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const;
+ /*virtual*/ void updateControls(const LLSD& info);
+
+ void updateCustomResControls(); ///< Show/hide custom resolution controls (spinners and checkbox)
+
+ void onFormatComboCommit(LLUICtrl* ctrl);
+ void onResolutionComboCommit(LLUICtrl* ctrl);
+ void onCustomResolutionCommit(LLUICtrl* ctrl);
+ void onKeepAspectRatioCommit(LLUICtrl* ctrl);
+ void onQualitySliderCommit(LLUICtrl* ctrl);
+ void onSend();
+ void onCancel();
+};
+
+static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotlocal");
+
+LLPanelSnapshotLocal::LLPanelSnapshotLocal()
+{
+ mCommitCallbackRegistrar.add("Local.Save", boost::bind(&LLPanelSnapshotLocal::onSend, this));
+ mCommitCallbackRegistrar.add("Local.Cancel", boost::bind(&LLPanelSnapshotLocal::onCancel, this));
+}
+
+// virtual
+BOOL LLPanelSnapshotLocal::postBuild()
+{
+ getChild(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onResolutionComboCommit, this, _1));
+ getChild(getWidthSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onCustomResolutionCommit, this, _1));
+ getChild(getHeightSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onCustomResolutionCommit, this, _1));
+ getChild(getAspectRatioCBName())->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onKeepAspectRatioCommit, this, _1));
+ getChild("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onQualitySliderCommit, this, _1));
+ getChild("local_format_combo")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onFormatComboCommit, this, _1));
+
+ updateControls(LLSD());
+
+ return TRUE;
+}
+
+// virtual
+void LLPanelSnapshotLocal::onOpen(const LLSD& key)
+{
+ updateCustomResControls();
+}
+
+// virtual
+LLFloaterSnapshot::ESnapshotFormat LLPanelSnapshotLocal::getImageFormat() const
+{
+ LLFloaterSnapshot::ESnapshotFormat fmt = LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG;
+
+ LLComboBox* local_format_combo = getChild("local_format_combo");
+ const std::string id = local_format_combo->getSelectedItemLabel();
+ if (id == "PNG")
+ {
+ fmt = LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG;
+ }
+ else if (id == "JPEG")
+ {
+ fmt = LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG;
+ }
+ else if (id == "BMP")
+ {
+ fmt = LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP;
+ }
+
+ return fmt;
+}
+
+// virtual
+void LLPanelSnapshotLocal::updateControls(const LLSD& info)
+{
+ LLFloaterSnapshot::ESnapshotFormat fmt =
+ (LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat");
+ getChild("local_format_combo")->selectNthItem((S32) fmt);
+
+ const bool show_quality_ctrls = (fmt == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG);
+ getChild("image_quality_slider")->setVisible(show_quality_ctrls);
+ getChild("image_quality_level")->setVisible(show_quality_ctrls);
+
+ getChild("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality"));
+ updateImageQualityLevel();
+
+ const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true;
+ getChild("save_btn")->setEnabled(have_snapshot);
+}
+
+void LLPanelSnapshotLocal::updateCustomResControls()
+{
+ LLComboBox* combo = getChild(getImageSizeComboName());
+ S32 selected_idx = combo->getFirstSelectedIndex();
+ bool enable = selected_idx == 0 || selected_idx == (combo->getItemCount() - 1); // Current Window or Custom selected
+
+ getChild(getWidthSpinnerName())->setEnabled(enable);
+ getChild(getWidthSpinnerName())->setAllowEdit(enable);
+ getChild(getHeightSpinnerName())->setEnabled(enable);
+ getChild(getHeightSpinnerName())->setAllowEdit(enable);
+ getChild(getAspectRatioCBName())->setEnabled(enable);
+}
+
+void LLPanelSnapshotLocal::onFormatComboCommit(LLUICtrl* ctrl)
+{
+#if 0 // redundant?
+ gSavedSettings.setS32("SnapshotFormat", ctrl->getValue().asInteger());
+#endif
+
+ // will call updateControls()
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true));
+}
+
+void LLPanelSnapshotLocal::onResolutionComboCommit(LLUICtrl* ctrl)
+{
+ updateCustomResControls();
+
+ LLSD info;
+ info["combo-res-change"]["control-name"] = ctrl->getName();
+ LLFloaterSnapshot::getInstance()->notify(info);
+}
+
+void LLPanelSnapshotLocal::onCustomResolutionCommit(LLUICtrl* ctrl)
+{
+ LLSD info;
+ info["w"] = getChild(getWidthSpinnerName())->getValue().asInteger();
+ info["h"] = getChild(getHeightSpinnerName())->getValue().asInteger();
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("custom-res-change", info));
+}
+
+void LLPanelSnapshotLocal::onKeepAspectRatioCommit(LLUICtrl* ctrl)
+{
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("keep-aspect-change", ctrl->getValue().asBoolean()));
+}
+
+void LLPanelSnapshotLocal::onQualitySliderCommit(LLUICtrl* ctrl)
+{
+ updateImageQualityLevel();
+
+ LLSliderCtrl* slider = (LLSliderCtrl*)ctrl;
+ S32 quality_val = llfloor((F32)slider->getValue().asReal());
+ LLSD info;
+ info["image-quality-change"] = quality_val;
+ LLFloaterSnapshot::getInstance()->notify(info);
+}
+
+void LLPanelSnapshotLocal::onSend()
+{
+ LLFloaterSnapshot::saveLocal();
+ onCancel();
+}
+
+void LLPanelSnapshotLocal::onCancel()
+{
+ LLSideTrayPanelContainer* parent = getParentContainer();
+ if (parent)
+ {
+ parent->openPreviousPanel();
+ }
+}
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
new file mode 100644
index 0000000000..8e5ff282b3
--- /dev/null
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -0,0 +1,94 @@
+/**
+ * @file llpanelsnapshotoptions.cpp
+ * @brief Snapshot posting options panel.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpanel.h"
+#include "llsidetraypanelcontainer.h"
+
+#include "llfloatersnapshot.h" // FIXME: create a snapshot model
+
+/**
+ * Provides several ways to save a snapshot.
+ */
+class LLPanelSnapshotOptions
+: public LLPanel
+{
+ LOG_CLASS(LLPanelSnapshotOptions);
+
+public:
+ LLPanelSnapshotOptions();
+
+private:
+ void openPanel(const std::string& panel_name);
+ void onSaveToProfile();
+ void onSaveToEmail();
+ void onSaveToInventory();
+ void onSaveToComputer();
+};
+
+static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotoptions");
+
+LLPanelSnapshotOptions::LLPanelSnapshotOptions()
+{
+ mCommitCallbackRegistrar.add("Snapshot.SaveToProfile", boost::bind(&LLPanelSnapshotOptions::onSaveToProfile, this));
+ mCommitCallbackRegistrar.add("Snapshot.SaveToEmail", boost::bind(&LLPanelSnapshotOptions::onSaveToEmail, this));
+ mCommitCallbackRegistrar.add("Snapshot.SaveToInventory", boost::bind(&LLPanelSnapshotOptions::onSaveToInventory, this));
+ mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this));
+}
+
+void LLPanelSnapshotOptions::openPanel(const std::string& panel_name)
+{
+ LLSideTrayPanelContainer* parent = dynamic_cast(getParent());
+ if (!parent)
+ {
+ llwarns << "Cannot find panel container" << llendl;
+ return;
+ }
+
+ parent->openPanel(panel_name);
+ LLFloaterSnapshot::postPanelSwitch();
+}
+
+void LLPanelSnapshotOptions::onSaveToProfile()
+{
+ openPanel("panel_snapshot_profile");
+}
+
+void LLPanelSnapshotOptions::onSaveToEmail()
+{
+ openPanel("panel_snapshot_postcard");
+}
+
+void LLPanelSnapshotOptions::onSaveToInventory()
+{
+ openPanel("panel_snapshot_inventory");
+}
+
+void LLPanelSnapshotOptions::onSaveToComputer()
+{
+ openPanel("panel_snapshot_local");
+}
diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp
new file mode 100644
index 0000000000..c2b83d5c19
--- /dev/null
+++ b/indra/newview/llpanelsnapshotpostcard.cpp
@@ -0,0 +1,336 @@
+/**
+ * @file llpanelsnapshotpostcard.cpp
+ * @brief Postcard sending panel.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llcombobox.h"
+#include "llnotificationsutil.h"
+#include "llsidetraypanelcontainer.h"
+#include "llsliderctrl.h"
+#include "llspinctrl.h"
+#include "lltexteditor.h"
+
+#include "llagent.h"
+#include "llagentui.h"
+#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model
+#include "llpanelsnapshot.h"
+#include "llpostcard.h"
+#include "llviewercontrol.h" // gSavedSettings
+#include "llviewerwindow.h"
+
+#include
+
+/**
+ * Sends postcard via email.
+ */
+class LLPanelSnapshotPostcard
+: public LLPanelSnapshot
+{
+ LOG_CLASS(LLPanelSnapshotPostcard);
+
+public:
+ LLPanelSnapshotPostcard();
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ S32 notify(const LLSD& info);
+
+private:
+ /*virtual*/ std::string getWidthSpinnerName() const { return "postcard_snapshot_width"; }
+ /*virtual*/ std::string getHeightSpinnerName() const { return "postcard_snapshot_height"; }
+ /*virtual*/ std::string getAspectRatioCBName() const { return "postcard_keep_aspect_check"; }
+ /*virtual*/ std::string getImageSizeComboName() const { return "postcard_size_combo"; }
+ /*virtual*/ void updateControls(const LLSD& info);
+
+ void updateCustomResControls(); ///< Enable/disable custom resolution controls (spinners and checkbox)
+ bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response);
+ void sendPostcard();
+
+ void onMsgFormFocusRecieved();
+ void onFormatComboCommit(LLUICtrl* ctrl);
+ void onResolutionComboCommit(LLUICtrl* ctrl);
+ void onCustomResolutionCommit(LLUICtrl* ctrl);
+ void onKeepAspectRatioCommit(LLUICtrl* ctrl);
+ void onQualitySliderCommit(LLUICtrl* ctrl);
+ void onTabButtonPress(S32 btn_idx);
+ void onSend();
+ void onCancel();
+
+ bool mHasFirstMsgFocus;
+};
+
+static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotpostcard");
+
+LLPanelSnapshotPostcard::LLPanelSnapshotPostcard()
+: mHasFirstMsgFocus(false)
+{
+ mCommitCallbackRegistrar.add("Postcard.Send", boost::bind(&LLPanelSnapshotPostcard::onSend, this));
+ mCommitCallbackRegistrar.add("Postcard.Cancel", boost::bind(&LLPanelSnapshotPostcard::onCancel, this));
+ mCommitCallbackRegistrar.add("Postcard.Message", boost::bind(&LLPanelSnapshotPostcard::onTabButtonPress, this, 0));
+ mCommitCallbackRegistrar.add("Postcard.Settings", boost::bind(&LLPanelSnapshotPostcard::onTabButtonPress, this, 1));
+
+}
+
+// virtual
+BOOL LLPanelSnapshotPostcard::postBuild()
+{
+ // pick up the user's up-to-date email address
+ gAgent.sendAgentUserInfoRequest();
+
+ getChildView("from_form")->setEnabled(FALSE);
+
+ std::string name_string;
+ LLAgentUI::buildFullname(name_string);
+ getChild("name_form")->setValue(LLSD(name_string));
+
+ // For the first time a user focuses to .the msg box, all text will be selected.
+ getChild("msg_form")->setFocusChangedCallback(boost::bind(&LLPanelSnapshotPostcard::onMsgFormFocusRecieved, this));
+
+ getChild("to_form")->setFocus(TRUE);
+
+ getChild(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onResolutionComboCommit, this, _1));
+ getChild(getWidthSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onCustomResolutionCommit, this, _1));
+ getChild(getHeightSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onCustomResolutionCommit, this, _1));
+ getChild(getAspectRatioCBName())->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onKeepAspectRatioCommit, this, _1));
+ getChild("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1));
+
+ getChild("message_btn")->setToggleState(TRUE);
+
+ updateControls(LLSD());
+
+ return TRUE;
+}
+
+// virtual
+void LLPanelSnapshotPostcard::onOpen(const LLSD& key)
+{
+ gSavedSettings.setS32("SnapshotFormat", getImageFormat());
+ updateCustomResControls();
+}
+
+// virtual
+S32 LLPanelSnapshotPostcard::notify(const LLSD& info)
+{
+ if (!info.has("agent-email"))
+ {
+ llassert(info.has("agent-email"));
+ return 0;
+ }
+
+ LLUICtrl* from_input = getChild("from_form");
+ const std::string& text = from_input->getValue().asString();
+ if (text.empty())
+ {
+ // there's no text in this field yet, pre-populate
+ from_input->setValue(info["agent-email"]);
+ }
+
+ return 1;
+}
+
+// virtual
+void LLPanelSnapshotPostcard::updateControls(const LLSD& info)
+{
+ getChild("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality"));
+ updateImageQualityLevel();
+
+ const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true;
+ getChild("send_btn")->setEnabled(have_snapshot);
+}
+
+void LLPanelSnapshotPostcard::updateCustomResControls()
+{
+ LLComboBox* combo = getChild(getImageSizeComboName());
+ S32 selected_idx = combo->getFirstSelectedIndex();
+ bool enable = selected_idx == 0 || selected_idx == (combo->getItemCount() - 1); // Current Window or Custom selected
+
+ getChild(getWidthSpinnerName())->setEnabled(enable);
+ getChild(getWidthSpinnerName())->setAllowEdit(enable);
+ getChild(getHeightSpinnerName())->setEnabled(enable);
+ getChild(getHeightSpinnerName())->setAllowEdit(enable);
+ getChild(getAspectRatioCBName())->setEnabled(enable);
+}
+
+bool LLPanelSnapshotPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if(0 == option)
+ {
+ // User clicked OK
+ if((getChild("subject_form")->getValue().asString()).empty())
+ {
+ // Stuff the subject back into the form.
+ getChild("subject_form")->setValue(getString("default_subject"));
+ }
+
+ if (!mHasFirstMsgFocus)
+ {
+ // The user never switched focus to the message window.
+ // Using the default string.
+ getChild("msg_form")->setValue(getString("default_message"));
+ }
+
+ sendPostcard();
+ }
+ return false;
+}
+
+
+void LLPanelSnapshotPostcard::sendPostcard()
+{
+ std::string from(getChild("from_form")->getValue().asString());
+ std::string to(getChild("to_form")->getValue().asString());
+ std::string subject(getChild("subject_form")->getValue().asString());
+
+ LLSD postcard = LLSD::emptyMap();
+ postcard["pos-global"] = LLFloaterSnapshot::getPosTakenGlobal().getValue();
+ postcard["to"] = to;
+ postcard["from"] = from;
+ postcard["name"] = getChild("name_form")->getValue().asString();
+ postcard["subject"] = subject;
+ postcard["msg"] = getChild("msg_form")->getValue().asString();
+ LLPostCard::send(LLFloaterSnapshot::getImageData(), postcard);
+ LLFloaterSnapshot::postSave();
+
+ // Give user feedback of the event.
+ gViewerWindow->playSnapshotAnimAndSound();
+
+ // Switch to upload progress display.
+ LLSideTrayPanelContainer* parent = getParentContainer();
+ if (parent)
+ {
+ parent->openPanel("panel_post_progress", LLSD().with("post-type", "postcard"));
+ }
+}
+
+void LLPanelSnapshotPostcard::onMsgFormFocusRecieved()
+{
+ LLTextEditor* msg_form = getChild("msg_form");
+ if (msg_form->hasFocus() && !mHasFirstMsgFocus)
+ {
+ mHasFirstMsgFocus = true;
+ msg_form->setText(LLStringUtil::null);
+ }
+}
+
+void LLPanelSnapshotPostcard::onFormatComboCommit(LLUICtrl* ctrl)
+{
+ // will call updateControls()
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true));
+}
+
+void LLPanelSnapshotPostcard::onResolutionComboCommit(LLUICtrl* ctrl)
+{
+ updateCustomResControls();
+
+ LLSD info;
+ info["combo-res-change"]["control-name"] = ctrl->getName();
+ LLFloaterSnapshot::getInstance()->notify(info);
+}
+
+void LLPanelSnapshotPostcard::onCustomResolutionCommit(LLUICtrl* ctrl)
+{
+ LLSD info;
+ info["w"] = getChild(getWidthSpinnerName())->getValue().asInteger();
+ info["h"] = getChild(getHeightSpinnerName())->getValue().asInteger();
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("custom-res-change", info));
+}
+
+void LLPanelSnapshotPostcard::onKeepAspectRatioCommit(LLUICtrl* ctrl)
+{
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("keep-aspect-change", ctrl->getValue().asBoolean()));
+}
+
+void LLPanelSnapshotPostcard::onQualitySliderCommit(LLUICtrl* ctrl)
+{
+ updateImageQualityLevel();
+
+ LLSliderCtrl* slider = (LLSliderCtrl*)ctrl;
+ S32 quality_val = llfloor((F32)slider->getValue().asReal());
+ LLSD info;
+ info["image-quality-change"] = quality_val;
+ LLFloaterSnapshot::getInstance()->notify(info); // updates the "SnapshotQuality" setting
+}
+
+void LLPanelSnapshotPostcard::onTabButtonPress(S32 btn_idx)
+{
+ static LLButton* sButtons[2] = {
+ getChild("message_btn"),
+ getChild("settings_btn"),
+ };
+
+ // Switch between Message and Settings tabs.
+ LLButton* clicked_btn = sButtons[btn_idx];
+ LLButton* other_btn = sButtons[!btn_idx];
+ LLSideTrayPanelContainer* container =
+ getChild("postcard_panel_container");
+
+ container->selectTab(clicked_btn->getToggleState() ? btn_idx : !btn_idx);
+ //clicked_btn->setEnabled(FALSE);
+ other_btn->toggleState();
+ //other_btn->setEnabled(TRUE);
+
+ lldebugs << "Button #" << btn_idx << " (" << clicked_btn->getName() << ") clicked" << llendl;
+}
+
+void LLPanelSnapshotPostcard::onSend()
+{
+ // Validate input.
+ std::string from(getChild("from_form")->getValue().asString());
+ std::string to(getChild("to_form")->getValue().asString());
+
+ boost::regex email_format("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
+
+ if (to.empty() || !boost::regex_match(to, email_format))
+ {
+ LLNotificationsUtil::add("PromptRecipientEmail");
+ return;
+ }
+
+ if (from.empty() || !boost::regex_match(from, email_format))
+ {
+ LLNotificationsUtil::add("PromptSelfEmail");
+ return;
+ }
+
+ std::string subject(getChild("subject_form")->getValue().asString());
+ if(subject.empty() || !mHasFirstMsgFocus)
+ {
+ LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLPanelSnapshotPostcard::missingSubjMsgAlertCallback, this, _1, _2));
+ return;
+ }
+
+ // Send postcard.
+ sendPostcard();
+}
+
+void LLPanelSnapshotPostcard::onCancel()
+{
+ LLSideTrayPanelContainer* parent = getParentContainer();
+ if (parent)
+ {
+ parent->openPreviousPanel();
+ }
+}
diff --git a/indra/newview/llpanelsnapshotprofile.cpp b/indra/newview/llpanelsnapshotprofile.cpp
new file mode 100644
index 0000000000..80a379a5a0
--- /dev/null
+++ b/indra/newview/llpanelsnapshotprofile.cpp
@@ -0,0 +1,162 @@
+/**
+ * @file llpanelsnapshotprofile.cpp
+ * @brief Posts a snapshot to My Profile feed.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+// libs
+#include "llcombobox.h"
+#include "llfloaterreg.h"
+#include "llpanel.h"
+#include "llspinctrl.h"
+
+// newview
+#include "llfloatersnapshot.h"
+#include "llpanelsnapshot.h"
+#include "llsidetraypanelcontainer.h"
+#include "llwebprofile.h"
+
+/**
+ * Posts a snapshot to My Profile feed.
+ */
+class LLPanelSnapshotProfile
+: public LLPanelSnapshot
+{
+ LOG_CLASS(LLPanelSnapshotProfile);
+
+public:
+ LLPanelSnapshotProfile();
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ /*virtual*/ std::string getWidthSpinnerName() const { return "profile_snapshot_width"; }
+ /*virtual*/ std::string getHeightSpinnerName() const { return "profile_snapshot_height"; }
+ /*virtual*/ std::string getAspectRatioCBName() const { return "profile_keep_aspect_check"; }
+ /*virtual*/ std::string getImageSizeComboName() const { return "profile_size_combo"; }
+ /*virtual*/ void updateControls(const LLSD& info);
+
+ void updateCustomResControls(); ///< Enable/disable custom resolution controls (spinners and checkbox)
+
+ void onSend();
+ void onCancel();
+ void onResolutionComboCommit(LLUICtrl* ctrl);
+ void onCustomResolutionCommit(LLUICtrl* ctrl);
+ void onKeepAspectRatioCommit(LLUICtrl* ctrl);
+};
+
+static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotprofile");
+
+LLPanelSnapshotProfile::LLPanelSnapshotProfile()
+{
+ mCommitCallbackRegistrar.add("PostToProfile.Send", boost::bind(&LLPanelSnapshotProfile::onSend, this));
+ mCommitCallbackRegistrar.add("PostToProfile.Cancel", boost::bind(&LLPanelSnapshotProfile::onCancel, this));
+}
+
+// virtual
+BOOL LLPanelSnapshotProfile::postBuild()
+{
+ getChild(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotProfile::onResolutionComboCommit, this, _1));
+ getChild(getWidthSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshotProfile::onCustomResolutionCommit, this, _1));
+ getChild(getHeightSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshotProfile::onCustomResolutionCommit, this, _1));
+ getChild(getAspectRatioCBName())->setCommitCallback(boost::bind(&LLPanelSnapshotProfile::onKeepAspectRatioCommit, this, _1));
+ return TRUE;
+}
+
+// virtual
+void LLPanelSnapshotProfile::onOpen(const LLSD& key)
+{
+ updateCustomResControls();
+}
+
+// virtual
+void LLPanelSnapshotProfile::updateControls(const LLSD& info)
+{
+ const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true;
+ getChild("post_btn")->setEnabled(have_snapshot);
+}
+
+void LLPanelSnapshotProfile::updateCustomResControls() ///< Enable/disable custom resolution controls (spinners and checkbox)
+{
+ LLComboBox* combo = getChild(getImageSizeComboName());
+ S32 selected_idx = combo->getFirstSelectedIndex();
+ bool enable = selected_idx == 0 || selected_idx == (combo->getItemCount() - 1); // Current Window or Custom selected
+
+ getChild(getWidthSpinnerName())->setEnabled(enable);
+ getChild