Merge viewer-quickgraphics

master
Ansariel 2016-02-26 13:13:17 +01:00
commit 847c09ab8c
13 changed files with 51 additions and 50 deletions

View File

@ -67,3 +67,5 @@ const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); /
const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER
const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
const LLUUID IMG_BLACK_SQUARE_MALEVICH ("3b39cc01-c2d1-e194-1181-e4404978b20c"); // On dataserver

View File

@ -208,6 +208,8 @@ LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL;
LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
LL_COMMON_API extern const LLUUID IMG_BLACK_SQUARE_MALEVICH;
// radius within which a chat message is fully audible
const F32 CHAT_NORMAL_RADIUS = 20.f;

View File

@ -42,6 +42,7 @@
#include "llvoavatarself.h"
#include "llviewercontrol.h"
#include "lltrans.h"
#include "llagentcamera.h"
// associated header
#include "llavatarrendernotifier.h"
@ -104,6 +105,12 @@ std::string LLAvatarRenderNotifier::overLimitMessage()
void LLAvatarRenderNotifier::displayNotification(bool show_over_limit)
{
if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_MOUSELOOK)
{
LL_WARNS("AvatarRenderInfo") << "Suppressing a notification while in mouselook" << LL_ENDL;
return;
}
mAgentComplexity = mLatestAgentComplexity;
mShowOverLimitAgents = show_over_limit;
static LLCachedControl<U32> expire_delay(gSavedSettings, "ShowMyComplexityChanges", 20);

View File

@ -1970,7 +1970,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
{
//order is important here LLRender::DIFFUSE_MAP should be last, becouse it change
//(gGL).mCurrTextureUnitIndex
gGL.getTexUnit(specular_channel)->bind(face->getTexture(LLRender::SPECULAR_MAP));
gGL.getTexUnit(specular_channel)->bind(LLPipeline::sImpostorRender ? LLViewerTextureManager::findTexture(IMG_BLACK_SQUARE_MALEVICH) : face->getTexture(LLRender::SPECULAR_MAP));
gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP));
gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP), false, true);

View File

@ -3953,12 +3953,10 @@ void LLPanelPreferenceGraphics::setPresetText()
if (!preset_graphic_active.empty())
{
// <FS:Ansariel> Fix mapping to default preset when label is localized
if (preset_graphic_active == PRESETS_DEFAULT)
{
preset_graphic_active = LLTrans::getString("Default");
}
// </FS:Ansariel>
preset_text->setText(preset_graphic_active);
}
else

View File

@ -89,14 +89,18 @@ void LLPanelPresetsPulldown::populatePanel()
row["columns"][0]["column"] = "preset_name";
row["columns"][0]["value"] = name;
bool is_selected_preset = false;
if (name == gSavedSettings.getString("PresetGraphicActive"))
{
row["columns"][1]["column"] = "icon";
row["columns"][1]["type"] = "icon";
row["columns"][1]["value"] = "Check_Mark";
is_selected_preset = true;
}
scroll->addElement(row);
LLScrollListItem* new_item = scroll->addElement(row);
new_item->setSelected(is_selected_preset);
}
}
}

View File

@ -134,19 +134,14 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_nam
presets = mPresetNames;
}
// <FS:Ansariel> Fix mapping to default preset when label is localized
//bool LLPresetsManager::savePreset(const std::string& subdirectory, const std::string& name)
bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string name)
// </FS:Ansariel>
{
// <FS:Ansariel> Fix mapping to default preset when label is localized
if (LLTrans::getString(PRESETS_DEFAULT) == name)
{
name = PRESETS_DEFAULT;
}
// </FS:Ansariel>
bool saved = false;
bool saved = false;
std::vector<std::string> name_list;
if(PRESETS_GRAPHIC == subdirectory)
@ -254,17 +249,13 @@ void LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory,
}
}
// <FS:Ansariel> Fix mapping to default preset when label is localized
//void LLPresetsManager::loadPreset(const std::string& subdirectory, const std::string& name)
void LLPresetsManager::loadPreset(const std::string& subdirectory, std::string name)
// </FS:Ansariel>
{
// <FS:Ansariel> Fix mapping to default preset when label is localized
if (LLTrans::getString(PRESETS_DEFAULT) == name)
{
name = PRESETS_DEFAULT;
}
// </FS:Ansariel>
std::string full_path(getPresetsDir(subdirectory) + gDirUtilp->getDirDelimiter() + LLURI::escape(name) + ".xml");
@ -290,17 +281,12 @@ void LLPresetsManager::loadPreset(const std::string& subdirectory, std::string n
}
}
// <FS:Ansariel> Fix mapping to default preset when label is localized
//bool LLPresetsManager::deletePreset(const std::string& subdirectory, const std::string& name)
bool LLPresetsManager::deletePreset(const std::string& subdirectory, std::string name)
// </FS:Ansariel>
{
// <FS:Ansariel> Fix mapping to default preset when label is localized
if (LLTrans::getString(PRESETS_DEFAULT) == name)
{
name = PRESETS_DEFAULT;
}
// </FS:Ansariel>
bool sts = true;

View File

@ -56,14 +56,9 @@ public:
static std::string getPresetsDir(const std::string& subdirectory);
void setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo, EDefaultOptions default_option);
void loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets, EDefaultOptions default_option);
// <FS:Ansariel> Fix mapping to default preset when label is localized
//bool savePreset(const std::string& subdirectory, const std::string & name);
//void loadPreset(const std::string& subdirectory, const std::string & name);
//bool deletePreset(const std::string& subdirectory, const std::string& name);
bool savePreset(const std::string& subdirectory, std::string name);
void loadPreset(const std::string& subdirectory, std::string name);
bool deletePreset(const std::string& subdirectory, std::string name);
// </FS:Ansariel>
// Emitted when a preset gets loaded, deleted, or saved.
boost::signals2::connection setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb);

