Merge branch 'master' into V2Renderer

This commit is contained in:
Shyotl
2011-05-12 19:29:20 -05:00
17 changed files with 568 additions and 73 deletions

View File

@@ -39,6 +39,11 @@
// g++ 4.2.x (and before?) have the bug that when you try to pass a temporary
// to a function taking a const reference, it still calls the copy constructor.
// Define this to hack around that.
// Note that the chosen solution ONLY works for copying an AI*Access object that
// is passed to a function: the lifetime of the copied object must not be longer
// than the original (or at least, it shouldn't be used anymore after the
// original is destructed). This will be guaranteed if the code also compiles
// on a compiler that doesn't need this hack.
#define AI_NEED_ACCESS_CC (defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ < 3)) || (__GNUC__ < 4)))
template<typename T> struct AIReadAccessConst;
@@ -71,10 +76,6 @@ protected:
// Accessors.
T const* ptr() const { return reinterpret_cast<T const*>(mMemory); }
T* ptr() { return reinterpret_cast<T*>(mMemory); }
#if AI_NEED_ACCESS_CC
int mAccessCopyCount;
#endif
};
/**
@@ -246,11 +247,11 @@ struct AIReadAccessConst
AIReadAccessConst(AIThreadSafe<T> const& wrapper)
: mWrapper(const_cast<AIThreadSafe<T>&>(wrapper)),
mState(readlocked)
#if AI_NEED_ACCESS_CC
, mIsCopyConstructed(false)
#endif
{
mWrapper.mRWLock.rdlock();
#if AI_NEED_ACCESS_CC
mWrapper.mAccessCopyCount = 1;
#endif
}
//! Destruct the AI*Access object.
@@ -258,7 +259,7 @@ struct AIReadAccessConst
~AIReadAccessConst()
{
#if AI_NEED_ACCESS_CC
if (--(this->mWrapper.mAccessCopyCount) > 0) return;
if (mIsCopyConstructed) return;
#endif
if (mState == readlocked)
mWrapper.mRWLock.rdunlock();
@@ -282,13 +283,14 @@ protected:
AIThreadSafe<T>& mWrapper; //!< Reference to the object that we provide access to.
state_type const mState; //!< The lock state that mWrapper is in.
#if !AI_NEED_ACCESS_CC
#if AI_NEED_ACCESS_CC
bool mIsCopyConstructed;
public:
AIReadAccessConst(AIReadAccessConst const& orig) : mWrapper(orig.mWrapper), mState(orig.mState), mIsCopyConstructed(true) { }
#else
private:
// Disallow copy constructing directly.
AIReadAccessConst(AIReadAccessConst const&);
#else
public:
AIReadAccessConst(AIReadAccessConst const& orig) : mWrapper(orig.mWrapper), mState(orig.mState) { mWrapper.mAccessCopyCount++; }
#endif
};
@@ -482,11 +484,11 @@ struct AIAccess
{
//! Construct a AIAccess from a non-constant AIThreadSafeSimple.
AIAccess(AIThreadSafeSimple<T>& wrapper) : mWrapper(wrapper)
#if AI_NEED_ACCESS_CC
, mIsCopyConstructed(false)
#endif
{
this->mWrapper.mMutex.lock();
#if AI_NEED_ACCESS_CC
this->mWrapper.mAccessCopyCount = 1;
#endif
}
//! Access the underlaying object for (read and) write access.
@@ -498,7 +500,7 @@ struct AIAccess
~AIAccess()
{
#if AI_NEED_ACCESS_CC
if (--(this->mWrapper.mAccessCopyCount) > 0) return;
if (mIsCopyConstructed) return;
#endif
this->mWrapper.mMutex.unlock();
}
@@ -506,13 +508,14 @@ struct AIAccess
protected:
AIThreadSafeSimple<T>& mWrapper; //!< Reference to the object that we provide access to.
#if !AI_NEED_ACCESS_CC
#if AI_NEED_ACCESS_CC
bool mIsCopyConstructed;
public:
AIAccess(AIAccess const& orig) : mWrapper(orig.mWrapper), mIsCopyConstructed(true) { }
#else
private:
// Disallow copy constructing directly.
AIAccess(AIAccess const&);
#else
public:
AIAccess(AIAccess const& orig) : mWrapper(orig.mWrapper) { this->mWrapper.mAccessCopyCount++; }
#endif
};

View File

@@ -77,6 +77,7 @@ set(viewer_SOURCE_FILES
cofmgr.cpp
ascentdaycyclemanager.cpp
ascentfloatercontactgroups.cpp
ascentkeyword.cpp
ascentprefssys.cpp
ascentprefsvan.cpp
dhparam.cpp
@@ -550,6 +551,7 @@ set(viewer_HEADER_FILES
cofmgr.h
ascentdaycyclemanager.h
ascentfloatercontactgroups.h
ascentkeyword.h
ascentprefssys.h
ascentprefsvan.h
emerald.h

View File

@@ -9,6 +9,23 @@
<string>settings_rlv.xml</string>
</array>
<key>FloaterAvatarTextRect</key>
<map>
<key>Comment</key>
<string>Avatar texture floater position</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
</array>
</map>
<key>SianaLegacyJ2CSize</key>
<map>
<key>Comment</key>
@@ -13613,7 +13630,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>UseOutfitFolders</key>
<map>

View File

@@ -673,5 +673,100 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>KeywordsChangeColor</key>
<map>
<key>Comment</key>
<string>change message color if keyword found</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>KeywordsColor</key>
<map>
<key>Comment</key>
<string>Color of keyword detects messages</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>0.600000023842</real>
<real>0.0</real>
<real>1.0</real>
</array>
</map>
<key>KeywordsInChat</key>
<map>
<key>Comment</key>
<string>Look for keywords in local chat</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>KeywordsInIM</key>
<map>
<key>Comment</key>
<string>Look for keywords in group instant messages</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>KeywordsList</key>
<map>
<key>Comment</key>
<string>Comma seperated key words to search for</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
<key>KeywordsOn</key>
<map>
<key>Comment</key>
<string>Look for keywords</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>KeywordsPlaySound</key>
<map>
<key>Comment</key>
<string>Play a sound if keyword found</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>KeywordsSound</key>
<map>
<key>Comment</key>
<string>The sound to play if a keyword is found</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
</map>
</llsd>

View File

@@ -111,7 +111,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>SGBlockDialogSpam</key>
<map>

View File

@@ -0,0 +1,88 @@
/**
* @file ascentprefssys.cpp
* @Ascent Viewer preferences panel
*
* $LicenseInfo:firstyear=2011&license=viewergpl$
*
* Copyright (c) 2011, Tigh MacFanatic.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "ascentkeyword.h"
#include "llviewercontrol.h"
#include <boost/regex.hpp>
BOOL AscentKeyword::hasKeyword(std::string msg,int source)
{
static const LLCachedControl<bool> mKeywordsOn("KeywordsOn", false, gSavedPerAccountSettings);
static const LLCachedControl<bool> mKeywordsInChat("KeywordsInChat", false, gSavedPerAccountSettings);
static const LLCachedControl<bool> mKeywordsInIM("KeywordsInIM", false, gSavedPerAccountSettings);
if (mKeywordsOn)
{
if ((source == 1) && (mKeywordsInChat))
{
return containsKeyWord(msg);
}
if ((source == 2) && (mKeywordsInIM))
{
return containsKeyWord(msg);
}
}
return FALSE;
}
bool AscentKeyword::containsKeyWord(std::string source)
{
static const LLCachedControl<std::string> mKeywordsList("KeywordsList", "", gSavedPerAccountSettings);
static const LLCachedControl<bool> mKeywordsPlaySound("KeywordsPlaySound", false, gSavedPerAccountSettings);
static const LLCachedControl<std::string> mKeywordsSound("KeywordsSound", "", gSavedPerAccountSettings);
std::string s = mKeywordsList;
LLStringUtil::toLower(s);
LLStringUtil::toLower(source);
boost::regex re(",");
boost::sregex_token_iterator i(s.begin(), s.end(), re, -1);
boost::sregex_token_iterator j;
while(i != j)
{
if(source.find( *i++) != std::string::npos)
{
if (mKeywordsPlaySound)
{
LLUI::sAudioCallback(LLUUID(mKeywordsSound));
}
return true;
}
}
return false;
}

View File

@@ -0,0 +1,53 @@
/**
* @file ascentprefssys.cpp
* @Ascent Viewer preferences panel
*
* $LicenseInfo:firstyear=2011&license=viewergpl$
*
* Copyright (c) 2011, Tigh MacFanatic.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#ifndef ASCENTKEYWORD_H
#define ASCENTKEYWORD_H
class AscentKeyword
{
public:
enum MessageSource
{
LocalChat=1,
PrivateMessage=2,
GroupChat=3
};
static BOOL hasKeyword(std::string msg, int source);
private:
static bool containsKeyWord(std::string source);
};
#endif

View File

@@ -51,7 +51,6 @@
#include "lgghunspell_wrapper.h"
LLPrefsAscentSys::LLPrefsAscentSys()
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml");
@@ -67,6 +66,9 @@ LLPrefsAscentSys::LLPrefsAscentSys()
childSetAction("EmSpell_Add", onSpellAdd, this);
childSetAction("EmSpell_Remove", onSpellRemove, this);
childSetCommitCallback("Keywords_Alert", onCommitCheckBox, this);
refreshValues();
refresh();
}
@@ -110,6 +112,17 @@ void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
bool enabled = self->childGetValue("enable_clouds").asBoolean();
self->childSetEnabled("enable_classic_clouds", enabled);
}
else if (ctrl->getName() == "Keywords_Alert")
{
bool enabled = self->childGetValue("Keywords_Alert").asBoolean();
self->childSetEnabled("Keywords_Entries", enabled);
self->childSetEnabled("Keywords_LocalChat", enabled);
self->childSetEnabled("Keywords_IM", enabled);
self->childSetEnabled("Keywords_Highlight", enabled);
self->childSetEnabled("Keywords_Color", enabled);
self->childSetEnabled("Keywords_PlaySound", enabled);
self->childSetEnabled("Keywords_SoundUUID", enabled);
}
}
void LLPrefsAscentSys::onSpellAdd(void* data)
@@ -204,6 +217,15 @@ void LLPrefsAscentSys::refreshValues()
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
//Text Options ------------------------------------------------------------------------
mSpellDisplay = gSavedSettings.getBOOL("SpellDisplay");
mKeywordsOn = gSavedPerAccountSettings.getBOOL("KeywordsOn");
mKeywordsList = gSavedPerAccountSettings.getString("KeywordsList");
mKeywordsInChat = gSavedPerAccountSettings.getBOOL("KeywordsInChat");
mKeywordsInIM = gSavedPerAccountSettings.getBOOL("KeywordsInIM");
mKeywordsChangeColor = gSavedPerAccountSettings.getBOOL("KeywordsChangeColor");
mKeywordsColor = gSavedPerAccountSettings.getColor4("KeywordsColor");
mKeywordsPlaySound = gSavedPerAccountSettings.getBOOL("KeywordsPlaySound");
mKeywordsSound = static_cast<LLUUID>(gSavedPerAccountSettings.getString("KeywordsSound"));
}
void LLPrefsAscentSys::refresh()
@@ -359,10 +381,21 @@ void LLPrefsAscentSys::refresh()
combo->setSimple(std::string(""));
}
childSetValue("Keywords_Alert", mKeywordsOn);
childSetValue("Keywords_Entries", mKeywordsList);
childSetValue("Keywords_LocalChat", mKeywordsInChat);
childSetValue("Keywords_IM", mKeywordsInIM);
childSetValue("Keywords_Highlight", mKeywordsChangeColor);
childSetValue("Keywords_PlaySound", mKeywordsPlaySound);
childSetValue("Keywords_SoundUUID", mKeywordsSound);
LLColorSwatchCtrl* colorctrl = getChild<LLColorSwatchCtrl>("Keywords_Color");
colorctrl->set(LLColor4(mKeywordsColor),TRUE);
}
void LLPrefsAscentSys::cancel()
{
{/*
//General -----------------------------------------------------------------------------
childSetValue("double_click_teleport_check", mDoubleClickTeleport);
childSetValue("center_after_teleport_check", mResetCameraAfterTP);
@@ -412,7 +445,18 @@ void LLPrefsAscentSys::cancel()
//Text Options ------------------------------------------------------------------------
childSetValue("SpellDisplay", mSpellDisplay);
}
childSetValue("Keywords_Alert", mKeywordsOn);
childSetValue("Keywords_Entries", mKeywordsList);
childSetValue("Keywords_LocalChat", mKeywordsInChat);
childSetValue("Keywords_IM", mKeywordsInIM);
childSetValue("Keywords_Highlight", mKeywordsChangeColor);
childSetValue("Keywords_PlaySound", mKeywordsPlaySound);
childSetValue("Keywords_SoundUUID", mKeywordsSound);
LLColorSwatchCtrl* colorctrl = getChild<LLColorSwatchCtrl>("Keywords_Color");
colorctrl->set(LLColor4(mKeywordsColor),TRUE);
*/}
void LLPrefsAscentSys::apply()
{
@@ -549,7 +593,18 @@ void LLPrefsAscentSys::apply()
LLHUDEffectLookAt::sDebugLookAt = childGetValue("show_look_at_check");
gSavedSettings.setBOOL("RevokePermsOnStandUp", childGetValue("revoke_perms_on_stand_up_check"));
gSavedSettings.setBOOL("DisableClickSit", childGetValue("disable_click_sit_check"));
//Text Options ---------------------------------------------------------------------------
gSavedPerAccountSettings.setBOOL("KeywordsOn", childGetValue("Keywords_Alert"));
gSavedPerAccountSettings.setString("KeywordsList", childGetValue("Keywords_Entries"));
gSavedPerAccountSettings.setBOOL("KeywordsInChat", childGetValue("Keywords_LocalChat"));
gSavedPerAccountSettings.setBOOL("KeywordsInIM", childGetValue("Keywords_IM"));
gSavedPerAccountSettings.setBOOL("KeywordsChangeColor", childGetValue("Keywords_Highlight"));
gSavedPerAccountSettings.setColor4("KeywordsColor", childGetValue("Keywords_Color"));
gSavedPerAccountSettings.setBOOL("KeywordsPlaySound", childGetValue("Keywords_PlaySound"));
gSavedPerAccountSettings.setString("KeywordsSound", childGetValue("Keywords_SoundUUID"));
refreshValues();
refresh();
}

