summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llinventorybridge.cpp22
-rw-r--r--indra/newview/llinventorybridge.h3
-rw-r--r--indra/newview/pipeline.cpp39
3 files changed, 38 insertions, 26 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index a44ce07d76..ac6aa307f2 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1313,6 +1313,16 @@ BOOL LLItemBridge::isItemPermissive() const
return FALSE;
}
+bool LLItemBridge::isAddAction(std::string action) const
+{
+ return ("wear" == action || "attach" == action || "activate" == action);
+}
+
+bool LLItemBridge::isRemoveAction(std::string action) const
+{
+ return ("take_off" == action || "detach" == action || "deactivate" == action);
+}
+
// +=================================================+
// | LLFolderBridge |
// +=================================================+
@@ -3673,7 +3683,7 @@ std::string LLGestureBridge::getLabelSuffix() const
// virtual
void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
{
- if ("activate" == action)
+ if (isAddAction(action))
{
LLGestureManager::instance().activateGesture(mUUID);
@@ -3685,7 +3695,7 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode
gInventory.updateItem(item);
gInventory.notifyObservers();
}
- else if ("deactivate" == action)
+ else if (isRemoveAction(action))
{
LLGestureManager::instance().deactivateGesture(mUUID);
@@ -3870,7 +3880,7 @@ LLInventoryObject* LLObjectBridge::getObject() const
// virtual
void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
{
- if ("attach" == action)
+ if (isAddAction(action))
{
LLUUID object_id = mUUID;
LLViewerInventoryItem* item;
@@ -3893,7 +3903,7 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
}
gFocusMgr.setKeyboardFocus(NULL);
}
- else if ("detach" == action)
+ else if (isRemoveAction(action))
{
LLInventoryItem* item = gInventory.getItem(mUUID);
if(item)
@@ -4386,7 +4396,7 @@ LLUIImagePtr LLWearableBridge::getIcon() const
// virtual
void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
{
- if ("wear" == action)
+ if (isAddAction(action))
{
wearOnAvatar();
}
@@ -4399,7 +4409,7 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
editOnAvatar();
return;
}
- else if ("take_off" == action)
+ else if (isRemoveAction(action))
{
if(gAgentWearables.isWearingItem(mUUID))
{
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 6a284e0550..ef340af0cb 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -259,6 +259,9 @@ public:
virtual void clearDisplayName() { mDisplayName.clear(); }
LLViewerInventoryItem* getItem() const;
+
+ bool isAddAction(std::string action) const;
+ bool isRemoveAction(std::string action) const;
protected:
virtual BOOL isItemPermissive() const;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 21b297c4ee..282eddf380 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7189,6 +7189,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
glClearColor(0,0,0,0);
mWaterRef.bindTarget();
+ gGL.setColorMask(true, true);
+ mWaterRef.clear();
+ gGL.setColorMask(true, false);
+
mWaterRef.getViewport(gGLViewport);
stop_glerror();
@@ -7221,6 +7225,21 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
U32 ref_mask = 0;
if (LLDrawPoolWater::sNeedsDistortionUpdate)
{
+ //initial sky pass (no user clip plane)
+ { //mask out everything but the sky
+ U32 tmp = mRenderTypeMask;
+ mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) |
+ (1 << LLPipeline::RENDER_TYPE_WL_SKY));
+ static LLCullResult result;
+ updateCull(camera, result);
+ stateSort(camera, result);
+ mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) |
+ (1 << LLPipeline::RENDER_TYPE_CLOUDS) |
+ (1 << LLPipeline::RENDER_TYPE_WL_SKY));
+ renderGeom(camera, TRUE);
+ mRenderTypeMask = tmp;
+ }
+
U32 mask = mRenderTypeMask;
mRenderTypeMask &= ~((1<<LLPipeline::RENDER_TYPE_WATER) |
(1<<LLPipeline::RENDER_TYPE_GROUND) |
@@ -7248,10 +7267,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLGLDisable cull(GL_CULL_FACE);
updateCull(camera, ref_result, 1);
stateSort(camera, ref_result);
- gGL.setColorMask(true, true);
- mWaterRef.clear();
- gGL.setColorMask(true, false);
-
}
else
{
@@ -7264,22 +7279,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
mRenderTypeMask = mask;
}
- //initial sky pass (no user clip plane)
- { //mask out everything but the sky
- U32 tmp = mRenderTypeMask;
- mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) |
- (1 << LLPipeline::RENDER_TYPE_WL_SKY));
- static LLCullResult result;
- updateCull(camera, result);
- stateSort(camera, result);
- mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) |
- (1 << LLPipeline::RENDER_TYPE_CLOUDS) |
- (1 << LLPipeline::RENDER_TYPE_WL_SKY));
- renderGeom(camera, TRUE);
- mRenderTypeMask = tmp;
- }
-
-
if (LLDrawPoolWater::sNeedsDistortionUpdate)
{
mRenderTypeMask = ref_mask;