summaryrefslogtreecommitdiff
path: root/indra/newview/llvoclouds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoclouds.cpp')
-rw-r--r--indra/newview/llvoclouds.cpp57
1 files changed, 29 insertions, 28 deletions
diff --git a/indra/newview/llvoclouds.cpp b/indra/newview/llvoclouds.cpp
index 9095ee43c8..78aa6e6ab8 100644
--- a/indra/newview/llvoclouds.cpp
+++ b/indra/newview/llvoclouds.cpp
@@ -2,31 +2,25 @@
* @file llvoclouds.cpp
* @brief Implementation of LLVOClouds class which is a derivation fo LLViewerObject
*
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * Copyright (C) 2010, Linden Research, Inc.
*
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
*
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -44,7 +38,7 @@
#include "llprimitive.h"
#include "llsky.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llvosky.h"
@@ -61,8 +55,8 @@ LLVOClouds::LLVOClouds(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re
mCloudGroupp = NULL;
mbCanSelect = FALSE;
setNumTEs(1);
- LLViewerImage* image = gImageList.getImage(gCloudTextureID);
- image->setBoostLevel(LLViewerImage::BOOST_CLOUDS);
+ LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(gCloudTextureID);
+ image->setBoostLevel(LLViewerTexture::BOOST_CLOUDS);
setTEImage(0, image);
}
@@ -77,9 +71,11 @@ BOOL LLVOClouds::isActive() const
return TRUE;
}
-
BOOL LLVOClouds::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
+ static LLFastTimer::DeclareTimer ftm("Idle Clouds");
+ LLFastTimer t(ftm);
+
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS)))
{
return TRUE;
@@ -101,7 +97,7 @@ void LLVOClouds::setPixelAreaAndAngle(LLAgent &agent)
mPixelArea = 1500*100;
}
-void LLVOClouds::updateTextures(LLAgent &agent)
+void LLVOClouds::updateTextures()
{
getTEImage(0)->addTextureStats(mPixelArea);
}
@@ -115,15 +111,20 @@ LLDrawable* LLVOClouds::createDrawable(LLPipeline *pipeline)
return mDrawable;
}
+static LLFastTimer::DeclareTimer FTM_UPDATE_CLOUDS("Update Clouds");
+
BOOL LLVOClouds::updateGeometry(LLDrawable *drawable)
{
- LLFastTimer ftm(LLFastTimer::FTM_UPDATE_CLOUDS);
+ LLFastTimer ftm(FTM_UPDATE_CLOUDS);
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS)))
{
return TRUE;
}
- dirtySpatialGroup();
+ if (drawable->isVisible())
+ {
+ dirtySpatialGroup(TRUE);
+ }
LLFace *facep;