View File

@@ -98,6 +98,14 @@ protected:
BOOL mDisableClickSit;
//Text Options ------------------------------------------------------------------------
BOOL mSpellDisplay;
BOOL mKeywordsOn;
std::string mKeywordsList;
BOOL mKeywordsInIM;
BOOL mKeywordsInChat;
BOOL mKeywordsChangeColor;
BOOL mKeywordsPlaySound;
LLUUID mKeywordsSound;
LLColor4 mKeywordsColor;
};
#endif

View File

@@ -75,6 +75,7 @@
#include "llfloaterhtml.h"
#include "llweb.h"
#include "llstylemap.h"
#include "ascentkeyword.h"
// linden library includes
#include "llaudioengine.h"
@@ -595,6 +596,20 @@ LLColor4 get_text_color(const LLChat& chat)
}
}
static const LLCachedControl<bool> mKeywordsChangeColor("KeywordsChangeColor", false, gSavedPerAccountSettings);
static const LLCachedControl<LLColor4> mKeywordsColor("KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f), gSavedPerAccountSettings);
if (gAgent.getID() != chat.mFromID)
{
if (mKeywordsChangeColor)
{
if (AscentKeyword::hasKeyword(chat.mText, 1))
{
text_color = mKeywordsColor;
}
}
}
return text_color;
}

