summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2013-04-26 06:19:43 -0700
committerGraham Madarasz <graham@lindenlab.com>2013-04-26 06:19:43 -0700
commitf07e0d9760053a9814fc410a7c9f0f8192c8bd39 (patch)
treed59f4aa7f4c2c31ff290671cf76a905d14833e72 /indra
parentfd447189c5e05df53cd8ec0a4168370c03c3bb16 (diff)
parent6f953cc97b90eff43d69c2bda28fc9863fc57214 (diff)
Merge viewer-dev-mat and fix llvovolume.cpp missed sunshine merges
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl2
-rw-r--r--indra/newview/llmaterialmgr.cpp43
-rwxr-xr-xindra/newview/llpanelface.cpp75
-rwxr-xr-xindra/newview/lltexturectrl.h1
-rwxr-xr-xindra/newview/llvovolume.cpp101
-rwxr-xr-xindra/newview/pipeline.cpp52
-rw-r--r--indra/newview/skins/default/xui/en/panel_tools_texture.xml8
16 files changed, 149 insertions, 153 deletions
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings
index 1802e14703..774ade714b 100755
--- a/indra/newview/English.lproj/InfoPlist.strings
+++ b/indra/newview/English.lproj/InfoPlist.strings
@@ -2,6 +2,6 @@
CFBundleName = "Second Life";
-CFBundleShortVersionString = "Second Life version 3.4.1.264760";
-CFBundleGetInfoString = "Second Life version 3.4.1.264760, Copyright 2004-2009 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 3.5.1.288888";
+CFBundleGetInfoString = "Second Life version 3.5.1.288888, Copyright 2004-2009 Linden Research, Inc.";
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index 33ff98b0d4..b3c1a067ee 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -465,7 +465,7 @@ void main()
vec4 final_color = diffcol;
-#if DIFFUSE_ALPHA_MODE != DIFFUSE_ALPHA_MODE_EMISSIVE
+#if (DIFFUSE_ALPHA_MODE != DIFFUSE_ALPHA_MODE_EMISSIVE)
final_color.a = 0;
#endif
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
index 777c8b45bb..c8282e9a51 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
@@ -50,7 +50,7 @@ void fullbright_shiny_lighting()
color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl
index 4fa3b1d939..e7dbd4bbd2 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl
@@ -51,7 +51,7 @@ void fullbright_shiny_lighting()
color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
index 58984a4263..5886fc65be 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
@@ -48,7 +48,7 @@ void fullbright_shiny_lighting_water()
color.rgb = fullbrightShinyAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
index a39b7205d7..cddc7d8df8 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
@@ -49,7 +49,7 @@ void fullbright_shiny_lighting_water()
color.rgb = fullbrightShinyAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
index 52e3b2ad02..9208c148ef 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
@@ -50,7 +50,7 @@ void shiny_lighting()
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
index 474d5ea496..92628faa68 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
@@ -51,7 +51,7 @@ void shiny_lighting()
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
index d2a4c47aac..61841674e2 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
@@ -47,7 +47,7 @@ void shiny_lighting_water()
color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
color.rgb = atmosLighting(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl
index f3bd662364..0b6e835fd0 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl
@@ -48,7 +48,7 @@ void shiny_lighting_water()
color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
color.rgb = atmosLighting(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = applyWaterFog(color);
}
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index 81284e42dd..fb8cffa4ef 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -93,6 +93,7 @@ LLMaterialsResponder::~LLMaterialsResponder()
void LLMaterialsResponder::result(const LLSD& pContent)
{
+ LL_DEBUGS("Materials") << LL_ENDL;
mCallback(true, pContent);
}
@@ -176,35 +177,43 @@ const LLMaterialPtr LLMaterialMgr::get(const LLUUID& region_id, const LLMaterial
boost::signals2::connection LLMaterialMgr::get(const LLUUID& region_id, const LLMaterialID& material_id, LLMaterialMgr::get_callback_t::slot_type cb)
{
+ boost::signals2::connection connection;
+
material_map_t::const_iterator itMaterial = mMaterials.find(material_id);
if (itMaterial != mMaterials.end())
{
+ LL_DEBUGS("Materials") << "region " << region_id << " found materialid " << material_id << LL_ENDL;
get_callback_t signal;
signal.connect(cb);
signal(material_id, itMaterial->second);
- return boost::signals2::connection();
+ connection = boost::signals2::connection();
}
-
- if (!isGetPending(region_id, material_id))
+ else
{
- get_queue_t::iterator itQueue = mGetQueue.find(region_id);
- if (mGetQueue.end() == itQueue)
+ if (!isGetPending(region_id, material_id))
{
- LL_DEBUGS("Materials") << "mGetQueue inserting region "<<region_id<<" material id " << material_id << LL_ENDL;
- std::pair<get_queue_t::iterator, bool> ret = mGetQueue.insert(std::pair<LLUUID, material_queue_t>(region_id, material_queue_t()));
- itQueue = ret.first;
+ get_queue_t::iterator itQueue = mGetQueue.find(region_id);
+ if (mGetQueue.end() == itQueue)
+ {
+ LL_DEBUGS("Materials") << "mGetQueue inserting region "<<region_id << LL_ENDL;
+ std::pair<get_queue_t::iterator, bool> ret = mGetQueue.insert(std::pair<LLUUID, material_queue_t>(region_id, material_queue_t()));
+ itQueue = ret.first;
+ }
+ LL_DEBUGS("Materials") << "adding material id " << material_id << LL_ENDL;
+ itQueue->second.insert(material_id);
+ markGetPending(region_id, material_id);
}
- itQueue->second.insert(material_id);
- markGetPending(region_id, material_id);
- }
- get_callback_map_t::iterator itCallback = mGetCallbacks.find(material_id);
- if (itCallback == mGetCallbacks.end())
- {
- std::pair<get_callback_map_t::iterator, bool> ret = mGetCallbacks.insert(std::pair<LLMaterialID, get_callback_t*>(material_id, new get_callback_t()));
- itCallback = ret.first;
+ get_callback_map_t::iterator itCallback = mGetCallbacks.find(material_id);
+ if (itCallback == mGetCallbacks.end())
+ {
+ std::pair<get_callback_map_t::iterator, bool> ret = mGetCallbacks.insert(std::pair<LLMaterialID, get_callback_t*>(material_id, new get_callback_t()));
+ itCallback = ret.first;
+ }
+ connection = itCallback->second->connect(cb);;
}
- return itCallback->second->connect(cb);;
+
+ return connection;
}
bool LLMaterialMgr::isGetAllPending(const LLUUID& region_id) const
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index d85a5c9a4b..a82232101e 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -300,9 +300,9 @@ void LLPanelFace::sendBump()
U32 bumpiness = mComboBumpiness->getCurrentIndex();
if (bumpiness < BUMPY_TEXTURE)
{
- LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
- //texture_ctrl->setImageAssetID(LLUUID());
- texture_ctrl->clear();
+ LL_DEBUGS("Materials") << "clearing bumptexture control" << LL_ENDL;
+ LLTextureCtrl* bumpytexture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
+ bumpytexture_ctrl->clear();
LLSD dummy_data;
onSelectMaterialTexture(dummy_data);
}
@@ -610,7 +610,7 @@ void LLPanelFace::getState()
// only turn on auto-adjust button if there is a media renderer and the media is loaded
getChildView("button align")->setEnabled(editable);
-
+
LLComboBox* combobox_matmedia = getChild<LLComboBox>("combobox matmedia");
if (combobox_matmedia)
{
@@ -662,7 +662,7 @@ void LLPanelFace::getState()
LLUUID id;
LLUUID normmap_id;
LLUUID specmap_id;
-
+
// Texture
{
struct f1 : public LLSelectedTEGetFunctor<LLUUID>
@@ -799,22 +799,22 @@ void LLPanelFace::getState()
if (combobox_alphamode)
{
if (!mIsAlpha)
- {
+ {
alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
- }
+ }
combobox_alphamode->selectNthItem(alpha_mode);
- }
- else
- {
+ }
+ else
+ {
llwarns << "failed childGetSelectionInterface for 'combobox alphamode'" << llendl;
}
updateAlphaControls(getChild<LLComboBox>("combobox alphamode"),this);
}
- if(texture_ctrl)
- {
+ if(texture_ctrl)
+ {
if (identical_diffuse)
{
texture_ctrl->setTentative( FALSE );
@@ -826,22 +826,22 @@ void LLPanelFace::getState()
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
}
else if (id.isNull())
- {
- // None selected
- texture_ctrl->setTentative( FALSE );
- texture_ctrl->setEnabled( FALSE );
- texture_ctrl->setImageAssetID( LLUUID::null );
+ {
+ // None selected
+ texture_ctrl->setTentative( FALSE );
+ texture_ctrl->setEnabled( FALSE );
+ texture_ctrl->setImageAssetID( LLUUID::null );
getChildView("combobox alphamode")->setEnabled( FALSE );
getChildView("label alphamode")->setEnabled( FALSE );
getChildView("maskcutoff")->setEnabled( FALSE);
getChildView("label maskcutoff")->setEnabled( FALSE );
- }
- else
- {
- // Tentative: multiple selected with different textures
- texture_ctrl->setTentative( TRUE );
- texture_ctrl->setEnabled( editable );
- texture_ctrl->setImageAssetID( id );
+ }
+ else
+ {
+ // Tentative: multiple selected with different textures
+ texture_ctrl->setTentative( TRUE );
+ texture_ctrl->setEnabled( editable );
+ texture_ctrl->setImageAssetID( id );
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
@@ -856,20 +856,20 @@ void LLPanelFace::getState()
shinytexture_ctrl->setTentative( FALSE );
shinytexture_ctrl->setEnabled( editable );
shinytexture_ctrl->setImageAssetID( specmap_id );
- }
+ }
else if (specmap_id.isNull())
{
shinytexture_ctrl->setTentative( FALSE );
shinytexture_ctrl->setEnabled( FALSE );
shinytexture_ctrl->setImageAssetID( LLUUID::null );
- }
+ }
else
{
shinytexture_ctrl->setTentative( TRUE );
shinytexture_ctrl->setEnabled( editable );
shinytexture_ctrl->setImageAssetID( specmap_id );
- }
- }
+ }
+ }
if (bumpytexture_ctrl)
{
@@ -1343,7 +1343,7 @@ void LLPanelFace::getState()
U8 shiny = 0;
// Shiny
- {
+ {
struct f9 : public LLSelectedTEGetFunctor<U8>
{
U8 get(LLViewerObject* object, S32 face)
@@ -1393,7 +1393,7 @@ void LLPanelFace::getState()
U8 bumpy = 0;
// Bumpy
- {
+ {
struct f10 : public LLSelectedTEGetFunctor<U8>
{
U8 get(LLViewerObject* object, S32 face)
@@ -1409,7 +1409,7 @@ void LLPanelFace::getState()
LLCtrlSelectionInterface* combobox_bumpiness = childGetSelectionInterface("combobox bumpiness");
if (combobox_bumpiness)
- {
+ {
combobox_bumpiness->selectNthItem(bumpy);
}
else
@@ -1421,7 +1421,7 @@ void LLPanelFace::getState()
getChildView("label bumpiness")->setEnabled(editable);
}
- {
+ {
LLCtrlSelectionInterface* combobox_texgen =
childGetSelectionInterface("combobox texgen");
if (combobox_texgen)
@@ -1483,7 +1483,7 @@ void LLPanelFace::getState()
F32 repeats_t = object->getTE(face)->mScaleT / object->getScale().mV[t_axis];
return llmax(repeats_s, repeats_t);
}
-
+
} func_diff;
bool identical_diff_repeats = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func_diff, repeats_diff );
@@ -1638,7 +1638,7 @@ void LLPanelFace::getState()
getChildView("button align")->setEnabled(FALSE);
//getChildView("has media")->setEnabled(FALSE);
//getChildView("media info set")->setEnabled(FALSE);
-
+
onCommitMaterialsMedia(NULL,this);
// Set variable values for numeric expressions
@@ -1878,7 +1878,6 @@ void LLPanelFace::updateMaterial()
material_to_set = new LLMaterial(*mMaterial);
}
}
-
LLSelectMgr::getInstance()->selectionSetMaterial( material_to_set );
}
else
@@ -2161,7 +2160,7 @@ void LLPanelFace::updateBumpyControls(LLUICtrl* ctrl, void* userdata, bool mess_
void LLPanelFace::onCommitShiny(LLUICtrl* ctrl, void* userdata)
{
LLPanelFace* self = (LLPanelFace*) userdata;
- self->sendShiny();
+ self->sendShiny();
LLComboBox* combo_shiny = self->getChild<LLComboBox>("combobox shininess");
// Need 'true' here to insure that the 'Use Texture' choice is removed
// when we select something other than a spec texture
@@ -2353,8 +2352,8 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
{
case MATTYPE_DIFFUSE:
{
- LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter );
-}
+ LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter );
+ }
break;
case MATTYPE_NORMAL:
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 599d9c70c5..3fd024082e 100755
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -126,6 +126,7 @@ public:
// LLTextureCtrl interface
void showPicker(BOOL take_focus);
+ bool isPickerShown() { return !mFloaterHandle.isDead(); }
void setLabel(const std::string& label);
void setLabelWidth(S32 label_width) {mLabelWidth =label_width;}
const std::string& getLabel() const { return mLabel; }
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index eed70b6f3e..03c7441d93 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -556,9 +556,9 @@ void LLVOVolume::animateTextures()
tex_mat.setIdentity();
LLVector3 trans ;
- trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f));
- tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
-
+ trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f));
+ tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
+
LLVector3 scale(scale_s, scale_t, 1.f);
LLQuaternion quat;
quat.setQuat(rot, 0, 0, -1.f);
@@ -1861,7 +1861,7 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)
const LLTextureEntry *tep = getTE(te);
if (!tep)
{
- llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ LL_WARNS("MaterialTEs") << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;
}
else if (color != tep->getColor())
{
@@ -1975,6 +1975,7 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow)
void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams)
{
+ LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << LL_ENDL;
for (U8 i = 0; i < getNumTEs(); i++)
{
if (getTE(i) && (getTE(i)->getMaterialID().isNull() || (getTE(i)->getMaterialID() == pMaterialID)))
@@ -1987,6 +1988,9 @@ void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, co
S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
{
S32 res = LLViewerObject::setTEMaterialID(te, pMaterialID);
+ LL_DEBUGS("MaterialTEs") << "te "<< (S32)te << " materialid " << pMaterialID.asString() << " res " << res
+ << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
+ << LL_ENDL;
if (res)
{
LL_DEBUGS("MaterialTEs") << " " << pMaterialID.asString() << LL_ENDL;
@@ -2000,6 +2004,9 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
{
S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams);
+ LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << pMaterialParams->asLLSD() << " res " << res
+ << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
+ << LL_ENDL;
if (res)
{
gPipeline.markTextured(mDrawable);
@@ -4024,7 +4031,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
{
LL_WARNS("RenderMaterials") << "Oh no! No binormals for this alpha blended face!" << LL_ENDL;
}
-
+
if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects)
{
return;
@@ -4076,7 +4083,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
LLViewerTexture* tex = facep->getTexture();
U8 index = facep->getTextureIndex();
-
+
LLMaterial* mat = facep->getTextureEntry()->getMaterialParams().get();
bool batchable = false;
@@ -4139,7 +4146,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
U32 offset = facep->getIndicesStart();
U32 count = facep->getIndicesCount();
LLPointer<LLDrawInfo> draw_info = new LLDrawInfo(start,end,count,offset, tex,
- facep->getVertexBuffer(), fullbright, bump);
+ facep->getVertexBuffer(), fullbright, bump);
draw_info->mGroup = group;
draw_info->mVSize = facep->getVirtualSize();
draw_vec.push_back(draw_info);
@@ -4504,67 +4511,67 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
else
{
- if (type == LLDrawPool::POOL_ALPHA)
- {
- if (te->getColor().mV[3] > 0.f)
+ if (type == LLDrawPool::POOL_ALPHA)
+ {
+ if (te->getColor().mV[3] > 0.f)
+ {
+ if (te->getFullbright())
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA);
+ }
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_ALPHA);
+ }
+ }
+ }
+ else if (te->getShiny())
{
if (te->getFullbright())
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA);
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY);
}
else
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_ALPHA);
+ if (LLPipeline::sRenderDeferred)
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
+ }
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY);
+ }
}
}
- }
- else if (te->getShiny())
- {
- if (te->getFullbright())
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY);
- }
else
{
- if (LLPipeline::sRenderDeferred)
+ if (te->getFullbright())
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT);
}
else
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY);
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
}
}
- }
- else
- {
- if (te->getFullbright())
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT);
- }
- else
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
- }
- }
-
- if (LLPipeline::sRenderDeferred)
- {
- if (type != LLDrawPool::POOL_ALPHA && !te->getFullbright())
+
+ if (LLPipeline::sRenderDeferred)
{
- if (te->getBumpmap())
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP);
- }
- else
+ if (type != LLDrawPool::POOL_ALPHA && !te->getFullbright())
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE);
+ if (te->getBumpmap())
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP);
+ }
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE);
+ }
}
}
}
}
- }
continue;
}
@@ -4775,7 +4782,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
alpha_mask = alpha_mask | LLVertexBuffer::MAP_TEXTURE_INDEX | LLVertexBuffer::MAP_BINORMAL | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2;
fullbright_mask = fullbright_mask | LLVertexBuffer::MAP_TEXTURE_INDEX;
}
-
+
genDrawInfo(group, simple_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, simple_faces, FALSE, batch_textures, FALSE);
genDrawInfo(group, fullbright_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, fullbright_faces, FALSE, batch_textures);
genDrawInfo(group, alpha_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, alpha_faces, TRUE, batch_textures);
@@ -5221,7 +5228,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
index_offset += facep->getGeomCount();
indices_index += facep->getIndicesCount();
-
+
//append face to appropriate render batch
BOOL force_simple = facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index af8d8d138a..bc2d28e4b1 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -71,7 +71,6 @@
#include "llhudtext.h"
#include "lllightconstants.h"
#include "llmeshrepository.h"
-#include "llpipelinelistener.h"
#include "llresmgr.h"
#include "llselectmgr.h"
#include "llsky.h"
@@ -381,8 +380,6 @@ S32 LLPipeline::sVisibleLightCount = 0;
F32 LLPipeline::sMinRenderSize = 0.f;
BOOL LLPipeline::sRenderingHUDs;
-// EventHost API LLPipeline listener.
-static LLPipelineListener sPipelineListener;
static LLCullResult* sCull = NULL;
@@ -498,30 +495,20 @@ void LLPipeline::init()
LLViewerStats::getInstance()->mTrianglesDrawnStat.reset();
resetFrameStats();
- if (gSavedSettings.getBOOL("DisableAllRenderFeatures"))
- {
- clearAllRenderDebugFeatures();
- }
- else
+ for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
{
- setAllRenderDebugFeatures(); // By default, all debugging features on
+ mRenderTypeEnabled[i] = TRUE; //all rendering types start enabled
}
- clearAllRenderDebugDisplays(); // All debug displays off
- if (gSavedSettings.getBOOL("DisableAllRenderTypes"))
- {
- clearAllRenderTypes();
- }
- else
- {
- setAllRenderTypes(); // By default, all rendering types start enabled
+ mRenderDebugFeatureMask = 0xffffffff; // All debugging features on
+ mRenderDebugMask = 0; // All debug starts off
+
// Don't turn on ground when this is set
// Mac Books with intel 950s need this
if(!gSavedSettings.getBOOL("RenderGround"))
{
toggleRenderType(RENDER_TYPE_GROUND);
}
- }
// make sure RenderPerformanceTest persists (hackity hack hack)
// disables non-object rendering (UI, sky, water, etc)
@@ -924,7 +911,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
if (!mDeferredScreen.allocate(resX, resY, GL_SRGB8_ALPHA8, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
if (!mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
if (!addDeferredAttachments(mDeferredScreen)) return false;
-
+
GLuint screenFormat = GL_RGBA16;
if (gGLManager.mIsATI)
{
@@ -1228,7 +1215,7 @@ void LLPipeline::createGLBuffers()
for (U32 i = 0; i < 3; i++)
{
- mGlow[i].allocate(512,glow_res,GL_RGBA,FALSE,FALSE);
+ mGlow[i].allocate(512,glow_res, GL_RGBA,FALSE,FALSE);
}
allocateScreenBuffer(resX,resY);
@@ -1350,7 +1337,7 @@ void LLPipeline::createLUTBuffers()
// Note: This is the full equation that applies the full normalization curve, not an approximation.
// This is fine, given we only need to create our LUT once per buffer initialization.
spec *= (((n + 2) * (n + 4)) / (8 * F_PI * (powf(2, -n/2) + n)));
-
+
// Since we use R16F, we no longer have a dynamic range issue we need to work around here.
// Though some older drivers may not like this, newer drivers shouldn't have this problem.
ls[y*lightResX+x] = spec;
@@ -1677,7 +1664,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
{
alpha = alpha || (imagep->getComponents() == 4 && imagep->getType() != LLViewerTexture::MEDIA_TEXTURE) || (imagep->getComponents() == 2);
}
-
+
if (alpha && te->getMaterialParams())
{
switch (te->getMaterialParams()->getDiffuseAlphaMode())
@@ -1690,14 +1677,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
alpha = false;
break;
default: //alpha mode set to "mask", go to alpha pool if fullbright
- if (te->getFullbright())
- {
- alpha = true;
- }
- else
- {
alpha = false; // Material's alpha mode is set to none, mask, or emissive. Toss it into the opaque material draw pool.
- }
break;
}
}
@@ -5636,7 +5616,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
llassert( poolp == mBumpPool );
mBumpPool = NULL;
break;
-
+
case LLDrawPool::POOL_MATERIALS:
llassert(poolp == mMaterialsPool);
mMaterialsPool = NULL;
@@ -7023,7 +7003,7 @@ void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_text
assertInitialized();
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
- mAlphaPool->pushBatches(type, mask, texture, batch_texture);
+ mSimplePool->pushBatches(type, mask, texture, batch_texture);
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
}
@@ -7140,10 +7120,10 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.loadIdentity();
LLGLDisable test(GL_ALPHA_TEST);
-
+
gGL.setColorMask(true, true);
glClearColor(0,0,0,0);
-
+
if (sRenderDeferred)
{
mScreen.bindTarget();
@@ -7522,7 +7502,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
mScreen.bindTexture(0, channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
}
-
+
if (!LLViewerCamera::getInstance()->cameraUnderWater())
{
shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2);
@@ -7570,7 +7550,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{
mScreen.bindTexture(0, channel);
}
-
+
if (!LLViewerCamera::getInstance()->cameraUnderWater())
{
shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2);
@@ -8456,7 +8436,7 @@ void LLPipeline::renderDeferredLighting()
fullscreen_lights.pop_front();
col[count] = light_colors.front();
light_colors.pop_front();
-
+
col[count].mV[0] = powf(col[count].mV[0], 2.2f);
col[count].mV[1] = powf(col[count].mV[1], 2.2f);
col[count].mV[2] = powf(col[count].mV[2], 2.2f);
diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
index 042134a8c6..678b4f43cd 100644
--- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml
+++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
@@ -644,8 +644,8 @@
layout="topleft"
label_width="205"
left="10"
- max_val="9999"
- min_val="-9999"
+ max_val="180"
+ min_val="-180"
name="bumpyRot"
width="265" />
@@ -707,8 +707,8 @@
layout="topleft"
label_width="205"
left="10"
- max_val="9999"
- min_val="-9999"
+ max_val="180"
+ min_val="-180"
name="shinyRot"
width="265" />