Merge branch 'master' into Avination-4.0
This commit is contained in:
@@ -373,7 +373,7 @@ void AIEngine::setMaxCount(F32 StateMachineMaxTime)
|
|||||||
sMaxCount = calc_clock_frequency() * StateMachineMaxTime / 1000;
|
sMaxCount = calc_clock_frequency() * StateMachineMaxTime / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CWDEBUG
|
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
|
||||||
char const* AIStateMachine::event_str(event_type event)
|
char const* AIStateMachine::event_str(event_type event)
|
||||||
{
|
{
|
||||||
switch(event)
|
switch(event)
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ class AIStateMachine : public LLThreadSafeRefCount
|
|||||||
|
|
||||||
// Return stringified state, for debugging purposes.
|
// Return stringified state, for debugging purposes.
|
||||||
char const* state_str(base_state_type state);
|
char const* state_str(base_state_type state);
|
||||||
#ifdef CWDEBUG
|
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
|
||||||
char const* event_str(event_type event);
|
char const* event_str(event_type event);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.6.4)
|
|||||||
project(ndPathingLib CXX C)
|
project(ndPathingLib CXX C)
|
||||||
|
|
||||||
if( MSVC )
|
if( MSVC )
|
||||||
add_definitions(-D_HAS_ITERATOR_DEBUGGING=0 -D_SECURE_SCL=0 -D_CRT_SECURE_NO_WARNINGS=1)
|
add_definitions(-D_SECURE_SCL=0 -D_CRT_SECURE_NO_WARNINGS=1)
|
||||||
endif( MSVC )
|
endif( MSVC )
|
||||||
|
|
||||||
file (GLOB SOURCE_FILES *.cpp )
|
file (GLOB SOURCE_FILES *.cpp )
|
||||||
|
|||||||
@@ -110,11 +110,13 @@ protected:
|
|||||||
LLGLEnable mBlend, mAlphaTest;
|
LLGLEnable mBlend, mAlphaTest;
|
||||||
LLGLDisable mCullFace;
|
LLGLDisable mCullFace;
|
||||||
LLGLDepthTest mDepthTest;
|
LLGLDepthTest mDepthTest;
|
||||||
|
LLGLDisable mMSAA;
|
||||||
public:
|
public:
|
||||||
LLGLSUIDefault()
|
LLGLSUIDefault()
|
||||||
: mBlend(GL_BLEND), mAlphaTest(GL_ALPHA_TEST),
|
: mBlend(GL_BLEND), mAlphaTest(GL_ALPHA_TEST),
|
||||||
mCullFace(GL_CULL_FACE),
|
mCullFace(GL_CULL_FACE),
|
||||||
mDepthTest(GL_FALSE, GL_TRUE, GL_LEQUAL)
|
mDepthTest(GL_FALSE, GL_TRUE, GL_LEQUAL),
|
||||||
|
mMSAA(GL_MULTISAMPLE_ARB)
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1495,7 +1495,7 @@ void LLRender::translateUI(F32 x, F32 y, F32 z)
|
|||||||
llerrs << "Need to push a UI translation frame before offsetting" << llendl;
|
llerrs << "Need to push a UI translation frame before offsetting" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVector4a add(x,y,x);
|
LLVector4a add(x,y,z);
|
||||||
mUIOffset.back()->add(add);
|
mUIOffset.back()->add(add);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1564,13 +1564,13 @@ LLVector3 LLRender::getUIScale()
|
|||||||
{
|
{
|
||||||
return LLVector3(1,1,1);
|
return LLVector3(1,1,1);
|
||||||
}
|
}
|
||||||
return LLVector3(mUIOffset.back()->getF32ptr());
|
return LLVector3(mUIScale.back()->getF32ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLRender::loadUIIdentity()
|
void LLRender::loadUIIdentity()
|
||||||
{
|
{
|
||||||
if (mUIOffset.empty())
|
if (mUIOffset.empty() || mUIScale.empty())
|
||||||
{
|
{
|
||||||
llerrs << "Need to push UI translation frame before clearing offset." << llendl;
|
llerrs << "Need to push UI translation frame before clearing offset." << llendl;
|
||||||
}
|
}
|
||||||
@@ -1730,8 +1730,10 @@ void LLRender::blendFunc(eBlendFactor color_sfactor, eBlendFactor color_dfactor,
|
|||||||
mCurrBlendAlphaSFactor = alpha_sfactor;
|
mCurrBlendAlphaSFactor = alpha_sfactor;
|
||||||
mCurrBlendColorDFactor = color_dfactor;
|
mCurrBlendColorDFactor = color_dfactor;
|
||||||
mCurrBlendAlphaDFactor = alpha_dfactor;
|
mCurrBlendAlphaDFactor = alpha_dfactor;
|
||||||
blendfunc_debug[0]=blendfunc_debug[2]=color_sfactor;
|
blendfunc_debug[0]=color_sfactor;
|
||||||
blendfunc_debug[1]=blendfunc_debug[3]=alpha_sfactor;
|
blendfunc_debug[1]=alpha_sfactor;
|
||||||
|
blendfunc_debug[2]=color_dfactor;
|
||||||
|
blendfunc_debug[3]=alpha_dfactor;
|
||||||
flush();
|
flush();
|
||||||
glBlendFuncSeparateEXT(sGLBlendFactor[color_sfactor], sGLBlendFactor[color_dfactor],
|
glBlendFuncSeparateEXT(sGLBlendFactor[color_sfactor], sGLBlendFactor[color_dfactor],
|
||||||
sGLBlendFactor[alpha_sfactor], sGLBlendFactor[alpha_dfactor]);
|
sGLBlendFactor[alpha_sfactor], sGLBlendFactor[alpha_dfactor]);
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ static const LLFONT_ID FONT_NAME = LLFONT_SANSSERIF;
|
|||||||
LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
||||||
: LLModalDialog( notification->getLabel(), 100, 100, modal ), // dummy size. Will reshape below.
|
: LLModalDialog( notification->getLabel(), 100, 100, modal ), // dummy size. Will reshape below.
|
||||||
LLInstanceTracker<LLAlertDialog, LLUUID>(notification->getID()),
|
LLInstanceTracker<LLAlertDialog, LLUUID>(notification->getID()),
|
||||||
mDefaultOption( 0 ),
|
mDefaultButton( NULL ),
|
||||||
mCheck(NULL),
|
mCheck(NULL),
|
||||||
mCaution(notification->getPriority() >= NOTIFICATION_PRIORITY_HIGH),
|
mCaution(notification->getPriority() >= NOTIFICATION_PRIORITY_HIGH),
|
||||||
mLabel(notification->getName()),
|
mLabel(notification->getName()),
|
||||||
@@ -126,35 +126,24 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
|||||||
setBackgroundVisible(TRUE);
|
setBackgroundVisible(TRUE);
|
||||||
setBackgroundOpaque(TRUE);
|
setBackgroundOpaque(TRUE);
|
||||||
|
|
||||||
|
typedef std::list<ButtonData> options_t;
|
||||||
typedef std::vector<std::pair<std::string, std::string> > options_t;
|
options_t options;
|
||||||
options_t supplied_options;
|
|
||||||
|
|
||||||
// for now, get LLSD to iterator over form elements
|
// for now, get LLSD to iterator over form elements
|
||||||
LLSD form_sd = form->asLLSD();
|
LLSD form_sd = form->asLLSD();
|
||||||
|
|
||||||
S32 option_index = 0;
|
|
||||||
for (LLSD::array_const_iterator it = form_sd.beginArray(); it != form_sd.endArray(); ++it)
|
for (LLSD::array_const_iterator it = form_sd.beginArray(); it != form_sd.endArray(); ++it)
|
||||||
{
|
{
|
||||||
std::string type = (*it)["type"].asString();
|
std::string type = (*it)["type"].asString();
|
||||||
if (type == "button")
|
if (type == "button")
|
||||||
{
|
{
|
||||||
if((*it)["default"])
|
options.push_back(ButtonData());
|
||||||
{
|
ButtonData& button_data = options.back();
|
||||||
mDefaultOption = option_index;
|
button_data.mName = (*it)["name"].asString();
|
||||||
}
|
button_data.mText = (*it)["text"].asString();
|
||||||
|
button_data.mDefault = (*it)["default"].asBoolean();
|
||||||
supplied_options.push_back(std::make_pair((*it)["name"].asString(), (*it)["text"].asString()));
|
if(options.size()-1 == mNote->getURLOption())
|
||||||
|
button_data.mUrl = mNote->getURL();
|
||||||
ButtonData data;
|
|
||||||
data.mSelf = this;
|
|
||||||
if (option_index == mNote->getURLOption())
|
|
||||||
{
|
|
||||||
data.mURL = mNote->getURL();
|
|
||||||
}
|
|
||||||
|
|
||||||
mButtonData.push_back(data);
|
|
||||||
option_index++;
|
|
||||||
}
|
}
|
||||||
else if (type == "text")
|
else if (type == "text")
|
||||||
{
|
{
|
||||||
@@ -168,23 +157,14 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
|||||||
is_password = true;
|
is_password = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
options_t options;
|
if (options.empty())
|
||||||
if (supplied_options.empty())
|
|
||||||
{
|
{
|
||||||
options.push_back(std::make_pair(std::string("close"), std::string("Close")));
|
options.push_back(ButtonData());
|
||||||
|
ButtonData& button_data = options.back();
|
||||||
// add data for ok button.
|
button_data.mName = "close";
|
||||||
ButtonData ok_button;
|
button_data.mText = "Close";
|
||||||
ok_button.mSelf = this;
|
button_data.mDefault = true;
|
||||||
|
|
||||||
mButtonData.push_back(ok_button);
|
|
||||||
mDefaultOption = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
options = supplied_options;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
S32 num_options = options.size();
|
S32 num_options = options.size();
|
||||||
@@ -192,9 +172,9 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
|||||||
// Calc total width of buttons
|
// Calc total width of buttons
|
||||||
S32 button_width = 0;
|
S32 button_width = 0;
|
||||||
S32 sp = font->getWidth(std::string("OO"));
|
S32 sp = font->getWidth(std::string("OO"));
|
||||||
for( S32 i = 0; i < num_options; i++ )
|
for( options_t::iterator it = options.begin(); it != options.end(); it++ )
|
||||||
{
|
{
|
||||||
S32 w = S32(font->getWidth( options[i].second ) + 0.99f) + sp + 2 * LLBUTTON_H_PAD;
|
S32 w = S32(font->getWidth( it->mText ) + 0.99f) + sp + 2 * LLBUTTON_H_PAD;
|
||||||
button_width = llmax( w, button_width );
|
button_width = llmax( w, button_width );
|
||||||
}
|
}
|
||||||
S32 btn_total_width = button_width;
|
S32 btn_total_width = button_width;
|
||||||
@@ -261,33 +241,37 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
|||||||
// Buttons
|
// Buttons
|
||||||
S32 button_left = (getRect().getWidth() - btn_total_width) / 2;
|
S32 button_left = (getRect().getWidth() - btn_total_width) / 2;
|
||||||
|
|
||||||
for( S32 i = 0; i < num_options; i++ )
|
for( options_t::iterator it = options.begin(); it != options.end(); it++ )
|
||||||
{
|
{
|
||||||
LLRect button_rect;
|
LLRect button_rect;
|
||||||
button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT );
|
button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT );
|
||||||
|
|
||||||
|
ButtonData& button_data = *it;
|
||||||
|
|
||||||
LLButton* btn = new LLButton(
|
LLButton* btn = new LLButton(
|
||||||
options[i].first, button_rect,
|
button_data.mName, button_rect,
|
||||||
"","", "",
|
"","", "",
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
font,
|
font,
|
||||||
options[i].second,
|
button_data.mText,
|
||||||
options[i].second);
|
button_data.mText);
|
||||||
|
|
||||||
mButtonData[i].mButton = btn;
|
btn->setClickedCallback(boost::bind(&LLAlertDialog::onButtonPressed, this, _1, button_data.mUrl));
|
||||||
|
|
||||||
btn->setClickedCallback(&LLAlertDialog::onButtonPressed, (void*)(&mButtonData[i]));
|
|
||||||
|
|
||||||
addChild(btn);
|
addChild(btn);
|
||||||
|
|
||||||
if( i == mDefaultOption )
|
if(!mDefaultButton || button_data.mDefault)
|
||||||
{
|
{
|
||||||
btn->setFocus(TRUE);
|
mDefaultButton = btn;
|
||||||
}
|
}
|
||||||
|
|
||||||
button_left += button_width + BTN_HPAD;
|
button_left += button_width + BTN_HPAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
llassert(mDefaultButton); //'options' map should never be empty, thus mDefaultButton should always get set in the above loop.
|
||||||
|
mDefaultButton->setFocus(TRUE);
|
||||||
|
|
||||||
|
|
||||||
// (Optional) Edit Box
|
// (Optional) Edit Box
|
||||||
if (!edit_text_name.empty())
|
if (!edit_text_name.empty())
|
||||||
{
|
{
|
||||||
@@ -346,7 +330,7 @@ bool LLAlertDialog::show()
|
|||||||
mLineEditor->setFocus(TRUE);
|
mLineEditor->setFocus(TRUE);
|
||||||
mLineEditor->selectAll();
|
mLineEditor->selectAll();
|
||||||
}
|
}
|
||||||
if(mDefaultOption >= 0)
|
if(mDefaultButton)
|
||||||
{
|
{
|
||||||
// delay before enabling default button
|
// delay before enabling default button
|
||||||
mDefaultBtnTimer.start(DEFAULT_BUTTON_DELAY);
|
mDefaultBtnTimer.start(DEFAULT_BUTTON_DELAY);
|
||||||
@@ -385,7 +369,8 @@ bool LLAlertDialog::setCheckBox( const std::string& check_title, const std::stri
|
|||||||
check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2,
|
check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2,
|
||||||
max_msg_width, LINE_HEIGHT);
|
max_msg_width, LINE_HEIGHT);
|
||||||
|
|
||||||
mCheck = new LLCheckboxCtrl(std::string("check"), check_rect, check_title, font, onClickIgnore, this);
|
mCheck = new LLCheckboxCtrl(std::string("check"), check_rect, check_title, font);
|
||||||
|
mCheck->setCommitCallback(boost::bind(&LLAlertDialog::onClickIgnore, this, _1));
|
||||||
addChild(mCheck);
|
addChild(mCheck);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -402,8 +387,49 @@ void LLAlertDialog::setVisible( BOOL visible )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Fixing a hole in alert logic. If the alert isn't modal, clicking 'x' to close its floater would result
|
||||||
|
//in a dangling notification. To address this we try to find the most reasonable button to emulate clicking.
|
||||||
|
//Close tends to be the best, as it's most accurate, and is the default for alerts that lack defined buttons.
|
||||||
|
//Next up is cancel, which is the correct behavior for a majority of alert notifications
|
||||||
|
//After that, try 'ok', which is the only button that exists for a few alert notifications. 'ok' for these equates to 'dismiss'.
|
||||||
|
//Finally, if none of the above are found, issue the respond procedure with the dummy button name 'close'.
|
||||||
void LLAlertDialog::onClose(bool app_quitting)
|
void LLAlertDialog::onClose(bool app_quitting)
|
||||||
{
|
{
|
||||||
|
if(mNote.get() && !mNote->isRespondedTo() && !mNote->isIgnored())
|
||||||
|
{
|
||||||
|
LLButton* btn = NULL;
|
||||||
|
bool found_cancel = false;
|
||||||
|
for(child_list_const_iter_t it = beginChild(); it != endChild(); ++it)
|
||||||
|
{
|
||||||
|
LLButton* cur_btn = dynamic_cast<LLButton*>(*it);
|
||||||
|
if(!cur_btn)
|
||||||
|
continue;
|
||||||
|
if( LLStringUtil::compareInsensitive(cur_btn->getName(), "close") == 0 )//prefer 'close' over anything else.
|
||||||
|
{
|
||||||
|
btn = cur_btn;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if(LLStringUtil::compareInsensitive(cur_btn->getName(), "cancel") == 0 )//prefer 'cancel' over 'ok'.
|
||||||
|
{
|
||||||
|
btn = cur_btn;
|
||||||
|
found_cancel = true;
|
||||||
|
}
|
||||||
|
else if(!found_cancel && LLStringUtil::compareInsensitive(cur_btn->getName(), "ok") == 0 )//accept 'ok' as last resort.
|
||||||
|
{
|
||||||
|
btn = cur_btn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LLSD response = mNote->getResponseTemplate();
|
||||||
|
if(btn)
|
||||||
|
response[btn->getName()] = true;
|
||||||
|
else
|
||||||
|
{ //We found no acceptable button so just feed it a fake one.
|
||||||
|
//LLNotification::getSelectedOption will return -1 in notification callbacks.
|
||||||
|
response["Close"] = true;
|
||||||
|
}
|
||||||
|
mNote->respond(response);
|
||||||
|
|
||||||
|
}
|
||||||
LLModalDialog::onClose(app_quitting);
|
LLModalDialog::onClose(app_quitting);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,7 +484,7 @@ void LLAlertDialog::draw()
|
|||||||
if(mDefaultBtnTimer.hasExpired() && mDefaultBtnTimer.getStarted())
|
if(mDefaultBtnTimer.hasExpired() && mDefaultBtnTimer.getStarted())
|
||||||
{
|
{
|
||||||
mDefaultBtnTimer.stop(); // prevent this block from being run more than once
|
mDefaultBtnTimer.stop(); // prevent this block from being run more than once
|
||||||
setDefaultBtn(mButtonData[mDefaultOption].mButton);
|
setDefaultBtn(mDefaultButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
|
static LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
|
||||||
@@ -483,44 +509,37 @@ void LLAlertDialog::setEditTextArgs(const LLSD& edit_args)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
void LLAlertDialog::onButtonPressed( LLUICtrl* ctrl, const std::string url )
|
||||||
void LLAlertDialog::onButtonPressed( void* userdata )
|
|
||||||
{
|
{
|
||||||
ButtonData* button_data = (ButtonData*)userdata;
|
LLSD response = mNote->getResponseTemplate();
|
||||||
LLAlertDialog* self = button_data->mSelf;
|
if (mLineEditor)
|
||||||
|
|
||||||
LLSD response = self->mNote->getResponseTemplate();
|
|
||||||
if (self->mLineEditor)
|
|
||||||
{
|
{
|
||||||
response[self->mLineEditor->getName()] = self->mLineEditor->getValue();
|
response[mLineEditor->getName()] = mLineEditor->getValue();
|
||||||
}
|
}
|
||||||
response[button_data->mButton->getName()] = true;
|
response[ctrl->getName()] = true;
|
||||||
|
|
||||||
// If we declared a URL and chose the URL option, go to the url
|
// If we declared a URL and chose the URL option, go to the url
|
||||||
if (!button_data->mURL.empty() && sURLLoader != NULL)
|
if (!url.empty() && sURLLoader != NULL)
|
||||||
{
|
{
|
||||||
sURLLoader->load(button_data->mURL);
|
sURLLoader->load(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
self->mNote->respond(response); // new notification reponse
|
mNote->respond(response); // new notification reponse
|
||||||
self->close(); // deletes self
|
close(); // deletes self
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLAlertDialog::onClickIgnore(LLUICtrl* ctrl)
|
||||||
void LLAlertDialog::onClickIgnore(LLUICtrl* ctrl, void* user_data)
|
|
||||||
{
|
{
|
||||||
LLAlertDialog* self = (LLAlertDialog*)user_data;
|
|
||||||
|
|
||||||
// checkbox sometimes means "hide and do the default" and
|
// checkbox sometimes means "hide and do the default" and
|
||||||
// other times means "warn me again". Yuck. JC
|
// other times means "warn me again". Yuck. JC
|
||||||
BOOL check = ctrl->getValue();
|
BOOL check = ctrl->getValue();
|
||||||
if (self->mNote->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN)
|
if (mNote->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN)
|
||||||
{
|
{
|
||||||
// question was "show again" so invert value to get "ignore"
|
// question was "show again" so invert value to get "ignore"
|
||||||
check = !check;
|
check = !check;
|
||||||
}
|
}
|
||||||
|
|
||||||
self->mNote->setIgnored(check);
|
mNote->setIgnored(check);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -87,8 +87,8 @@ public:
|
|||||||
//statics
|
//statics
|
||||||
static void initClass();
|
static void initClass();
|
||||||
static bool onNewNotification(const LLSD& notify, bool is_modal);
|
static bool onNewNotification(const LLSD& notify, bool is_modal);
|
||||||
static void onButtonPressed(void* userdata);
|
void onButtonPressed( LLUICtrl* ctrl, const std::string url );
|
||||||
static void onClickIgnore(LLUICtrl* ctrl, void* user_data);
|
void onClickIgnore( LLUICtrl* ctrl );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LLNotificationPtr mNote;
|
LLNotificationPtr mNote;
|
||||||
@@ -102,18 +102,18 @@ private:
|
|||||||
BOOL hasTitleBar() const;
|
BOOL hasTitleBar() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct ButtonData
|
||||||
|
{
|
||||||
|
std::string mName;
|
||||||
|
std::string mText;
|
||||||
|
bool mDefault;
|
||||||
|
std::string mUrl;
|
||||||
|
};
|
||||||
|
|
||||||
static URLLoader* sURLLoader;
|
static URLLoader* sURLLoader;
|
||||||
static LLControlGroup* sSettings;
|
static LLControlGroup* sSettings;
|
||||||
|
|
||||||
struct ButtonData
|
LLButton* mDefaultButton;
|
||||||
{
|
|
||||||
LLAlertDialog* mSelf;
|
|
||||||
LLButton* mButton;
|
|
||||||
std::string mURL;
|
|
||||||
};
|
|
||||||
std::vector<ButtonData> mButtonData;
|
|
||||||
|
|
||||||
S32 mDefaultOption;
|
|
||||||
LLCheckBoxCtrl* mCheck;
|
LLCheckBoxCtrl* mCheck;
|
||||||
BOOL mCaution;
|
BOOL mCaution;
|
||||||
BOOL mUnique;
|
BOOL mUnique;
|
||||||
|
|||||||
@@ -1094,6 +1094,7 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN
|
|||||||
if(p == mChannels.end())
|
if(p == mChannels.end())
|
||||||
{
|
{
|
||||||
llerrs << "Did not find channel named " << channelName << llendl;
|
llerrs << "Did not find channel named " << channelName << llendl;
|
||||||
|
return LLNotificationChannelPtr();
|
||||||
}
|
}
|
||||||
return p->second;
|
return p->second;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,7 +218,7 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<real>1</real>
|
<real>1</real>
|
||||||
</map>
|
</map>
|
||||||
<key>SHAlphaMaskMaxRMSE</key>
|
<key>SHAutoMaskMaxRMSE</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Sets the maximum random mean square error cutoff used when detecting suitable textures for alphamasking. (SHUseRMSEAutoMask must be TRUE for this to have any effect)</string>
|
<string>Sets the maximum random mean square error cutoff used when detecting suitable textures for alphamasking. (SHUseRMSEAutoMask must be TRUE for this to have any effect)</string>
|
||||||
|
|||||||
@@ -1068,10 +1068,10 @@ bool LLFace::canRenderAsMask()
|
|||||||
const LLTextureEntry* te = getTextureEntry();
|
const LLTextureEntry* te = getTextureEntry();
|
||||||
|
|
||||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
||||||
static const LLCachedControl<F32> alpha_mas_max_rmse("SHAlphaMaskMaxRMSE",.09f);
|
static const LLCachedControl<F32> auto_mask_max_rmse("SHAutoMaskMaxRMSE",.09f);
|
||||||
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
|
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
|
||||||
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
|
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
|
||||||
getTexture()->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f)) // texture actually qualifies for masking (lazily recalculated but expensive)
|
(!getViewerObject()->isAttachment() && getTexture()->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f))) // texture actually qualifies for masking (lazily recalculated but expensive)
|
||||||
{
|
{
|
||||||
if (LLPipeline::sRenderDeferred)
|
if (LLPipeline::sRenderDeferred)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ LLPanelDisplay::LLPanelDisplay()
|
|||||||
BOOL LLPanelDisplay::postBuild()
|
BOOL LLPanelDisplay::postBuild()
|
||||||
{
|
{
|
||||||
// return to default values
|
// return to default values
|
||||||
childSetAction("Defaults", setHardwareDefaults, NULL);
|
getChild<LLButton>("Defaults")->setClickedCallback(boost::bind(&LLPanelDisplay::setHardwareDefaults));
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
// Resolution
|
// Resolution
|
||||||
@@ -113,8 +113,7 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
// radio set for fullscreen size
|
// radio set for fullscreen size
|
||||||
|
|
||||||
mCtrlWindowed = getChild<LLCheckBoxCtrl>( "windowed mode");
|
mCtrlWindowed = getChild<LLCheckBoxCtrl>( "windowed mode");
|
||||||
mCtrlWindowed->setCommitCallback(&LLPanelDisplay::onCommitWindowedMode);
|
mCtrlWindowed->setCommitCallback(boost::bind(&LLPanelDisplay::onCommitWindowedMode,this));
|
||||||
mCtrlWindowed->setCallbackUserData(this);
|
|
||||||
|
|
||||||
mAspectRatioLabel1 = getChild<LLTextBox>("AspectRatioLabel1");
|
mAspectRatioLabel1 = getChild<LLTextBox>("AspectRatioLabel1");
|
||||||
mDisplayResLabel = getChild<LLTextBox>("DisplayResLabel");
|
mDisplayResLabel = getChild<LLTextBox>("DisplayResLabel");
|
||||||
@@ -194,25 +193,22 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
}
|
}
|
||||||
|
|
||||||
mCtrlAspectRatio = getChild<LLComboBox>( "aspect_ratio");
|
mCtrlAspectRatio = getChild<LLComboBox>( "aspect_ratio");
|
||||||
mCtrlAspectRatio->setTextEntryCallback(onKeystrokeAspectRatio);
|
mCtrlAspectRatio->setTextEntryCallback(&LLPanelDisplay::onKeystrokeAspectRatio);
|
||||||
mCtrlAspectRatio->setCommitCallback(onSelectAspectRatio);
|
mCtrlAspectRatio->setCallbackUserData(this);
|
||||||
mCtrlAspectRatio->setCallbackUserData(this);
|
mCtrlAspectRatio->setCommitCallback(boost::bind(&LLPanelDisplay::onSelectAspectRatio,this));
|
||||||
// add default aspect ratios
|
// add default aspect ratios
|
||||||
mCtrlAspectRatio->add(aspect_ratio_text, &mAspectRatio, ADD_TOP);
|
mCtrlAspectRatio->add(aspect_ratio_text, &mAspectRatio, ADD_TOP);
|
||||||
mCtrlAspectRatio->setCurrentByIndex(0);
|
mCtrlAspectRatio->setCurrentByIndex(0);
|
||||||
|
|
||||||
mCtrlAutoDetectAspect = getChild<LLCheckBoxCtrl>( "aspect_auto_detect");
|
mCtrlAutoDetectAspect = getChild<LLCheckBoxCtrl>( "aspect_auto_detect");
|
||||||
mCtrlAutoDetectAspect->setCommitCallback(onCommitAutoDetectAspect);
|
mCtrlAutoDetectAspect->setCommitCallback(boost::bind(&LLPanelDisplay::onCommitAutoDetectAspect,this,_2));
|
||||||
mCtrlAutoDetectAspect->setCallbackUserData(this);
|
|
||||||
|
|
||||||
// radio performance box
|
// radio performance box
|
||||||
mCtrlSliderQuality = getChild<LLSliderCtrl>("QualityPerformanceSelection");
|
mCtrlSliderQuality = getChild<LLSliderCtrl>("QualityPerformanceSelection");
|
||||||
mCtrlSliderQuality->setSliderMouseUpCallback(boost::bind(&LLPanelDisplay::onChangeQuality,mCtrlSliderQuality,this));
|
mCtrlSliderQuality->setSliderMouseUpCallback(boost::bind(&LLPanelDisplay::onChangeQuality,this,_1));
|
||||||
mCtrlSliderQuality->setCallbackUserData(this);
|
|
||||||
|
|
||||||
mCtrlCustomSettings = getChild<LLCheckBoxCtrl>("CustomSettings");
|
mCtrlCustomSettings = getChild<LLCheckBoxCtrl>("CustomSettings");
|
||||||
mCtrlCustomSettings->setCommitCallback(onChangeCustom);
|
mCtrlCustomSettings->setCommitCallback(boost::bind(&LLPanelDisplay::onChangeCustom));
|
||||||
mCtrlCustomSettings->setCallbackUserData(this);
|
|
||||||
|
|
||||||
//mGraphicsBorder = getChild<LLViewBorder>("GraphicsBorder");
|
//mGraphicsBorder = getChild<LLViewBorder>("GraphicsBorder");
|
||||||
|
|
||||||
@@ -226,24 +222,19 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Enable Reflections
|
// Enable Reflections
|
||||||
mCtrlReflectionDetail = getChild<LLComboBox>("ReflectionDetailCombo");
|
mCtrlReflectionDetail = getChild<LLComboBox>("ReflectionDetailCombo");
|
||||||
mCtrlReflectionDetail->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlReflectionDetail->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlReflectionDetail->setCallbackUserData(this);
|
|
||||||
|
|
||||||
// WindLight
|
// WindLight
|
||||||
mCtrlWindLight = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
|
mCtrlWindLight = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
|
||||||
mCtrlWindLight->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlWindLight->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlWindLight->setCallbackUserData(this);
|
|
||||||
|
|
||||||
// Deferred
|
// Deferred
|
||||||
mCtrlDeferred = getChild<LLCheckBoxCtrl>("RenderDeferred");
|
mCtrlDeferred = getChild<LLCheckBoxCtrl>("RenderDeferred");
|
||||||
mCtrlDeferred->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlDeferred->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlDeferred->setCallbackUserData(this);
|
|
||||||
mCtrlDeferredDoF = getChild<LLCheckBoxCtrl>("RenderDepthOfField");
|
mCtrlDeferredDoF = getChild<LLCheckBoxCtrl>("RenderDepthOfField");
|
||||||
mCtrlDeferredDoF->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlDeferredDoF->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlDeferredDoF->setCallbackUserData(this);
|
|
||||||
mCtrlShadowDetail = getChild<LLComboBox>("ShadowDetailCombo");
|
mCtrlShadowDetail = getChild<LLComboBox>("ShadowDetailCombo");
|
||||||
mCtrlShadowDetail->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlShadowDetail->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlShadowDetail->setCallbackUserData(this);
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Terrain Scale
|
// Terrain Scale
|
||||||
@@ -252,15 +243,13 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Enable Avatar Shaders
|
// Enable Avatar Shaders
|
||||||
mCtrlAvatarVP = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
|
mCtrlAvatarVP = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
|
||||||
mCtrlAvatarVP->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlAvatarVP->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlAvatarVP->setCallbackUserData(this);
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Avatar Render Mode
|
// Avatar Render Mode
|
||||||
mCtrlAvatarCloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
|
mCtrlAvatarCloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
|
||||||
mCtrlAvatarImpostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
|
mCtrlAvatarImpostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
|
||||||
mCtrlAvatarImpostors->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlAvatarImpostors->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlAvatarImpostors->setCallbackUserData(this);
|
|
||||||
mCtrlNonImpostors = getChild<LLSliderCtrl>("AvatarMaxVisible");
|
mCtrlNonImpostors = getChild<LLSliderCtrl>("AvatarMaxVisible");
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@@ -278,8 +267,7 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Global Shader Enable
|
// Global Shader Enable
|
||||||
mCtrlShaderEnable = getChild<LLCheckBoxCtrl>("BasicShaders");
|
mCtrlShaderEnable = getChild<LLCheckBoxCtrl>("BasicShaders");
|
||||||
mCtrlShaderEnable->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlShaderEnable->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlShaderEnable->setCallbackUserData(this);
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
@@ -287,50 +275,42 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
mCtrlDrawDistance = getChild<LLSliderCtrl>("DrawDistance");
|
mCtrlDrawDistance = getChild<LLSliderCtrl>("DrawDistance");
|
||||||
mDrawDistanceMeterText1 = getChild<LLTextBox>("DrawDistanceMeterText1");
|
mDrawDistanceMeterText1 = getChild<LLTextBox>("DrawDistanceMeterText1");
|
||||||
mDrawDistanceMeterText2 = getChild<LLTextBox>("DrawDistanceMeterText2");
|
mDrawDistanceMeterText2 = getChild<LLTextBox>("DrawDistanceMeterText2");
|
||||||
mCtrlDrawDistance->setCommitCallback(&LLPanelDisplay::updateMeterText);
|
mCtrlDrawDistance->setCommitCallback(boost::bind(&LLPanelDisplay::updateMeterText, this));
|
||||||
mCtrlDrawDistance->setCallbackUserData(this);
|
|
||||||
|
|
||||||
// Object detail slider
|
// Object detail slider
|
||||||
mCtrlLODFactor = getChild<LLSliderCtrl>("ObjectMeshDetail");
|
mCtrlLODFactor = getChild<LLSliderCtrl>("ObjectMeshDetail");
|
||||||
mLODFactorText = getChild<LLTextBox>("ObjectMeshDetailText");
|
mLODFactorText = getChild<LLTextBox>("ObjectMeshDetailText");
|
||||||
mCtrlLODFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlLODFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1,mLODFactorText));
|
||||||
mCtrlLODFactor->setCallbackUserData(mLODFactorText);
|
|
||||||
|
|
||||||
// Flex object detail slider
|
// Flex object detail slider
|
||||||
mCtrlFlexFactor = getChild<LLSliderCtrl>("FlexibleMeshDetail");
|
mCtrlFlexFactor = getChild<LLSliderCtrl>("FlexibleMeshDetail");
|
||||||
mFlexFactorText = getChild<LLTextBox>("FlexibleMeshDetailText");
|
mFlexFactorText = getChild<LLTextBox>("FlexibleMeshDetailText");
|
||||||
mCtrlFlexFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlFlexFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText,_1, mFlexFactorText));
|
||||||
mCtrlFlexFactor->setCallbackUserData(mFlexFactorText);
|
|
||||||
|
|
||||||
// Tree detail slider
|
// Tree detail slider
|
||||||
mCtrlTreeFactor = getChild<LLSliderCtrl>("TreeMeshDetail");
|
mCtrlTreeFactor = getChild<LLSliderCtrl>("TreeMeshDetail");
|
||||||
mTreeFactorText = getChild<LLTextBox>("TreeMeshDetailText");
|
mTreeFactorText = getChild<LLTextBox>("TreeMeshDetailText");
|
||||||
mCtrlTreeFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlTreeFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mTreeFactorText));
|
||||||
mCtrlTreeFactor->setCallbackUserData(mTreeFactorText);
|
|
||||||
|
|
||||||
// Avatar detail slider
|
// Avatar detail slider
|
||||||
mCtrlAvatarFactor = getChild<LLSliderCtrl>("AvatarMeshDetail");
|
mCtrlAvatarFactor = getChild<LLSliderCtrl>("AvatarMeshDetail");
|
||||||
mAvatarFactorText = getChild<LLTextBox>("AvatarMeshDetailText");
|
mAvatarFactorText = getChild<LLTextBox>("AvatarMeshDetailText");
|
||||||
mCtrlAvatarFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlAvatarFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mAvatarFactorText));
|
||||||
mCtrlAvatarFactor->setCallbackUserData(mAvatarFactorText);
|
|
||||||
|
|
||||||
// Avatar physics detail slider
|
// Avatar physics detail slider
|
||||||
mCtrlAvatarPhysicsFactor = getChild<LLSliderCtrl>("AvatarPhysicsDetail");
|
mCtrlAvatarPhysicsFactor = getChild<LLSliderCtrl>("AvatarPhysicsDetail");
|
||||||
mAvatarPhysicsFactorText = getChild<LLTextBox>("AvatarPhysicsDetailText");
|
mAvatarPhysicsFactorText = getChild<LLTextBox>("AvatarPhysicsDetailText");
|
||||||
mCtrlAvatarPhysicsFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlAvatarPhysicsFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mAvatarPhysicsFactorText));
|
||||||
mCtrlAvatarPhysicsFactor->setCallbackUserData(mAvatarPhysicsFactorText);
|
|
||||||
|
|
||||||
// Terrain detail slider
|
// Terrain detail slider
|
||||||
mCtrlTerrainFactor = getChild<LLSliderCtrl>("TerrainMeshDetail");
|
mCtrlTerrainFactor = getChild<LLSliderCtrl>("TerrainMeshDetail");
|
||||||
mTerrainFactorText = getChild<LLTextBox>("TerrainMeshDetailText");
|
mTerrainFactorText = getChild<LLTextBox>("TerrainMeshDetailText");
|
||||||
mCtrlTerrainFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlTerrainFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mTerrainFactorText));
|
||||||
mCtrlTerrainFactor->setCallbackUserData(mTerrainFactorText);
|
|
||||||
|
|
||||||
// Terrain detail slider
|
// Terrain detail slider
|
||||||
mCtrlSkyFactor = getChild<LLSliderCtrl>("SkyMeshDetail");
|
mCtrlSkyFactor = getChild<LLSliderCtrl>("SkyMeshDetail");
|
||||||
mSkyFactorText = getChild<LLTextBox>("SkyMeshDetailText");
|
mSkyFactorText = getChild<LLTextBox>("SkyMeshDetailText");
|
||||||
mCtrlSkyFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlSkyFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mSkyFactorText));
|
||||||
mCtrlSkyFactor->setCallbackUserData(mSkyFactorText);
|
|
||||||
|
|
||||||
// Particle detail slider
|
// Particle detail slider
|
||||||
mCtrlMaxParticle = getChild<LLSliderCtrl>("MaxParticleCount");
|
mCtrlMaxParticle = getChild<LLSliderCtrl>("MaxParticleCount");
|
||||||
@@ -338,8 +318,7 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
// Glow detail slider
|
// Glow detail slider
|
||||||
mCtrlPostProcess = getChild<LLSliderCtrl>("RenderPostProcess");
|
mCtrlPostProcess = getChild<LLSliderCtrl>("RenderPostProcess");
|
||||||
mPostProcessText = getChild<LLTextBox>("PostProcessText");
|
mPostProcessText = getChild<LLTextBox>("PostProcessText");
|
||||||
mCtrlPostProcess->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlPostProcess->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mPostProcessText));
|
||||||
mCtrlPostProcess->setCallbackUserData(mPostProcessText);
|
|
||||||
|
|
||||||
// Text boxes (for enabling/disabling)
|
// Text boxes (for enabling/disabling)
|
||||||
mShaderText = getChild<LLTextBox>("ShadersText");
|
mShaderText = getChild<LLTextBox>("ShadersText");
|
||||||
@@ -351,7 +330,11 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
mTerrainScaleText = getChild<LLTextBox>("TerrainScaleText");
|
mTerrainScaleText = getChild<LLTextBox>("TerrainScaleText");
|
||||||
|
|
||||||
// Hardware tab
|
// Hardware tab
|
||||||
childSetCommitCallback("vbo", &LLPanelDisplay::onRenderVBOEnable, this);
|
mVBO = getChild<LLCheckBoxCtrl>("vbo");
|
||||||
|
mVBO->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
|
|
||||||
|
mVBOStream = getChild<LLCheckBoxCtrl>("vbo_stream");
|
||||||
|
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
|
|
||||||
@@ -598,13 +581,13 @@ void LLPanelDisplay::refreshEnabledState()
|
|||||||
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
|
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
|
||||||
!gGLManager.mHasVertexBufferObject)
|
!gGLManager.mHasVertexBufferObject)
|
||||||
{
|
{
|
||||||
childSetEnabled("vbo", false);
|
mVBO->setEnabled(false);
|
||||||
//Streaming VBOs -Shyotl
|
//Streaming VBOs -Shyotl
|
||||||
childSetEnabled("vbo_stream", false);
|
mVBOStream->setEnabled(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
childSetEnabled("vbo_stream", LLVertexBuffer::sEnableVBOs);
|
mVBOStream->setEnabled(gSavedSettings.getBOOL("RenderVBOEnable"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no windlight shaders, enable gamma, and fog distance
|
// if no windlight shaders, enable gamma, and fog distance
|
||||||
@@ -811,7 +794,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
|
|||||||
// hide one meter text if we're making things visible
|
// hide one meter text if we're making things visible
|
||||||
if(!isHidden)
|
if(!isHidden)
|
||||||
{
|
{
|
||||||
updateMeterText(mCtrlDrawDistance, this);
|
updateMeterText();
|
||||||
}
|
}
|
||||||
|
|
||||||
mMeshDetailText->setVisible(!isHidden);
|
mMeshDetailText->setVisible(!isHidden);
|
||||||
@@ -900,12 +883,11 @@ void LLPanelDisplay::apply()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::onChangeQuality(LLUICtrl *ctrl, void *data)
|
void LLPanelDisplay::onChangeQuality(LLUICtrl* caller)
|
||||||
{
|
{
|
||||||
LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(ctrl);
|
LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(caller);
|
||||||
LLPanelDisplay* cur_panel = static_cast<LLPanelDisplay*>(data);
|
|
||||||
|
|
||||||
if(sldr == NULL || cur_panel == NULL)
|
if(sldr == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -914,19 +896,14 @@ void LLPanelDisplay::onChangeQuality(LLUICtrl *ctrl, void *data)
|
|||||||
LLFeatureManager::getInstance()->setGraphicsLevel(set, true);
|
LLFeatureManager::getInstance()->setGraphicsLevel(set, true);
|
||||||
|
|
||||||
LLFloaterPreference::refreshEnabledGraphics();
|
LLFloaterPreference::refreshEnabledGraphics();
|
||||||
cur_panel->refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::onChangeCustom(LLUICtrl *ctrl, void *data)
|
void LLPanelDisplay::onChangeCustom()
|
||||||
{
|
{
|
||||||
LLFloaterPreference::refreshEnabledGraphics();
|
LLFloaterPreference::refreshEnabledGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::onApplyResolution(LLUICtrl* src, void* user_data)
|
|
||||||
{
|
|
||||||
((LLPanelDisplay*) src)->applyResolution();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLPanelDisplay::applyResolution()
|
void LLPanelDisplay::applyResolution()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1018,20 +995,14 @@ void LLPanelDisplay::applyWindowSize()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onCommitWindowedMode()
|
||||||
void LLPanelDisplay::onCommitWindowedMode(LLUICtrl* ctrl, void *data)
|
|
||||||
{
|
{
|
||||||
LLPanelDisplay *panel = (LLPanelDisplay*)data;
|
refresh();
|
||||||
|
|
||||||
panel->refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onCommitAutoDetectAspect(const LLSD& value)
|
||||||
void LLPanelDisplay::onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data)
|
|
||||||
{
|
{
|
||||||
LLPanelDisplay *panel = (LLPanelDisplay*)data;
|
BOOL auto_detect = value.asBoolean();
|
||||||
|
|
||||||
BOOL auto_detect = ((LLCheckBoxCtrl*)ctrl)->get();
|
|
||||||
F32 ratio;
|
F32 ratio;
|
||||||
|
|
||||||
if (auto_detect)
|
if (auto_detect)
|
||||||
@@ -1053,27 +1024,23 @@ void LLPanelDisplay::onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data)
|
|||||||
aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio());
|
aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio());
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->mCtrlAspectRatio->setLabel(aspect);
|
mCtrlAspectRatio->setLabel(aspect);
|
||||||
|
|
||||||
ratio = gViewerWindow->mWindow->getNativeAspectRatio();
|
ratio = gViewerWindow->mWindow->getNativeAspectRatio();
|
||||||
gSavedSettings.setF32("FullScreenAspectRatio", ratio);
|
gSavedSettings.setF32("FullScreenAspectRatio", ratio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data)
|
||||||
void LLPanelDisplay::onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data)
|
|
||||||
{
|
{
|
||||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
||||||
|
|
||||||
panel->mCtrlAutoDetectAspect->set(FALSE);
|
panel->mCtrlAutoDetectAspect->set(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onSelectAspectRatio()
|
||||||
void LLPanelDisplay::onSelectAspectRatio(LLUICtrl*, void* user_data)
|
|
||||||
{
|
{
|
||||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
mCtrlAutoDetectAspect->set(FALSE);
|
||||||
|
|
||||||
panel->mCtrlAutoDetectAspect->set(FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
@@ -1092,22 +1059,13 @@ void LLPanelDisplay::fractionFromDecimal(F32 decimal_val, S32& numerator, S32& d
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onVertexShaderEnable()
|
||||||
void LLPanelDisplay::onVertexShaderEnable(LLUICtrl* self, void* data)
|
|
||||||
{
|
{
|
||||||
LLFloaterPreference::refreshEnabledGraphics();
|
LLFloaterPreference::refreshEnabledGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
void LLPanelDisplay::onRenderVBOEnable(LLUICtrl* self, void* data)
|
void LLPanelDisplay::setHardwareDefaults()
|
||||||
{
|
|
||||||
LLPanelDisplay* panel = (LLPanelDisplay*)data;
|
|
||||||
bool enable = panel->childGetValue("vbo").asBoolean();
|
|
||||||
panel->childSetEnabled("vbo_stream", enable);
|
|
||||||
if(!enable) panel->childSetValue("vbo_stream", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLPanelDisplay::setHardwareDefaults(void* user_data)
|
|
||||||
{
|
{
|
||||||
LLFeatureManager::getInstance()->applyRecommendedSettings();
|
LLFeatureManager::getInstance()->applyRecommendedSettings();
|
||||||
LLControlVariable* controlp = gSavedSettings.getControl("RenderAvatarMaxVisible");
|
LLControlVariable* controlp = gSavedSettings.getControl("RenderAvatarMaxVisible");
|
||||||
@@ -1118,11 +1076,11 @@ void LLPanelDisplay::setHardwareDefaults(void* user_data)
|
|||||||
LLFloaterPreference::refreshEnabledGraphics();
|
LLFloaterPreference::refreshEnabledGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, void* user_data)
|
//static
|
||||||
|
void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box)
|
||||||
{
|
{
|
||||||
// get our UI widgets
|
// get our UI widgets
|
||||||
LLTextBox* text_box = (LLTextBox*)user_data;
|
LLSliderCtrl* slider = dynamic_cast<LLSliderCtrl*>(ctrl);
|
||||||
LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;
|
|
||||||
if(text_box == NULL || slider == NULL)
|
if(text_box == NULL || slider == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -1160,20 +1118,13 @@ void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, void* user_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::updateMeterText(LLUICtrl* ctrl, void* user_data)
|
void LLPanelDisplay::updateMeterText()
|
||||||
{
|
{
|
||||||
// get our UI widgets
|
|
||||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
|
||||||
LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;
|
|
||||||
|
|
||||||
LLTextBox* m1 = panel->getChild<LLTextBox>("DrawDistanceMeterText1");
|
|
||||||
LLTextBox* m2 = panel->getChild<LLTextBox>("DrawDistanceMeterText2");
|
|
||||||
|
|
||||||
// toggle the two text boxes based on whether we have 2 or 3 digits
|
// toggle the two text boxes based on whether we have 2 or 3 digits
|
||||||
F32 val = slider->getValueF32();
|
F32 val = mCtrlDrawDistance->getValueF32();
|
||||||
bool two_digits = val < 100;
|
bool two_digits = val < 100;
|
||||||
m1->setVisible(two_digits);
|
mDrawDistanceMeterText1->setVisible(two_digits);
|
||||||
m2->setVisible(!two_digits);
|
mDrawDistanceMeterText2->setVisible(!two_digits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ protected:
|
|||||||
LLTextBox *mShadowDetailText;
|
LLTextBox *mShadowDetailText;
|
||||||
LLTextBox *mTerrainScaleText;
|
LLTextBox *mTerrainScaleText;
|
||||||
|
|
||||||
|
LLCheckBoxCtrl *mVBO;
|
||||||
|
LLCheckBoxCtrl *mVBOStream;
|
||||||
|
|
||||||
BOOL mFSAutoDetectAspect;
|
BOOL mFSAutoDetectAspect;
|
||||||
F32 mAspectRatio;
|
F32 mAspectRatio;
|
||||||
|
|
||||||
@@ -192,31 +195,24 @@ protected:
|
|||||||
S32 mVideoCardMem;
|
S32 mVideoCardMem;
|
||||||
F32 mFogRatio;
|
F32 mFogRatio;
|
||||||
|
|
||||||
static void setGraphicsSettings(LLControlGroup& group);
|
|
||||||
static void createGroup();
|
|
||||||
|
|
||||||
// if the quality radio buttons are changed
|
// if the quality radio buttons are changed
|
||||||
static void onChangeQuality(LLUICtrl *ctrl, void *data);
|
void onChangeQuality(LLUICtrl* caller);
|
||||||
|
|
||||||
// if the custom settings box is clicked
|
// if the custom settings box is clicked
|
||||||
static void onChangeCustom(LLUICtrl *ctrl, void *data);
|
static void onChangeCustom();
|
||||||
|
|
||||||
static void onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data);
|
void onCommitAutoDetectAspect(const LLSD& value);
|
||||||
static void onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data);
|
static void onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data);
|
||||||
static void onSelectAspectRatio(LLUICtrl*, void*);
|
void onSelectAspectRatio();
|
||||||
static void onCommitWindowedMode(LLUICtrl* ctrl, void *data);
|
void onCommitWindowedMode();
|
||||||
static void onApplyResolution(LLUICtrl* ctrl, void* data);
|
static void updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box);
|
||||||
static void updateSliderText(LLUICtrl* ctrl, void* user_data);
|
void updateMeterText();
|
||||||
static void updateMeterText(LLUICtrl* ctrl, void* user_data);
|
|
||||||
|
|
||||||
/// callback for defaults
|
/// callback for defaults
|
||||||
static void setHardwareDefaults(void *data);
|
static void setHardwareDefaults();
|
||||||
|
|
||||||
// callback for when client turns on shaders
|
// callback for when client turns on shaders
|
||||||
static void onVertexShaderEnable(LLUICtrl*, void*);
|
static void onVertexShaderEnable();
|
||||||
|
|
||||||
// callbacks for hardware tab
|
|
||||||
static void onRenderVBOEnable(LLUICtrl*, void*);
|
|
||||||
|
|
||||||
// helper function
|
// helper function
|
||||||
static void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
|
static void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
|
||||||
|
|||||||
@@ -283,8 +283,8 @@ void LLPreviewTexture::draw()
|
|||||||
mImage);
|
mImage);
|
||||||
|
|
||||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
||||||
static const LLCachedControl<F32> alpha_mas_max_rmse("SHAlphaMaskMaxRMSE",.09f);
|
static const LLCachedControl<F32> auto_mask_max_rmse("SHAutoMaskMaxRMSE",.09f);
|
||||||
if (mAlphaMaskResult != mImage->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f))
|
if (mAlphaMaskResult != mImage->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f))
|
||||||
{
|
{
|
||||||
mAlphaMaskResult = !mAlphaMaskResult;
|
mAlphaMaskResult = !mAlphaMaskResult;
|
||||||
if (!mAlphaMaskResult)
|
if (!mAlphaMaskResult)
|
||||||
|
|||||||
@@ -1339,7 +1339,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||||||
}
|
}
|
||||||
LLHTTPClient::request(mUrl, LLHTTPClient::HTTP_GET, NULL,
|
LLHTTPClient::request(mUrl, LLHTTPClient::HTTP_GET, NULL,
|
||||||
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset, true),
|
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset, true),
|
||||||
headers/*,*/ DEBUG_CURLIO_PARAM(false), keep_alive, no_does_authentication, allow_compressed_reply, NULL, 0, NULL);
|
headers/*,*/ DEBUG_CURLIO_PARAM(debug_off), keep_alive, no_does_authentication, allow_compressed_reply, NULL, 0, NULL);
|
||||||
res = true;
|
res = true;
|
||||||
}
|
}
|
||||||
if (!res)
|
if (!res)
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ void settings_setup_listeners()
|
|||||||
gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||||
gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||||
gSavedSettings.getControl("SHUseRMSEAutoMask")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
gSavedSettings.getControl("SHUseRMSEAutoMask")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||||
gSavedSettings.getControl("SHAlphaMaskMaxRMSE")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
gSavedSettings.getControl("SHAutoMaskMaxRMSE")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||||
gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||||
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||||
//See LL jira VWR-3258 comment section. Implemented by LL in 2.1 -Shyotl
|
//See LL jira VWR-3258 comment section. Implemented by LL in 2.1 -Shyotl
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
|
|||||||
if( ! mediaUrl.empty() && gSavedSettings.getWarning("FirstStreamingVideo") )
|
if( ! mediaUrl.empty() && gSavedSettings.getWarning("FirstStreamingVideo") )
|
||||||
{
|
{
|
||||||
LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(),
|
LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(),
|
||||||
boost::bind(callback_play_media, _1, _2, parcel));
|
boost::bind(&callback_play_media, _1, _2, parcel));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -903,35 +903,43 @@ void callback_media_alert(const LLSD ¬ification, const LLSD &response, LLParc
|
|||||||
LLViewerParcelMedia::playStreamingMusic(parcel, false);
|
LLViewerParcelMedia::playStreamingMusic(parcel, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (option == 1 || option == 2) // Deny or Blacklist
|
else
|
||||||
{
|
{
|
||||||
LLViewerParcelMedia::sDeniedMedia.insert(domain);
|
|
||||||
if (ip != domain && domain.find('/') == std::string::npos)
|
|
||||||
{
|
|
||||||
LLViewerParcelMedia::sDeniedMedia.insert(ip);
|
|
||||||
}
|
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
LLViewerParcelMedia::stopStreamingMusic();
|
LLViewerParcelMedia::stopStreamingMusic();
|
||||||
}
|
}
|
||||||
if (option == 1) // Deny
|
else
|
||||||
{
|
{
|
||||||
LLNotificationsUtil::add("MediaBlocked", args);
|
LLViewerParcelMedia::stopStreamingMusic();
|
||||||
}
|
}
|
||||||
else // Blacklist
|
if (option == 1 || option == 2) // Deny or Blacklist
|
||||||
{
|
{
|
||||||
LLSD newmedia;
|
LLViewerParcelMedia::sDeniedMedia.insert(domain);
|
||||||
newmedia["domain"] = domain;
|
|
||||||
newmedia["action"] = "deny";
|
|
||||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
|
||||||
if (ip != domain && domain.find('/') == std::string::npos)
|
if (ip != domain && domain.find('/') == std::string::npos)
|
||||||
{
|
{
|
||||||
newmedia["domain"] = ip;
|
LLViewerParcelMedia::sDeniedMedia.insert(ip);
|
||||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
}
|
||||||
|
|
||||||
|
if (option == 1) // Deny
|
||||||
|
{
|
||||||
|
LLNotificationsUtil::add("MediaBlocked", args);
|
||||||
|
}
|
||||||
|
else // Blacklist
|
||||||
|
{
|
||||||
|
LLSD newmedia;
|
||||||
|
newmedia["domain"] = domain;
|
||||||
|
newmedia["action"] = "deny";
|
||||||
|
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||||
|
if (ip != domain && domain.find('/') == std::string::npos)
|
||||||
|
{
|
||||||
|
newmedia["domain"] = ip;
|
||||||
|
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||||
|
}
|
||||||
|
LLViewerParcelMedia::saveDomainFilterList();
|
||||||
|
args["LISTED"] = "blacklisted";
|
||||||
|
LLNotificationsUtil::add("MediaListed", args);
|
||||||
}
|
}
|
||||||
LLViewerParcelMedia::saveDomainFilterList();
|
|
||||||
args["LISTED"] = "blacklisted";
|
|
||||||
LLNotificationsUtil::add("MediaListed", args);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -370,9 +370,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
||||||
static const LLCachedControl<F32> alpha_mas_max_rmse("SHAlphaMaskMaxRMSE",.09f);
|
static const LLCachedControl<F32> auto_mask_max_rmse("SHAutoMaskMaxRMSE",.09f);
|
||||||
addText(xpos, ypos, llformat("Mask: %s", imagep->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f) ? "TRUE":"FALSE")); ypos += y_inc;
|
addText(xpos, ypos, llformat("Mask: %s", imagep->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f) ? "TRUE":"FALSE")); ypos += y_inc;
|
||||||
addText(xpos, ypos, llformat("ID: %s", imagep->getID().asString().c_str())); ypos += y_inc;
|
addText(xpos, ypos, llformat("ID: %s", imagep->getID().asString())); ypos += y_inc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user