View File

@@ -74,6 +74,7 @@
#include "llhttpclient.h"
#include "llmutelist.h"
#include "llstylemap.h"
#include "ascentkeyword.h"
#include "boost/algorithm/string.hpp"
@@ -1592,8 +1593,23 @@ BOOL LLFloaterIMPanel::inviteToSession(const LLDynamicArray<LLUUID>& ids)
return TRUE;
}
void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4& color, bool log_to_file, const LLUUID& source, const std::string& name)
void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incolor, bool log_to_file, const LLUUID& source, const std::string& name)
{
static const LLCachedControl<bool> mKeywordsChangeColor("KeywordsChangeColor", false, gSavedPerAccountSettings);
static const LLCachedControl<LLColor4> mKeywordsColor("KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f), gSavedPerAccountSettings);
if (gAgent.getID() != source)
{
if (mKeywordsChangeColor)
{
if (AscentKeyword::hasKeyword(utf8msg, 2))
{
incolor = mKeywordsColor;
}
}
}
const LLColor4& color = incolor;
// start tab flashing when receiving im for background session from user
if (source != LLUUID::null)
{

View File

@@ -211,7 +211,7 @@ public:
BOOL inviteToSession(const LLDynamicArray<LLUUID>& agent_ids);
void addHistoryLine(const std::string &utf8msg,
const LLColor4& color = LLColor4::white,
LLColor4 incolor = LLColor4::white,
bool log_to_file = true,
const LLUUID& source = LLUUID::null,
const std::string& name = LLStringUtil::null);

View File

@@ -233,13 +233,21 @@ BOOL LLPanelDisplay::postBuild()
mCtrlReflections = getChild<LLCheckBoxCtrl>("Reflections");
mCtrlReflections->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
mCtrlReflections->setCallbackUserData(this);
mRadioReflectionDetail = getChild<LLRadioGroup>("ReflectionDetailRadio");
mCtrlReflectionDetail = getChild<LLComboBox>("ReflectionDetailCombo");
// WindLight
mCtrlWindLight = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
mCtrlWindLight->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
mCtrlWindLight->setCallbackUserData(this);
// Deferred
mCtrlDeferred = getChild<LLCheckBoxCtrl>("RenderDeferred");
mCtrlDeferred->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
mCtrlDeferred->setCallbackUserData(this);
mCtrlSunShadow = getChild<LLCheckBoxCtrl>("RenderDeferredSunShadow");
mCtrlSunShadow->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
mCtrlSunShadow->setCallbackUserData(this);
//----------------------------------------------------------------------------
// Enable Avatar Shaders
mCtrlAvatarVP = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
@@ -391,6 +399,8 @@ void LLPanelDisplay::refresh()
mWindLight = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
mReflections = gSavedSettings.getBOOL("RenderWaterReflections");
mAvatarVP = gSavedSettings.getBOOL("RenderAvatarVP");
mDeferred = gSavedSettings.getBOOL("RenderDeferred");
mSunShadow = gSavedSettings.getBOOL("RenderDeferredSunShadow");
// reflection radio
mReflectionDetail = gSavedSettings.getS32("RenderReflectionDetail");
@@ -464,10 +474,7 @@ void LLPanelDisplay::refreshEnabledState()
bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
mCtrlBumpShiny->setEnabled(bumpshiny ? TRUE : FALSE);
for (S32 i = 0; i < mRadioReflectionDetail->getItemCount(); ++i)
{
mRadioReflectionDetail->setIndexEnabled(i, mCtrlReflections->get() && reflections);
}
mCtrlReflectionDetail->setEnabled(mCtrlReflections->get() && reflections);
// Avatar Mode
S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
@@ -483,6 +490,10 @@ void LLPanelDisplay::refreshEnabledState()
mCtrlAvatarCloth->setEnabled(true);
}
BOOL can_defer = gSavedSettings.getBOOL("RenderUseFBO");
mCtrlDeferred->setEnabled(can_defer);
mCtrlSunShadow->setEnabled(can_defer && gSavedSettings.getBOOL("RenderDeferred"));
// Vertex Shaders
// mCtrlShaderEnable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0a
@@ -538,6 +549,11 @@ void LLPanelDisplay::disableUnavailableSettings()
mCtrlAvatarCloth->setEnabled(FALSE);
mCtrlAvatarCloth->setValue(FALSE);
mCtrlDeferred->setEnabled(FALSE);
mCtrlDeferred->setValue(FALSE);
mCtrlSunShadow->setEnabled(FALSE);
mCtrlSunShadow->setValue(FALSE);
}
// disabled windlight
@@ -575,6 +591,15 @@ void LLPanelDisplay::disableUnavailableSettings()
mCtrlAvatarImpostors->setEnabled(FALSE);
mCtrlAvatarImpostors->setValue(FALSE);
}
// disabled deferred
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"))
{
mCtrlDeferred->setEnabled(FALSE);
mCtrlDeferred->setValue(FALSE);
mCtrlSunShadow->setEnabled(FALSE);
mCtrlSunShadow->setValue(FALSE);
}
}
void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
@@ -610,7 +635,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
llassert(mRadioLightingDetail2 != NULL);
llassert(mRadioTerrainDetail != NULL);
llassert(mRadioReflectionDetail != NULL);
llassert(mCtrlReflectionDetail != NULL);
llassert(mMeshDetailText != NULL);
llassert(mShaderText != NULL);
@@ -633,7 +658,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
mCtrlLODFactor->setVisible(!isHidden);
mCtrlFlexFactor->setVisible(!isHidden);
mCtrlTreeFactor->setVisible(!isHidden);
mCtrlAvatarFactor->setVisible(!isHidden);
mCtrlAvatarFactor->setVisible(!isHidden);
mCtrlTerrainFactor->setVisible(!isHidden);
mCtrlSkyFactor->setVisible(!isHidden);
mCtrlMaxParticle->setVisible(!isHidden);
@@ -657,7 +682,10 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
mRadioLightingDetail2->setVisible(!isHidden);
mRadioTerrainDetail->setVisible(!isHidden);
mRadioReflectionDetail->setVisible(!isHidden);
mCtrlReflectionDetail->setVisible(!isHidden);
mCtrlDeferred->setVisible(!isHidden);
mCtrlSunShadow->setVisible(!isHidden);
// text boxes
mShaderText->setVisible(!isHidden);
@@ -691,6 +719,8 @@ void LLPanelDisplay::cancel()
gSavedSettings.setBOOL("WindLightUseAtmosShaders", mWindLight);
gSavedSettings.setBOOL("RenderWaterReflections", mReflections);
gSavedSettings.setBOOL("RenderAvatarVP", mAvatarVP);
gSavedSettings.setBOOL("RenderDeferred", mDeferred);
gSavedSettings.setBOOL("RenderDeferredSunShadow", mSunShadow);
gSavedSettings.setS32("RenderReflectionDetail", mReflectionDetail);

View File

@@ -84,6 +84,7 @@ protected:
LLComboBox *mCtrlFullScreen; // Fullscreen resolution
LLCheckBoxCtrl *mCtrlAutoDetectAspect; // automatically detect aspect ratio
LLComboBox *mCtrlAspectRatio; // user provided aspect ratio
LLComboBox *mCtrlReflectionDetail;
LLCheckBoxCtrl *mCtrlWindowed; // windowed mode
LLComboBox *mCtrlWindowSize; // window size for windowed mode
@@ -110,12 +111,12 @@ protected:
LLCheckBoxCtrl *mCtrlWindLight;
LLCheckBoxCtrl *mCtrlAvatarVP;
LLCheckBoxCtrl *mCtrlShaderEnable;
LLCheckBoxCtrl *mCtrlDeferred;
LLCheckBoxCtrl *mCtrlSunShadow;
LLCheckBoxCtrl *mCtrlAvatarImpostors;
LLCheckBoxCtrl *mCtrlAvatarCloth;
LLRadioGroup *mRadioLightingDetail2;
LLRadioGroup *mRadioTerrainDetail;
LLRadioGroup *mRadioReflectionDetail;
LLTextBox *mAspectRatioLabel1;
LLTextBox *mDisplayResLabel;
@@ -151,6 +152,8 @@ protected:
BOOL mShaderEnable;
BOOL mWindLight;
BOOL mReflections;
BOOL mDeferred;
BOOL mSunShadow;
BOOL mAvatarVP;
S32 mReflectionDetail;

View File

@@ -293,7 +293,54 @@ Use #f for user's first name, #l for last name,
#i for your idle time. (e.g. "5 mins")
</text>
</panel>
<panel border="true" left="1" bottom="-408" height="408" width="500" mouse_opaque="true"
<panel border="true" left="1" bottom="-408" height="408" width="500" mouse_opaque="true"
follows="left|top|right|bottom" label="Spam" name="Spam">
<check_box left="10" bottom_delta="-25" enabled="true" follows="left|top" font="SansSerifSmall"
label="Enable chat spam blocking" tool_tip="Enable automatic chat spam blocking"
height="18" width="100" radio_style="false" mouse_opaque="true"
name="AscChatSpamBlock" control_name="SGBlockChatSpam"/>
<spinner left_delta="20" height="18" width="120" enabled="true" follows="left|top"
decimal_digits="0" increment="1" initial_val="10" min_val="2" max_val="100"
label="Chat count" label_width="70" name="AscChatSpamCount" control_name="SGChatSpamCount"
tool_tip="Number of items spammed per time set. (Default: 10)"/>
<spinner left_delta="0" height="18" width="120" enabled="true" follows="left|top"
decimal_digits="1" increment="1" initial_val="1.0" min_val="1" max_val="60"
label="Chat time" label_width="70" name="AscChatSpamTime" control_name="SGChatSpamTime"
tool_tip="Time of evalulating spam in seconds. (Default: 1.0)"/>
<text type="string" length="1" bottom_delta="0" left_delta="130" bg_visible="false"
border_visible="false" border_drop_shadow_visible="false"
drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16"
mouse_opaque="true" name="" v_pad="0" width="100">
seconds
</text>
<check_box left_delta="-150" enabled="true" follows="left|top" font="SansSerifSmall"
label="Enable dialog spam blocking" tool_tip="Enable automatic dialog spam blocking"
height="16" width="100" radio_style="false" mouse_opaque="true"
name="AscDialogSpamBlock" control_name="SGBlockDialogSpam"/>
<check_box left_delta="0" enabled="true" follows="left|top" font="SansSerifSmall"
label="Enable calling card spam blocking" tool_tip="Enable automatic calling card spam blocking"
height="16" width="100" radio_style="false" mouse_opaque="true"
name="AscCardSpamBlock" control_name="SGBlockCardSpam"/>
<spinner left_delta="20" height="18" width="120" enabled="true" follows="left|top"
decimal_digits="0" increment="1" initial_val="4" min_val="2" max_val="100"
label="Spam count" label_width="70" name="AscSpamCount" control_name="SGSpamCount"
tool_tip="This setting applies to both Dialog and Card spam (Default: 4)"/>
<spinner left_delta="0" height="18" width="120" enabled="true" follows="left|top"
decimal_digits="1" increment="1" initial_val="1.0" min_val="1" max_val="60"
label="Spam time" label_width="70" name="AscSpamTime" control_name="SGSpamTime"
tool_tip="This setting applies to both Dialog and Card spam (Default: 1.0)"/>
<text type="string" length="1" bottom_delta="0" left_delta="130" bg_visible="false"
border_visible="false" border_drop_shadow_visible="false"
drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16"
mouse_opaque="true" name="" v_pad="0" width="100">
seconds
</text>
</panel>
<panel border="true" left="1" bottom="-408" height="408" width="500" mouse_opaque="true"
follows="left|top|right|bottom" label="Performance" name="Performance">
<check_box bottom_delta="-25" control_name="FetchInventoryOnLogin" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
@@ -530,40 +577,70 @@ Use #f for user's first name, #l for last name,
<check_box bottom="-25" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
label="Show misspelled words in red" left="12" mouse_opaque="true" name="SpellDisplay"
control_name="SpellDisplay" width="126"/>
<text bottom_delta="-30" follows="left|top" font="SansSerifSmall" height="16" left="12"
<text bottom_delta="-24" follows="left|top" font="SansSerifSmall" height="16" left="12"
name="EmSpell_txt1" width="512">
Current language (dictionary):
</text>
<combo_box allow_text_entry="false" bottom_delta="-20" left_delta="0" follows="left|top" height="18"
<combo_box allow_text_entry="false" bottom_delta="-20" left_delta="0" follows="left|top" height="20"
max_chars="200" mouse_opaque="true" name="SpellBase" width="250"
control_name="SpellBase" tool_tip=""/>
<text bottom_delta="-30" follows="left|top" font="SansSerifSmall" height="16" left="12"
<text bottom_delta="-24" follows="left|top" font="SansSerifSmall" height="20" left="12"
name="EmSpell_txt3" width="512">
Downloaded languages (dictionaries):
</text>
<combo_box allow_text_entry="false" bottom_delta="-20" left_delta="0" follows="left|top" height="18"
<combo_box allow_text_entry="false" bottom_delta="-20" left_delta="0" follows="left|top" height="20"
max_chars="200" mouse_opaque="true" name="EmSpell_Avail" width="250"
control_name="EmSpell_Avail" tool_tip=""/>
<button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="20" label="Install"
name="EmSpell_Add" tool_tip="" left_delta="255" width="80"/>
<button bottom_delta="-22" follows="left|top" font="SansSerifSmall" height="20" label="Download More..."
name="EmSpell_GetMore" tool_tip="Get more dictionaries availabe online" left="12" width="250"/>
<text bottom_delta="-30" follows="left|top" font="SansSerifSmall" height="16" left="12"
<text bottom_delta="-24" follows="left|top" font="SansSerifSmall" height="20" left="12"
name="EmSpell_txt2" width="512">
Additional custom languages (dictionaries):
</text>
<combo_box allow_text_entry="false" bottom_delta="-20" left_delta="0" follows="left|top" height="18"
<combo_box allow_text_entry="false" bottom_delta="-20" left_delta="0" follows="left|top" height="20"
max_chars="200" mouse_opaque="true" name="EmSpell_Installed" width="250"
control_name="EmSpell_Installed" tool_tip=""/>
<button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="20" label="Remove"
name="EmSpell_Remove" tool_tip="" left_delta="255" width="80"/>
<button bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="18" label="Edit Custom dictionary"
<button bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="20" label="Edit Custom dictionary"
name="EmSpell_EditCustom" tool_tip="" left="12" width="250"/>
<text bottom_delta="-30" follows="left|top" font="SansSerifSmall" height="16" left="12"
<text bottom_delta="-24" follows="left|top" font="SansSerifSmall" height="20" left="12"
name="EmSpell_txt4" width="512">
To use spellcheck, right-click a misspelled word
(red or otherwise) and select its replacement
To use spellcheck, right-click a misspelled word
(red or otherwise) and select its replacement
</text>
<view_border bevel_style="none" border_thickness="1" bottom_delta="-16" follows="top|left" height="0"
left="5" name="CmdDivisor" width="356"/>
<check_box bottom_delta="-24" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
label="Highlight messages if any of they contain the terms" left="5" mouse_opaque="true"
name="Keywords_Alert" radio_style="false" width="270"/>
<text bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="20" left="12"
name="keyword_txt1" width="512">
(separated by commas)
</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="left|top"
font="SansSerifSmall" height="20" left_delta="5" max_length="500" mouse_opaque="true" name="Keywords_Entries" width="300" />
<text bottom_delta="-24" follows="left|top" font="SansSerifSmall" height="20" left_delta="15" name="EmKeyw"
width="100">Is found within:</text>
<check_box bottom_delta="3" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
label="Local Chat Floater" left_delta="100" mouse_opaque="true" name="Keywords_LocalChat" radio_style="false" width="270"/>
<check_box bottom_delta="-15" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
label="Instant Message Floater" left_delta="0" mouse_opaque="true" name="Keywords_IM" radio_style="false" width="270"/>
<check_box bottom_delta="-24" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
label="Highlight the message in this color:" left_delta="-110" mouse_opaque="true" name="Keywords_Highlight"
radio_style="false" width="270"/>
<color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom_delta="-16" can_apply_immediately="true"
color="1, 1, 1, 1" follows="left|top" height="35" label="" left_delta="210"
mouse_opaque="true" name="Keywords_Color" tool_tip="Click to open Color Picker" width="50"/>
<check_box bottom_delta="-10" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
label="Play this sound alert: (UUID)" left_delta="-210" mouse_opaque="true" name="Keywords_PlaySound"
radio_style="false" width="270"/>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="left|top"
font="SansSerifSmall" height="20" left_delta="-5" max_length="36" mouse_opaque="true" name="Keywords_SoundUUID" width="300" />
</panel>
</tab_container>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel border="true" bottom="-409" enabled="true" follows="left|top|right|bottom"
height="408" label="Graphics" left="102" mouse_opaque="true"
<panel border="true" bottom="-439" enabled="true" follows="left|top|right|bottom"
height="438" label="Graphics" left="102" mouse_opaque="true"
name="Display panel" width="517">
<button bottom="-22" follows="left|top" font="SansSerif" height="18" label="?"
left="470" name="GraphicsPreferencesHelpButton" width="22" />
@@ -24,11 +24,8 @@
<combo_box allow_text_entry="false" bottom="-67" enabled="true" follows="left|top"
height="18" left="185" max_chars="20" mouse_opaque="true"
name="windowsize combo" width="150">
<combo_item type="string" length="1" enabled="true" name="640x480" value="640 x 480">
640x480
</combo_item>
<combo_item type="string" length="1" enabled="true" name="800x600" value="800 x 600">
800x600
800x600
</combo_item>
<combo_item type="string" length="1" enabled="true" name="720x480" value="720 x 480">
720x480 (NTSC)
@@ -39,7 +36,16 @@
<combo_item type="string" length="1" enabled="true" name="1024x768" value="1024 x 768">
1024x768
</combo_item>
<combo_item type="string" length="1" enabled="true" name="1280x720" value="1280 x 720">
1280x720 (HDV720)
</combo_item>
<combo_item type="string" length="1" enabled="true" name="1440x1080" value="1440 x 1080">
1440x1080 (HDV1080)
</combo_item>
<combo_item type="string" length="1" enabled="true" name="1920x1080" value="1920 x 1080">
1920x1080 (HD1080)
</combo_item>
</combo_box>
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-62" drop_shadow_visible="true" enabled="true" follows="left|top"
@@ -67,10 +73,10 @@
5:4 (1280x1024 LCD)
</combo_item>
<combo_item type="string" length="1" enabled="true" name="8:5(Widescreen)" value="1.6">
8:5 (Widescreen)
16:10 (Widescreen PC)
</combo_item>
<combo_item type="string" length="1" enabled="true" name="16:9(Widescreen)" value="1.7777777">
16:9 (Widescreen)
16:9 (Widescreen TV)
</combo_item>
</combo_box>
<check_box bottom="-44" control_name="FullScreenAutoDetectAspectRatio" enabled="true"
@@ -157,8 +163,8 @@
follows="left|top" font="SansSerifSmall" height="16"
initial_value="true" label="Custom" left="385" mouse_opaque="true"
name="CustomSettings" radio_style="false" width="256" />
<view_border bevel_style="none" border_thickness="1" bottom="-375" follows="top|left"
height="260" left="5" name="GraphicsBorder" width="485" />
<view_border bevel_style="none" border_thickness="1" bottom="-405" follows="top|left"
height="290" left="5" name="GraphicsBorder" width="485" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-130" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="12"
@@ -180,18 +186,45 @@
initial_value="true" label="Atmospheric Shaders" left_delta="0"
mouse_opaque="true" name="WindLightUseAtmosShaders" radio_style="false"
width="256" />
<check_box bottom_delta="-17" control_name="RenderDeferred" enabled="true"
follows="left|top" font="SansSerifSmall" height="16"
initial_value="true" label="Deferred Shading" left_delta="0"
mouse_opaque="true" name="RenderDeferred" radio_style="false"
width="256" />
<check_box bottom_delta="-17" control_name="RenderDeferredSunShadow" enabled="true"
follows="left|top" font="SansSerifSmall" height="16"
initial_value="true" label="Primary Shadows" left_delta="0"
mouse_opaque="true" name="RenderDeferredSunShadow" radio_style="false"
width="256" />
<check_box bottom_delta="-17" control_name="RenderWaterReflections" enabled="true"
follows="left|top" font="SansSerifSmall" height="16"
initial_value="true" label="Water Reflections" left_delta="0"
mouse_opaque="true" name="Reflections" radio_style="false" width="256" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-223" drop_shadow_visible="true" enabled="true" follows="left|top"
bottom_delta="-17" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="12"
left="10" mouse_opaque="true" name="ReflectionDetailText" v_pad="0"
width="128">
Reflection Detail:
</text>
<radio_group bottom_delta="-73" control_name="RenderReflectionDetail" draw_border="false"
<combo_box bottom_delta="-20" control_name="RenderReflectionDetail" enabled = "true" follows="left|top"
left_delta="-2" mouse_opaque="true" name="ReflectionDetailCombo" width="160" height="16">
<combo_item type="string" length="1" name="0" value="0">
Terrain and Trees
</combo_item>
<combo_item type="string" length="1" name="1" value="1">
All Static Objects
</combo_item>
<combo_item type="string" length="1" name="2" value="2">
All Avatars and Objects
</combo_item>
<combo_item type="string" length="1" name="3" value="3">
Everything
</combo_item>
</combo_box>
<!--radio_group bottom_delta="-73" control_name="RenderReflectionDetail" draw_border="false"
enabled="true" follows="left|top" height="70"
left_delta="-2" mouse_opaque="true" name="ReflectionDetailRadio"
width="321">
@@ -211,7 +244,7 @@
left="3" mouse_opaque="true" name="3" width="315">
Everything
</radio_item>
</radio_group>
</radio_group-->
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-313" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
@@ -382,10 +415,10 @@
High
</radio_item>
</radio_group>
<button bottom="-400" enabled="true" font="SansSerif" halign="center" height="20"
<button bottom="-430" enabled="true" font="SansSerif" halign="center" height="20"
label="Recommended Settings" left="130" mouse_opaque="true"
name="Defaults" scale_image="true" width="170" />
<button bottom="-400" enabled="true" font="SansSerif" halign="center" height="20"
<button bottom="-430" enabled="true" font="SansSerif" halign="center" height="20"
label="Hardware Options" label_selected="Hardware Options"
left="310" mouse_opaque="true" name="GraphicsHardwareButton"
scale_image="true" width="170" />

View File

@@ -859,9 +859,9 @@ anguage Infrstructure (CLI) international standard</string>
<key>windows</key>
<map>
<key>md5sum</key>
<string>7597e9d7f4e9e8e032692a1aade8298e</string>
<string>acf1626a563b2827a7f62d48661352c8</string>
<key>url</key>
<uri>https://github.com/downloads/siana/SingularityViewer/libpng-1.5.1-windows-20110504.tar.bz2</uri>
<uri>https://github.com/downloads/siana/SingularityViewer/libpng-1.5.2-windows-20110512.tar.bz2</uri>
</map>
</map>
</map>
@@ -1021,16 +1021,16 @@ anguage Infrstructure (CLI) international standard</string>
<key>darwin</key>
<map>
<key>md5sum</key>
<string>88eec3965fc2384436192faef1db2629</string>
<string>79bab0948f53add62d7a37be68704bf5</string>
<key>url</key>
<uri>http://imprudenceviewer.org/download/libs/ogg-vorbis-darwin-20100620.tar.bz2</uri>
<uri>https://github.com/downloads/siana/SingularityViewer/ogg_vorbis-1.2.2-1.3.2-darwin-20110512.tar.bz2</uri>
</map>
<key>linux</key>
<map>
<key>md5sum</key>
<string>72bde567859934024c8a4a70b97b24f5</string>
<string>95c99fe37289500b60e2feee2c2f3991</string>
<key>url</key>
<uri>http://imprudenceviewer.org/download/libs/ogg-vorbis-linux-20091115.tar.bz2</uri>
<uri>https://github.com/downloads/siana/SingularityViewer/ogg_vorbis-1.2.2-1.3.2-linux-20110512.tar.bz2</uri>
</map>
<key>linux64</key>
<map>
@@ -1042,9 +1042,9 @@ anguage Infrstructure (CLI) international standard</string>
<key>windows</key>
<map>
<key>md5sum</key>
<string>9bf1fea65e66b2cd3075e6ffd7eb57ad</string>
<string>30bb58af8c5f818fc8ea8d481bd2f478</string>
<key>url</key>
<uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/ogg-vorbis-1.1.3-1.2.0-windows-20080723.tar.bz2</uri>
<uri>https://github.com/downloads/siana/SingularityViewer/ogg_vorbis-1.2.2-1.3.2-windows-20110512.tar.bz2</uri>
</map>
</map>
</map>