Merge SL-10501 fix
commit
5c5b625892
|
|
@ -895,15 +895,6 @@ void LLLightState::setDiffuse(const LLColor4& diffuse)
|
|||
}
|
||||
}
|
||||
|
||||
void LLLightState::setDiffuseB(const LLColor4& diffuse)
|
||||
{
|
||||
if (mDiffuseB != diffuse)
|
||||
{
|
||||
++gGL.mLightHash;
|
||||
mDiffuseB = diffuse;
|
||||
}
|
||||
}
|
||||
|
||||
void LLLightState::setAmbient(const LLColor4& ambient)
|
||||
{
|
||||
if (mAmbient != ambient)
|
||||
|
|
@ -1162,7 +1153,6 @@ void LLRender::syncLightState()
|
|||
LLVector3 direction[8];
|
||||
LLVector4 attenuation[8];
|
||||
LLVector3 diffuse[8];
|
||||
LLVector3 diffuseB[8];
|
||||
|
||||
for (U32 i = 0; i < 8; i++)
|
||||
{
|
||||
|
|
@ -1172,7 +1162,6 @@ void LLRender::syncLightState()
|
|||
direction[i] = light->mSpotDirection;
|
||||
attenuation[i].set(light->mLinearAtten, light->mQuadraticAtten, light->mSpecular.mV[2], light->mSpecular.mV[3]);
|
||||
diffuse[i].set(light->mDiffuse.mV);
|
||||
diffuseB[i].set(light->mDiffuseB.mV);
|
||||
}
|
||||
|
||||
shader->uniform4fv(LLShaderMgr::LIGHT_POSITION, 8, position[0].mV);
|
||||
|
|
@ -1180,8 +1169,8 @@ void LLRender::syncLightState()
|
|||
shader->uniform4fv(LLShaderMgr::LIGHT_ATTENUATION, 8, attenuation[0].mV);
|
||||
shader->uniform3fv(LLShaderMgr::LIGHT_DIFFUSE, 8, diffuse[0].mV);
|
||||
shader->uniform4fv(LLShaderMgr::LIGHT_AMBIENT, 1, mAmbientLightColor.mV);
|
||||
//HACK -- duplicate sunlight color for compatibility with drivers that can't deal with multiple shader objects referencing the same uniform
|
||||
shader->uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, 1, diffuse[0].mV);
|
||||
shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, diffuseB[0].mV);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1488,6 +1477,13 @@ void LLRender::matrixMode(U32 mode)
|
|||
{
|
||||
if (mode == MM_TEXTURE)
|
||||
{
|
||||
U32 tex_index = gGL.getCurrentTexUnitIndex();
|
||||
// the shaders don't actually reference anything beyond texture_matrix0/1
|
||||
if (tex_index > 3)
|
||||
{
|
||||
LL_WARNS_ONCE("render") << "Cannot use texture matrix with texture unit " << tex_index << " forcing texture matrix 3!" << LL_ENDL;
|
||||
tex_index = 3;
|
||||
}
|
||||
mode = MM_TEXTURE0 + gGL.getCurrentTexUnitIndex();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1999,15 +1999,24 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
|
|||
|
||||
if (face->mTextureMatrix && vobj->mTexAnimMode)
|
||||
{
|
||||
gGL.matrixMode(LLRender::MM_TEXTURE);
|
||||
gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix);
|
||||
U32 tex_index = gGL.getCurrentTexUnitIndex();
|
||||
if (tex_index <= 1)
|
||||
{
|
||||
gGL.matrixMode(LLRender::MM_TEXTURE);
|
||||
gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS_ONCE("render") << "Cannot use tex anim of tex index " << tex_index << " ignoring!" << LL_ENDL;
|
||||
}
|
||||
|
||||
buff->setBuffer(data_mask);
|
||||
buff->drawRange(LLRender::TRIANGLES, start, end, count, offset);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_TEXTURE);
|
||||
gGL.loadIdentity();
|
||||
|
||||
if (tex_index <= 1)
|
||||
{
|
||||
gGL.loadIdentity();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1595,6 +1595,7 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb)
|
|||
LLSettingsBase::Seconds transition = LLViewerParcelMgr::getInstance()->getTeleportInProgress() ? TRANSITION_FAST : TRANSITION_DEFAULT;
|
||||
cb = [this, transition](S32 pid, EnvironmentInfo::ptr_t envinfo)
|
||||
{
|
||||
clearEnvironment(ENV_PARCEL);
|
||||
recordEnvironment(pid, envinfo, transition);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
#include "llfloaterreg.h"
|
||||
#include "llfloatereditextdaycycle.h"
|
||||
#include "llmultisliderctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llsettingsvo.h"
|
||||
|
||||
#include "llappviewer.h"
|
||||
|
|
@ -779,9 +780,17 @@ void LLPanelEnvironmentInfo::onAltSliderMouseUp()
|
|||
void LLPanelEnvironmentInfo::onBtnDefault()
|
||||
{
|
||||
LLHandle<LLPanel> that_h = getHandle();
|
||||
|
||||
LLEnvironment::instance().resetParcel(getParcelId(),
|
||||
[that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
|
||||
S32 parcel_id = getParcelId();
|
||||
LLNotificationsUtil::add("SettingsConfirmReset", LLSD(), LLSD(),
|
||||
[that_h, parcel_id](const LLSD¬if, const LLSD&resp)
|
||||
{
|
||||
S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
|
||||
if (opt == 0)
|
||||
{
|
||||
LLEnvironment::instance().resetParcel(parcel_id,
|
||||
[that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void LLPanelEnvironmentInfo::onBtnEdit()
|
||||
|
|
|
|||
|
|
@ -268,12 +268,9 @@ bool LLWeb::useExternalBrowser(const std::string &url)
|
|||
boost::match_results<std::string::const_iterator> matches;
|
||||
return !(boost::regex_search(uri_string, matches, pattern));
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::regex pattern = boost::regex("^mailto:", boost::regex::perl | boost::regex::icase);
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
return boost::regex_search(url, matches, pattern);
|
||||
}
|
||||
return false;
|
||||
|
||||
boost::regex pattern = boost::regex("^mailto:", boost::regex::perl | boost::regex::icase);
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
return boost::regex_search(url, matches, pattern);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11308,6 +11308,19 @@ Are you sure you want to continue?
|
|||
yestext="Yes"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="SettingsConfirmReset"
|
||||
type="alertmodal">
|
||||
You are about to remove all applied settings.
|
||||
Are you sure you want to continue?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
name="okcancelbuttons"
|
||||
notext="No"
|
||||
yestext="Yes"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="SettingsMakeNoTrans"
|
||||
|
|
|
|||
Loading…
Reference in New Issue