View File

@ -618,6 +618,7 @@ void LLStatusBar::setVisibleForMouselook(bool visible)
mSearchPanel->setVisible(visible && gSavedSettings.getBOOL("FSMenuSearch"));
mTimeMediaPanel->setVisible(visible);
setBackgroundVisible(visible);
mIconPresets->setVisible(visible);
}
void LLStatusBar::debitBalance(S32 debit)

View File

@ -5141,10 +5141,7 @@ void LLViewerObject::updateText()
LLVOAvatar* avatar = getAvatar();
if (avatar)
{
// <FS:Ansariel> Use cached mutelist check
//mText->setHidden(LLMuteList::getInstance()->isMuted(avatar->getID()));
mText->setHidden(avatar->isInMuteList());
// </FS:Ansariel>
}
LLVector3 up_offset(0,0,0);

View File

@ -39,6 +39,7 @@
#include "llworld.h"
#include "pipeline.h"
#include "llspatialpartition.h"
#include "llvoavatarself.h"
#include "llvovolume.h"
const F32 PART_SIM_BOX_SIDE = 16.f;
@ -706,16 +707,18 @@ void LLViewerPartSim::updateSimulation()
if (!mViewerPartSources[i]->isDead())
{
BOOL upd = TRUE;
if (!LLPipeline::sRenderAttachedParticles)
LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp;
if (vobj && (vobj->getPCode() == LL_PCODE_VOLUME))
{
LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp;
if (vobj && (vobj->getPCode() == LL_PCODE_VOLUME))
if(vobj->getAvatar() && vobj->getAvatar()->isTooComplex())
{
LLVOVolume* vvo = (LLVOVolume *)vobj;
if (vvo && vvo->isAttachment())
{
upd = FALSE;
}
upd = FALSE;
}
LLVOVolume* vvo = (LLVOVolume *)vobj;
if (!LLPipeline::sRenderAttachedParticles && vvo && vvo->isAttachment())
{
upd = FALSE;
}
}

View File

@ -739,10 +739,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
// </FS:Ansariel> [Legacy Bake]
mLastUpdateRequestCOFVersion(-1),
mLastUpdateReceivedCOFVersion(-1),
// <FS:Ansariel> Re-add mute list caching
mCachedMuteListUpdateTime(0),
mCachedInMuteList(false)
// </FS:Ansariel>
{
LL_DEBUGS("AvatarRender") << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << LL_ENDL;
@ -2953,10 +2951,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
else
{
// <FS:Ansariel> Performance tweak
//is_muted = LLMuteList::getInstance()->isMuted(getID());
is_muted = isInMuteList();
// </FS:Ansariel>
}
// bool is_friend = LLAvatarTracker::instance().isBuddy(getID());
// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
@ -3546,10 +3541,7 @@ void LLVOAvatar::slamPosition()
mRoot->updateWorldMatrixChildren();
}
// <FS:Ansariel> FIRE-11783: Always visually mute avatars that are muted
//bool LLVOAvatar::isVisuallyMuted() const
bool LLVOAvatar::isVisuallyMuted()
// </FS:Ansariel>
{
bool muted = false;
@ -3576,7 +3568,7 @@ bool LLVOAvatar::isVisuallyMuted()
muted = true;
}
// <FS:Ansariel> FIRE-11783: Always visually mute avatars that are muted
//else if (LLMuteList::getInstance()->isMuted(getID()))
//else if (isInMuteList())
//{
// muted = true;
//}
@ -3590,6 +3582,25 @@ bool LLVOAvatar::isVisuallyMuted()
return muted;
}
bool LLVOAvatar::isInMuteList()
{
bool muted = false;
F64 now = LLFrameTimer::getTotalSeconds();
if (now < mCachedMuteListUpdateTime)
{
muted = mCachedInMuteList;
}
else
{
muted = LLMuteList::getInstance()->isMuted(getID());
const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1;
mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES;
mCachedInMuteList = muted;
}
return muted;
}
// <FS:Ansariel> Re-add mute list caching
bool LLVOAvatar::isInMuteList()
{

View File

@ -399,11 +399,8 @@ public:
public:
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
// <FS:Ansariel> Re-add mute list caching
//bool isVisuallyMuted() const;
bool isVisuallyMuted();
bool isInMuteList();
// </FS:Ansariel>
void forceUpdateVisualMuteSettings();
enum VisualMuteSettings
@ -442,10 +439,8 @@ public:
mutable bool mVisualComplexityStale;
U32 mReportedVisualComplexity; // from other viewers through the simulator
// <FS:Ansariel> Re-add mute list caching
bool mCachedInMuteList;
F64 mCachedMuteListUpdateTime;
// </FS:Ansariel>
VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV