Added LLGLTexture. Virtually completely virtual for now. Also added LLTextureManagerBridge, although not yet utilized.

This commit is contained in:
Shyotl
2012-12-22 23:58:42 -06:00
parent cdaa4b4e99
commit 1083d7e0ef
40 changed files with 417 additions and 182 deletions

View File

@@ -39,7 +39,7 @@ set(llappearance_SOURCE_FILES
#lltexglobalcolor.cpp #lltexglobalcolor.cpp
#lltexlayer.cpp #lltexlayer.cpp
#lltexlayerparams.cpp #lltexlayerparams.cpp
#lltexturemanagerbridge.cpp lltexturemanagerbridge.cpp
#llwearable.cpp #llwearable.cpp
#llwearabledata.cpp #llwearabledata.cpp
llwearabletype.cpp llwearabletype.cpp
@@ -62,7 +62,7 @@ set(llappearance_HEADER_FILES
#lltexglobalcolor.h #lltexglobalcolor.h
#lltexlayer.h #lltexlayer.h
#lltexlayerparams.h #lltexlayerparams.h
#lltexturemanagerbridge.h lltexturemanagerbridge.h
#llwearable.h #llwearable.h
#llwearabledata.h #llwearabledata.h
llwearabletype.h llwearabletype.h

View File

@@ -0,0 +1,32 @@
/**
* @file lltexturemanagerbridge.cpp
* @brief Defined a null texture manager bridge. Applications must provide their own bridge implementaton.
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* 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.
*
* 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.
*
* 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$
*/
#include "lltexturemanagerbridge.h"
// Define a null texture manager bridge. Applications must provide their own bridge implementaton.
LLTextureManagerBridge* gTextureManagerBridgep = NULL;

View File

@@ -0,0 +1,47 @@
/**
* @file lltexturemanagerbridge.h
* @brief Bridge to an application-specific texture manager.
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* 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.
*
* 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.
*
* 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$
*/
#ifndef LL_TEXTUREMANAGERBRIDGE_H
#define LL_TEXTUREMANAGERBRIDGE_H
#include "linden_common.h"
#include "llavatarappearancedefines.h"
#include "llpointer.h"
class LLGLTexture;
// Abstract bridge interface
class LLTextureManagerBridge
{
public:
virtual LLPointer<LLGLTexture> getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE) = 0;
virtual LLPointer<LLGLTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) = 0;
virtual LLGLTexture* getFetchedTexture(const LLUUID &image_id) = 0;
};
extern LLTextureManagerBridge* gTextureManagerBridgep;
#endif // LL_TEXTUREMANAGERBRIDGE_H

View File

@@ -52,6 +52,7 @@ set(llrender_HEADER_FILES
llglheaders.h llglheaders.h
llglslshader.h llglslshader.h
llglstates.h llglstates.h
llgltexture.h
llgltypes.h llgltypes.h
llimagegl.h llimagegl.h
llpostprocess.h llpostprocess.h

View File

@@ -0,0 +1,182 @@
/**
* @file llglviewertexture.h
* @brief Object for managing opengl textures
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* 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.
*
* 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.
*
* 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$
*/
#ifndef LL_GL_TEXTURE_H
#define LL_GL_TEXTURE_H
#include "lltexture.h"
#include "llgl.h"
class LLImageRaw;
//
//this the parent for the class LLViewerTexture
//through the following virtual functions, the class LLViewerTexture can be reached from /llrender.
//
class LLGLTexture : public LLTexture
{
public:
enum
{
MAX_IMAGE_SIZE_DEFAULT = 1024,
INVALID_DISCARD_LEVEL = 0x7fff
};
enum EBoostLevel
{
BOOST_NONE = 0,
BOOST_AVATAR_BAKED ,
BOOST_AVATAR ,
BOOST_CLOUDS ,
BOOST_SCULPTED ,
BOOST_HIGH = 10,
BOOST_BUMP ,
BOOST_TERRAIN , // has to be high priority for minimap / low detail
BOOST_SELECTED ,
BOOST_AVATAR_BAKED_SELF ,
BOOST_AVATAR_SELF , // needed for baking avatar
BOOST_SUPER_HIGH , //textures higher than this need to be downloaded at the required resolution without delay.
BOOST_HUD ,
BOOST_ICON ,
BOOST_UI ,
BOOST_PREVIEW ,
BOOST_MAP ,
BOOST_MAP_VISIBLE ,
BOOST_MAX_LEVEL,
//other texture Categories
LOCAL = BOOST_MAX_LEVEL,
AVATAR_SCRATCH_TEX,
DYNAMIC_TEX,
MEDIA,
//ATLAS,
OTHER,
MAX_GL_IMAGE_CATEGORY
};
//static S32 getTotalNumOfCategories() ;
//static S32 getIndexFromCategory(S32 category) ;
//static S32 getCategoryFromIndex(S32 index) ;
protected:
virtual ~LLGLTexture() {};
LOG_CLASS(LLGLTexture);
public:
//LLGLTexture(BOOL usemipmaps = TRUE);
//LLGLTexture(const LLImageRaw* raw, BOOL usemipmaps) ;
//LLGLTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) ;
virtual void dump() = 0; // debug info to llinfos
virtual const LLUUID& getID() const = 0;
virtual void setBoostLevel(S32 level) = 0;
virtual S32 getBoostLevel() = 0;
virtual S32 getFullWidth() const = 0;
virtual S32 getFullHeight() const = 0;
virtual void generateGLTexture() = 0;
virtual void destroyGLTexture() = 0;
//---------------------------------------------------------------------------------------------
//functions to access LLImageGL
//---------------------------------------------------------------------------------------------
//*virtual*/S32 getWidth(S32 discard_level = -1) const;
//*virtual*/S32 getHeight(S32 discard_level = -1) const;
virtual BOOL hasGLTexture() const = 0;
virtual LLGLuint getTexName() const = 0;
virtual BOOL createGLTexture() = 0;
virtual BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, BOOL to_create = TRUE, S32 category = LLGLTexture::OTHER) = 0;
virtual void setFilteringOption(LLTexUnit::eTextureFilterOptions option) = 0;
virtual void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE) = 0;
virtual void setAddressMode(LLTexUnit::eTextureAddressMode mode) = 0;
virtual BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, bool fast_update = false) = 0;
virtual BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, bool fast_update = false) = 0;
virtual void setGLTextureCreated (bool initialized) = 0;
virtual void setCategory(S32 category) = 0;
virtual LLTexUnit::eTextureAddressMode getAddressMode(void) const = 0;
virtual S32 getMaxDiscardLevel() const = 0;
virtual S32 getDiscardLevel() const = 0;
virtual S8 getComponents() const = 0;
virtual BOOL getBoundRecently() const = 0;
virtual S32 getTextureMemory() const = 0;
virtual LLGLenum getPrimaryFormat() const = 0;
virtual BOOL getIsAlphaMask() const = 0;
virtual LLTexUnit::eTextureType getTarget(void) const = 0;
virtual BOOL getMask(const LLVector2 &tc) = 0;
virtual F32 getTimePassedSinceLastBound() = 0;
virtual BOOL getMissed() const = 0;
virtual BOOL isJustBound()const = 0;
virtual void forceUpdateBindStats(void) const = 0;
//virtual U32 getTexelsInAtlas() const = 0;
//virtual U32 getTexelsInGLTexture() const = 0;
//virtual BOOL isGLTextureCreated() const = 0;
//virtual S32 getDiscardLevelInAtlas() const = 0;
//---------------------------------------------------------------------------------------------
//end of functions to access LLImageGL
//---------------------------------------------------------------------------------------------
//-----------------
//*virtual*/ void setActive() = 0;
virtual void forceActive() = 0;
virtual void setNoDelete() = 0;
virtual void dontDiscard() = 0;
virtual BOOL getDontDiscard() const = 0;
//-----------------
private:
virtual void cleanup() = 0;
virtual void init(bool firstinit) = 0;
protected:
virtual void setTexelsPerImage() = 0;
//note: do not make this function public.
//*virtual*/ LLImageGL* getGLTexture() const = 0;
protected:
typedef enum
{
DELETED = 0, //removed from memory
DELETION_CANDIDATE, //ready to be removed from memory
INACTIVE, //not be used for the last certain period (i.e., 30 seconds).
ACTIVE, //just being used, can become inactive if not being used for a certain time (10 seconds).
NO_DELETE = 99 //stay in memory, can not be removed.
} LLGLTextureState;
};
#endif // LL_GL_TEXTURE_H

View File

@@ -142,7 +142,7 @@ void HGFloaterTextEditor::imageCallback(BOOL success,
} }
else else
{ {
src_vi->setBoostLevel(LLViewerTexture::BOOST_UI); src_vi->setBoostLevel(LLGLTexture::BOOST_UI);
} }
} }

View File

@@ -159,7 +159,7 @@ void LLStandardBumpmap::addstandard()
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mLabel = label; gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mLabel = label;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage = gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage =
LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id)); LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id));
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLViewerTexture::BOOST_BUMP) ; gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLGLTexture::BOOST_BUMP) ;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL ); gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL );
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->forceToSaveRawImage(0) ; gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->forceToSaveRawImage(0) ;
LLStandardBumpmap::sStandardBumpmapCount++; LLStandardBumpmap::sStandardBumpmapCount++;
@@ -1075,7 +1075,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
src_image->getHeight() != bump->getHeight())// || src_image->getHeight() != bump->getHeight())// ||
//(LLPipeline::sRenderDeferred && bump->getComponents() != 4)) //(LLPipeline::sRenderDeferred && bump->getComponents() != 4))
{ {
src_image->setBoostLevel(LLViewerTexture::BOOST_BUMP) ; src_image->setBoostLevel(LLGLTexture::BOOST_BUMP) ;
src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL ); src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL );
src_image->forceToSaveRawImage(0) ; src_image->forceToSaveRawImage(0) ;
} }

View File

@@ -75,7 +75,7 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
sDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainScale"); sDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainScale");
sDetailMode = gSavedSettings.getS32("RenderTerrainDetail"); sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
mAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga", mAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga",
TRUE, LLViewerTexture::BOOST_UI, TRUE, LLGLTexture::BOOST_UI,
LLViewerTexture::FETCHED_TEXTURE, LLViewerTexture::FETCHED_TEXTURE,
format, int_format, format, int_format,
LLUUID("e97cf410-8e61-7005-ec06-629eba4cd1fb")); LLUUID("e97cf410-8e61-7005-ec06-629eba4cd1fb"));
@@ -84,7 +84,7 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
mAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP); mAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
m2DAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c", m2DAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c",
TRUE, LLViewerTexture::BOOST_UI, TRUE, LLGLTexture::BOOST_UI,
LLViewerTexture::FETCHED_TEXTURE, LLViewerTexture::FETCHED_TEXTURE,
format, int_format, format, int_format,
LLUUID("38b86f85-2575-52a9-a531-23108d8da837")); LLUUID("38b86f85-2575-52a9-a531-23108d8da837"));
@@ -92,7 +92,7 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
//gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get()); //gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
m2DAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP); m2DAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
mTexturep->setBoostLevel(LLViewerTexture::BOOST_TERRAIN); mTexturep->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
//gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); //gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
} }
@@ -177,7 +177,7 @@ void LLDrawPoolTerrain::render(S32 pass)
LLVLComposition *compp = regionp->getComposition(); LLVLComposition *compp = regionp->getComposition();
for (S32 i = 0; i < 4; i++) for (S32 i = 0; i < 4; i++)
{ {
compp->mDetailTextures[i]->setBoostLevel(LLViewerTexture::BOOST_TERRAIN); compp->mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area
} }

View File

@@ -74,11 +74,11 @@ LLVector3 LLDrawPoolWater::sLightDir;
LLDrawPoolWater::LLDrawPoolWater() : LLDrawPoolWater::LLDrawPoolWater() :
LLFacePool(POOL_WATER) LLFacePool(POOL_WATER)
{ {
mHBTex[0] = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, LLViewerTexture::BOOST_UI); mHBTex[0] = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, LLGLTexture::BOOST_UI);
gGL.getTexUnit(0)->bind(mHBTex[0]) ; gGL.getTexUnit(0)->bind(mHBTex[0]) ;
mHBTex[0]->setAddressMode(LLTexUnit::TAM_CLAMP); mHBTex[0]->setAddressMode(LLTexUnit::TAM_CLAMP);
mHBTex[1] = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, LLViewerTexture::BOOST_UI); mHBTex[1] = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, LLGLTexture::BOOST_UI);
gGL.getTexUnit(0)->bind(mHBTex[1]); gGL.getTexUnit(0)->bind(mHBTex[1]);
mHBTex[1]->setAddressMode(LLTexUnit::TAM_CLAMP); mHBTex[1]->setAddressMode(LLTexUnit::TAM_CLAMP);

View File

@@ -563,8 +563,8 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
/* removed in lieu of raycast uv detection /* removed in lieu of raycast uv detection
void LLFace::renderSelectedUV() void LLFace::renderSelectedUV()
{ {
LLViewerTexture* red_blue_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test1.j2c", TRUE, LLViewerTexture::BOOST_UI); LLViewerTexture* red_blue_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test1.j2c", TRUE, LLGLTexture::BOOST_UI);
LLViewerTexture* green_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test2.tga", TRUE, LLViewerTexture::BOOST_UI); LLViewerTexture* green_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test2.tga", TRUE, LLGLTexture::BOOST_UI);
LLGLSUVSelect object_select; LLGLSUVSelect object_select;

View File

@@ -2487,7 +2487,7 @@ void LLModelLoader::loadTextures()
if (!material.mDiffuseMapFilename.empty()) if (!material.mDiffuseMapFilename.empty())
{ {
material.mDiffuseMap = material.mDiffuseMap =
LLViewerTextureManager::getFetchedTextureFromUrl("file://" + material.mDiffuseMapFilename, TRUE, LLViewerTexture::BOOST_PREVIEW); LLViewerTextureManager::getFetchedTextureFromUrl("file://" + material.mDiffuseMapFilename, TRUE, LLGLTexture::BOOST_PREVIEW);
material.mDiffuseMap->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, mPreview, NULL, FALSE); material.mDiffuseMap->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, mPreview, NULL, FALSE);
material.mDiffuseMap->forceToSaveRawImage(0, F32_MAX); material.mDiffuseMap->forceToSaveRawImage(0, F32_MAX);
mNumOfFetchingTextures++; mNumOfFetchingTextures++;

View File

@@ -938,7 +938,7 @@ void LLFloaterReporter::takeScreenshot()
// store in the image list so it doesn't try to fetch from the server // store in the image list so it doesn't try to fetch from the server
LLPointer<LLViewerFetchedTexture> image_in_list = LLPointer<LLViewerFetchedTexture> image_in_list =
LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::FETCHED_TEXTURE); LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::FETCHED_TEXTURE);
image_in_list->createGLTexture(0, raw, 0, TRUE, LLViewerTexture::OTHER); image_in_list->createGLTexture(0, raw, 0, TRUE, LLViewerTexture::OTHER);
// the texture picker then uses that texture // the texture picker then uses that texture

View File

@@ -129,7 +129,7 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
if (objectp) if (objectp)
{ {
objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI)); objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLGLTexture::BOOST_UI));
floater_label = llformat("%s(%.2f, %.2f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], objectp->getPositionRegion().mV[VY]); floater_label = llformat("%s(%.2f, %.2f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], objectp->getPositionRegion().mV[VY]);
} }
else else

View File

@@ -275,7 +275,7 @@ void LLFloaterVFS::onClickAdd_continued(void* user_data, AIFilePicker* filepicke
return; return;
} }
LLPointer<LLViewerFetchedTexture> imagep = new LLViewerFetchedTexture(asset_id); LLPointer<LLViewerFetchedTexture> imagep = new LLViewerFetchedTexture(asset_id);
imagep->createGLTexture(0, image_raw, 0, TRUE, LLViewerTexture::BOOST_NONE); imagep->createGLTexture(0, image_raw, 0, TRUE, LLGLTexture::BOOST_NONE);
gTextureList.addImage(imagep); gTextureList.addImage(imagep);
} }
else else

View File

@@ -305,7 +305,7 @@ void LLInventoryBackup::download(LLInventoryItem* item, LLFloater* floater, load
switch(item->getType()) switch(item->getType())
{ {
case LLAssetType::AT_TEXTURE: case LLAssetType::AT_TEXTURE:
imagep = LLViewerTextureManager::getFetchedTexture(item->getAssetUUID(), MIPMAP_TRUE, LLViewerTexture::BOOST_UI); imagep = LLViewerTextureManager::getFetchedTexture(item->getAssetUUID(), MIPMAP_TRUE, LLGLTexture::BOOST_UI);
imagep->setLoadedCallback( onImage, 0, TRUE, FALSE, userdata, NULL ); // was setLoadedCallbackNoAuth imagep->setLoadedCallback( onImage, 0, TRUE, FALSE, userdata, NULL ); // was setLoadedCallbackNoAuth
break; break;
case LLAssetType::AT_NOTECARD: case LLAssetType::AT_NOTECARD:
@@ -363,7 +363,7 @@ void LLInventoryBackup::imageCallback(BOOL success,
} }
else else
{ {
src_vi->setBoostLevel(LLViewerTexture::BOOST_UI); src_vi->setBoostLevel(LLGLTexture::BOOST_UI);
} }
} }
@@ -738,7 +738,7 @@ void LLFloaterInventoryBackup::imageCallback(BOOL success,
} }
else else
{ {
src_vi->setBoostLevel(LLViewerTexture::BOOST_UI); src_vi->setBoostLevel(LLGLTexture::BOOST_UI);
} }
} }

View File

@@ -81,7 +81,7 @@ LLPreviewTexture::LLPreviewTexture(const std::string& name,
mLastWidth(0), mLastWidth(0),
mAspectRatio(0.f), mAspectRatio(0.f),
mImage(NULL), mImage(NULL),
mImageOldBoostLevel(LLViewerTexture::BOOST_NONE) mImageOldBoostLevel(LLGLTexture::BOOST_NONE)
{ {
const LLInventoryItem *item = getItem(); const LLInventoryItem *item = getItem();
if(item) if(item)
@@ -700,9 +700,9 @@ void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata)
void LLPreviewTexture::loadAsset() void LLPreviewTexture::loadAsset()
{ {
mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
mImageOldBoostLevel = mImage->getBoostLevel(); mImageOldBoostLevel = mImage->getBoostLevel();
mImage->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); mImage->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
mImage->forceToSaveRawImage(0) ; mImage->forceToSaveRawImage(0) ;
mAssetStatus = PREVIEW_ASSET_LOADING; mAssetStatus = PREVIEW_ASSET_LOADING;
mUpdateDimensions = TRUE; mUpdateDimensions = TRUE;

View File

@@ -1593,7 +1593,7 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
// Texture picker defaults aren't inventory items // Texture picker defaults aren't inventory items
// * Don't need to worry about permissions for them // * Don't need to worry about permissions for them
// * Can just apply the texture and be done with it. // * Can just apply the texture and be done with it.
//objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); //objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
objectp->setTETexture(te, mImageID); //Singu note: setTETexture will allow the real id to be passed to LLPrimitive::setTETexture, objectp->setTETexture(te, mImageID); //Singu note: setTETexture will allow the real id to be passed to LLPrimitive::setTETexture,
// even if it's null. setTEImage would actually pass down IMG_DEFAULT under such a case, // even if it's null. setTEImage would actually pass down IMG_DEFAULT under such a case,
// which we don't want. // which we don't want.
@@ -1759,7 +1759,7 @@ BOOL LLSelectMgr::selectionRevertTextures()
} }
else else
{ {
//object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); //object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
object->setTETexture(te, id); //Singu note: setTETexture will allow the real id to be passed to LLPrimitive::setTETexture, object->setTETexture(te, id); //Singu note: setTETexture will allow the real id to be passed to LLPrimitive::setTETexture,
// even if it's null. setTEImage would actually pass down IMG_DEFAULT under such a case, // even if it's null. setTEImage would actually pass down IMG_DEFAULT under such a case,
// which we don't want. // which we don't want.
@@ -5197,7 +5197,7 @@ void LLSelectMgr::updateSilhouettes()
if (!mSilhouetteImagep) if (!mSilhouetteImagep)
{ {
mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", TRUE, LLViewerTexture::BOOST_UI); mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", TRUE, LLGLTexture::BOOST_UI);
} }
mHighlightedObjects->cleanupNodes(); mHighlightedObjects->cleanupNodes();

View File

@@ -3485,9 +3485,9 @@ void renderTexturePriority(LLDrawable* drawable)
drawBox(center, size); drawBox(center, size);
/*S32 boost = imagep->getBoostLevel(); /*S32 boost = imagep->getBoostLevel();
if (boost>LLViewerTexture::BOOST_NONE) if (boost>LLGLTexture::BOOST_NONE)
{ {
F32 t = (F32) boost / (F32) (LLViewerTexture::BOOST_MAX_LEVEL-1); F32 t = (F32) boost / (F32) (LLGLTexture::BOOST_MAX_LEVEL-1);
LLVector4 col = lerp(boost_cold, boost_hot, t); LLVector4 col = lerp(boost_cold, boost_hot, t);
LLGLEnable blend_on(GL_BLEND); LLGLEnable blend_on(GL_BLEND);
gGL.blendFunc(GL_SRC_ALPHA, GL_ONE); gGL.blendFunc(GL_SRC_ALPHA, GL_ONE);

View File

@@ -612,11 +612,11 @@ void LLFloaterTexturePicker::draw()
mTexturep = NULL; mTexturep = NULL;
if(mImageAssetID.notNull()) if(mImageAssetID.notNull())
{ {
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES, LLViewerTexture::BOOST_PREVIEW); mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES, LLGLTexture::BOOST_PREVIEW);
} }
else if (!mFallbackImageName.empty()) else if (!mFallbackImageName.empty())
{ {
mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, MIPMAP_YES, LLViewerTexture::BOOST_PREVIEW); mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, MIPMAP_YES, LLGLTexture::BOOST_PREVIEW);
} }
if (mTentativeLabel) if (mTentativeLabel)
@@ -1503,13 +1503,13 @@ void LLTextureCtrl::draw()
} }
else if (!mImageAssetID.isNull()) else if (!mImageAssetID.isNull())
{ {
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES,LLViewerTexture::BOOST_PREVIEW, LLViewerTexture::LOD_TEXTURE); mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES,LLGLTexture::BOOST_PREVIEW, LLViewerTexture::LOD_TEXTURE);
mTexturep->forceToSaveRawImage(0) ; mTexturep->forceToSaveRawImage(0) ;
} }
else if (!mFallbackImageName.empty()) else if (!mFallbackImageName.empty())
{ {
// Show fallback image. // Show fallback image.
mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, MIPMAP_YES,LLViewerTexture::BOOST_PREVIEW, LLViewerTexture::LOD_TEXTURE); mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, MIPMAP_YES,LLGLTexture::BOOST_PREVIEW, LLViewerTexture::LOD_TEXTURE);
} }
else // mImageAssetID == LLUUID::null else // mImageAssetID == LLUUID::null
{ {

View File

@@ -163,7 +163,7 @@ void LLTextureBar::draw()
{ {
color = LLColor4::green4; color = LLColor4::green4;
} }
else if (mImagep->getBoostLevel() > LLViewerTexture::BOOST_NONE) else if (mImagep->getBoostLevel() > LLGLTexture::BOOST_NONE)
{ {
color = LLColor4::magenta; color = LLColor4::magenta;
} }

View File

@@ -3348,14 +3348,14 @@ void LLViewerObject::boostTexturePriority(BOOL boost_children /* = TRUE */)
S32 tex_count = getNumTEs(); S32 tex_count = getNumTEs();
for (i = 0; i < tex_count; i++) for (i = 0; i < tex_count; i++)
{ {
getTEImage(i)->setBoostLevel(LLViewerTexture::BOOST_SELECTED); getTEImage(i)->setBoostLevel(LLGLTexture::BOOST_SELECTED);
} }
if (isSculpted() && !isMesh()) if (isSculpted() && !isMesh())
{ {
LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT);
LLUUID sculpt_id = sculpt_params->getSculptTexture(); LLUUID sculpt_id = sculpt_params->getSculptTexture();
LLViewerTextureManager::getFetchedTexture(sculpt_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLViewerTexture::BOOST_SELECTED); LLViewerTextureManager::getFetchedTexture(sculpt_id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLGLTexture::BOOST_SELECTED);
} }
if (boost_children) if (boost_children)
@@ -4118,7 +4118,7 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry &texture_entry)
// if (mDrawable.notNull() && mDrawable->isVisible()) // if (mDrawable.notNull() && mDrawable->isVisible())
// { // {
const LLUUID& image_id = getTE(te)->getID(); const LLUUID& image_id = getTE(te)->getID();
mTEImages[te] = LLViewerTextureManager::getFetchedTexture(image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); mTEImages[te] = LLViewerTextureManager::getFetchedTexture(image_id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
// } // }
} }
@@ -4144,7 +4144,7 @@ S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, LLHost hos
uuid == LLUUID::null) uuid == LLUUID::null)
{ {
retval = LLPrimitive::setTETexture(te, uuid); retval = LLPrimitive::setTETexture(te, uuid);
mTEImages[te] = LLViewerTextureManager::getFetchedTexture(uuid, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); mTEImages[te] = LLViewerTextureManager::getFetchedTexture(uuid, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
setChanged(TEXTURE); setChanged(TEXTURE);
if (mDrawable.notNull()) if (mDrawable.notNull())
{ {

View File

@@ -775,10 +775,10 @@ void LLObjectBackup::exportNextTexture()
S32 cur_discard = imagep->getDiscardLevel(); S32 cur_discard = imagep->getDiscardLevel();
if (cur_discard > 0) if (cur_discard > 0)
{ {
if (imagep->getBoostLevel() != LLViewerTexture::BOOST_PREVIEW) if (imagep->getBoostLevel() != LLGLTexture::BOOST_PREVIEW)
{ {
// we want to force discard 0: this one does this. // we want to force discard 0: this one does this.
imagep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); imagep->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
} }
} }
else else

View File

@@ -59,6 +59,7 @@
//#include "lltextureatlas.h" //#include "lltextureatlas.h"
//#include "lltextureatlasmanager.h" //#include "lltextureatlasmanager.h"
#include "lltextureentry.h" #include "lltextureentry.h"
#include "lltexturemanagerbridge.h"
#if NEW_MEDIA_TEXTURE #if NEW_MEDIA_TEXTURE
#include "llmediaentry.h" #include "llmediaentry.h"
#endif //NEW_MEDIA_TEXTURE #endif //NEW_MEDIA_TEXTURE
@@ -276,7 +277,7 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 wid
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture( LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(
const LLUUID &image_id, const LLUUID &image_id,
BOOL usemipmaps, BOOL usemipmaps,
LLViewerTexture::EBoostLevel boost_priority, LLGLTexture::EBoostLevel boost_priority,
S8 texture_type, S8 texture_type,
LLGLint internal_format, LLGLint internal_format,
LLGLenum primary_format, LLGLenum primary_format,
@@ -288,7 +289,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile( LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(
const std::string& filename, const std::string& filename,
BOOL usemipmaps, BOOL usemipmaps,
LLViewerTexture::EBoostLevel boost_priority, LLGLTexture::EBoostLevel boost_priority,
S8 texture_type, S8 texture_type,
LLGLint internal_format, LLGLint internal_format,
LLGLenum primary_format, LLGLenum primary_format,
@@ -300,7 +301,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(
//static //static
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url, LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url,
BOOL usemipmaps, BOOL usemipmaps,
LLViewerTexture::EBoostLevel boost_priority, LLGLTexture::EBoostLevel boost_priority,
S8 texture_type, S8 texture_type,
LLGLint internal_format, LLGLint internal_format,
LLGLenum primary_format, LLGLenum primary_format,
@@ -315,6 +316,26 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const
return gTextureList.getImageFromHost(image_id, host) ; return gTextureList.getImageFromHost(image_id, host) ;
} }
// Create a bridge to the viewer texture manager.
class LLViewerTextureManagerBridge : public LLTextureManagerBridge
{
/*virtual*/ LLPointer<LLGLTexture> getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE)
{
return LLViewerTextureManager::getLocalTexture(usemipmaps, generate_gl_tex);
}
/*virtual*/ LLPointer<LLGLTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE)
{
return LLViewerTextureManager::getLocalTexture(width, height, components, usemipmaps, generate_gl_tex);
}
/*virtual*/ LLGLTexture* getFetchedTexture(const LLUUID &image_id)
{
return LLViewerTextureManager::getFetchedTexture(image_id);
}
};
void LLViewerTextureManager::init() void LLViewerTextureManager::init()
{ {
{ {
@@ -360,16 +381,19 @@ void LLViewerTextureManager::init()
imagep->setCachedRawImage(0, image_raw) ; imagep->setCachedRawImage(0, image_raw) ;
image_raw = NULL; image_raw = NULL;
#else #else
LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI); LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
#endif #endif
LLViewerFetchedTexture::sDefaultImagep->dontDiscard(); LLViewerFetchedTexture::sDefaultImagep->dontDiscard();
LLViewerFetchedTexture::sDefaultImagep->setCategory(LLViewerTexture::OTHER) ; LLViewerFetchedTexture::sDefaultImagep->setCategory(LLViewerTexture::OTHER) ;
LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, TRUE, LLViewerTexture::BOOST_UI); LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, TRUE, LLGLTexture::BOOST_UI);
LLViewerFetchedTexture::sSmokeImagep->setNoDelete() ; LLViewerFetchedTexture::sSmokeImagep->setNoDelete() ;
LLViewerTexture::initClass() ; LLViewerTexture::initClass() ;
// Create a texture manager bridge.
gTextureManagerBridgep = new LLViewerTextureManagerBridge();
#if 0 #if 0
if (LLMetricPerformanceTesterBasic::isMetricLogRequested(sTesterName) && !LLMetricPerformanceTesterBasic::getTester(sTesterName)) if (LLMetricPerformanceTesterBasic::isMetricLogRequested(sTesterName) && !LLMetricPerformanceTesterBasic::getTester(sTesterName))
{ {
@@ -387,6 +411,7 @@ void LLViewerTextureManager::cleanup()
{ {
stop_glerror(); stop_glerror();
delete gTextureManagerBridgep;
LLImageGL::sDefaultGLTexture = NULL ; LLImageGL::sDefaultGLTexture = NULL ;
LLViewerTexture::sNullImagep = NULL; LLViewerTexture::sNullImagep = NULL;
LLViewerTexture::sBlackImagep = NULL; LLViewerTexture::sBlackImagep = NULL;
@@ -625,7 +650,7 @@ LLViewerTexture::~LLViewerTexture()
void LLViewerTexture::init(bool firstinit) void LLViewerTexture::init(bool firstinit)
{ {
mBoostLevel = LLViewerTexture::BOOST_NONE; mBoostLevel = LLGLTexture::BOOST_NONE;
mFullWidth = 0; mFullWidth = 0;
mFullHeight = 0; mFullHeight = 0;
@@ -685,7 +710,7 @@ void LLViewerTexture::setBoostLevel(S32 level)
if(mBoostLevel != level) if(mBoostLevel != level)
{ {
mBoostLevel = level ; mBoostLevel = level ;
if(mBoostLevel != LLViewerTexture::BOOST_NONE) if(mBoostLevel != LLGLTexture::BOOST_NONE)
{ {
setNoDelete() ; setNoDelete() ;
} }
@@ -1765,7 +1790,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
// Don't decode anything we don't need // Don't decode anything we don't need
priority = -4.0f; priority = -4.0f;
} }
else if ((mBoostLevel == LLViewerTexture::BOOST_UI || mBoostLevel == LLViewerTexture::BOOST_ICON) && !have_all_data) else if ((mBoostLevel == LLGLTexture::BOOST_UI || mBoostLevel == LLGLTexture::BOOST_ICON) && !have_all_data)
{ {
priority = 1.f; priority = 1.f;
} }
@@ -2126,7 +2151,7 @@ bool LLViewerFetchedTexture::updateFetch()
if(make_request) if(make_request)
{ {
//load the texture progressively. //load the texture progressively.
S32 delta_level = (mBoostLevel > LLViewerTexture::BOOST_NONE) ? 2 : 1 ; S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_NONE) ? 2 : 1 ;
if (current_discard < 0) if (current_discard < 0)
{ {
desired_discard = llmax(desired_discard, getMaxDiscardLevel() - delta_level); desired_discard = llmax(desired_discard, getMaxDiscardLevel() - delta_level);
@@ -2350,7 +2375,7 @@ void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::so
destroySavedRawImage() ; destroySavedRawImage() ;
} }
} }
else if(needsToSaveRawImage() && mBoostLevel != LLViewerTexture::BOOST_PREVIEW) else if(needsToSaveRawImage() && mBoostLevel != LLGLTexture::BOOST_PREVIEW)
{ {
if(desired_raw_discard != INVALID_DISCARD_LEVEL) if(desired_raw_discard != INVALID_DISCARD_LEVEL)
{ {
@@ -2812,7 +2837,7 @@ void LLViewerFetchedTexture::setCachedRawImage()
S32 h = mRawImage->getHeight() ; S32 h = mRawImage->getHeight() ;
S32 max_size = MAX_CACHED_RAW_IMAGE_AREA ; S32 max_size = MAX_CACHED_RAW_IMAGE_AREA ;
if(LLViewerTexture::BOOST_TERRAIN == mBoostLevel) if(LLGLTexture::BOOST_TERRAIN == mBoostLevel)
{ {
max_size = MAX_CACHED_RAW_TERRAIN_IMAGE_AREA ; max_size = MAX_CACHED_RAW_TERRAIN_IMAGE_AREA ;
} }
@@ -3201,7 +3226,7 @@ void LLViewerLODTexture::processTextureStats()
if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048 mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
} }
else if (mBoostLevel < LLViewerTexture::BOOST_HIGH && mMaxVirtualSize <= 10.f) else if (mBoostLevel < LLGLTexture::BOOST_HIGH && mMaxVirtualSize <= 10.f)
{ {
// If the image has not been significantly visible in a while, we don't want it // If the image has not been significantly visible in a while, we don't want it
mDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel, (S8)(MAX_DISCARD_LEVEL + 1)); mDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel, (S8)(MAX_DISCARD_LEVEL + 1));
@@ -3251,7 +3276,7 @@ void LLViewerLODTexture::processTextureStats()
mCalculatedDiscardLevel = discard_level; mCalculatedDiscardLevel = discard_level;
} }
} }
if (mBoostLevel < LLViewerTexture::BOOST_SCULPTED) if (mBoostLevel < LLGLTexture::BOOST_SCULPTED)
{ {
discard_level += sDesiredDiscardBias; discard_level += sDesiredDiscardBias;
discard_level *= sDesiredDiscardScale; // scale discard_level *= sDesiredDiscardScale; // scale
@@ -3277,7 +3302,7 @@ void LLViewerLODTexture::processTextureStats()
// //
S32 current_discard = getDiscardLevel(); S32 current_discard = getDiscardLevel();
if (sDesiredDiscardBias > 0.0f && mBoostLevel < LLViewerTexture::BOOST_SCULPTED && current_discard >= 0) if (sDesiredDiscardBias > 0.0f && mBoostLevel < LLGLTexture::BOOST_SCULPTED && current_discard >= 0)
{ {
// SH-2516 fix. // SH-2516 fix.
if(desired_discard_bias_max <= sDesiredDiscardBias && !mForceToSaveRawImage) if(desired_discard_bias_max <= sDesiredDiscardBias && !mForceToSaveRawImage)

View File

@@ -2,39 +2,32 @@
* @file llviewertexture.h * @file llviewertexture.h
* @brief Object for managing images and their textures * @brief Object for managing images and their textures
* *
* $LicenseInfo:firstyear=2000&license=viewergpl$ * $LicenseInfo:firstyear=2000&license=viewerlgpl$
*
* Copyright (c) 2000-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code * Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab * Copyright (C) 2010, Linden Research, Inc.
* 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://secondlife.com/developers/opensource/gplv2
* *
* There are special exceptions to the terms and conditions of the GPL as * This library is free software; you can redistribute it and/or
* it is applied to this Source Code. View the full text of the exception * modify it under the terms of the GNU Lesser General Public
* in the file doc/FLOSS-exception.txt in this software distribution, or * License as published by the Free Software Foundation;
* online at * version 2.1 of the License only.
* http://secondlife.com/developers/opensource/flossexception
* *
* By copying, modifying or distributing this software, you acknowledge * This library is distributed in the hope that it will be useful,
* that you have read and understood your obligations described above, * but WITHOUT ANY WARRANTY; without even the implied warranty of
* and agree to abide by those obligations. * 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 * You should have received a copy of the GNU Lesser General Public
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * License along with this library; if not, write to the Free Software
* COMPLETENESS OR PERFORMANCE. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*
*/ */
#ifndef LL_LLVIEWERTEXTURE_H #ifndef LL_LLVIEWERTEXTURE_H
#define LL_LLVIEWERTEXTURE_H #define LL_LLVIEWERTEXTURE_H
#include "lltexture.h" #include "llgltexture.h"
#include "lltimer.h" #include "lltimer.h"
#include "llframetimer.h" #include "llframetimer.h"
#include "llhost.h" #include "llhost.h"
@@ -97,14 +90,9 @@ public:
class LLTextureBar; class LLTextureBar;
class LLViewerTexture : public LLTexture class LLViewerTexture : public LLGLTexture
{ {
public: public:
enum
{
MAX_IMAGE_SIZE_DEFAULT = 1024,
INVALID_DISCARD_LEVEL = 0x7fff
};
enum enum
{ {
LOCAL_TEXTURE, LOCAL_TEXTURE,
@@ -116,38 +104,6 @@ public:
INVALID_TEXTURE_TYPE INVALID_TEXTURE_TYPE
}; };
enum EBoostLevel
{
BOOST_NONE = 0,
BOOST_AVATAR_BAKED ,
BOOST_AVATAR ,
BOOST_CLOUDS ,
BOOST_SCULPTED ,
BOOST_HIGH = 10,
BOOST_BUMP ,
BOOST_TERRAIN , // has to be high priority for minimap / low detail
BOOST_SELECTED ,
BOOST_AVATAR_BAKED_SELF ,
BOOST_AVATAR_SELF , // needed for baking avatar
BOOST_SUPER_HIGH , //textures higher than this need to be downloaded at the required resolution without delay.
BOOST_HUD ,
BOOST_ICON ,
BOOST_UI ,
BOOST_PREVIEW ,
BOOST_MAP ,
BOOST_MAP_VISIBLE ,
BOOST_MAX_LEVEL,
//other texture Categories
LOCAL = BOOST_MAX_LEVEL,
AVATAR_SCRATCH_TEX,
DYNAMIC_TEX,
MEDIA,
//ATLAS,
OTHER,
MAX_GL_IMAGE_CATEGORY
};
static S32 getTotalNumOfCategories() ; static S32 getTotalNumOfCategories() ;
static S32 getIndexFromCategory(S32 category) ; static S32 getIndexFromCategory(S32 category) ;
static S32 getCategoryFromIndex(S32 index) ; static S32 getCategoryFromIndex(S32 index) ;
@@ -312,14 +268,6 @@ protected:
LLViewerMediaTexture* mParcelMedia ; LLViewerMediaTexture* mParcelMedia ;
protected: protected:
typedef enum
{
DELETED = 0, //removed from memory
DELETION_CANDIDATE, //ready to be removed from memory
INACTIVE, //not be used for the last certain period (i.e., 30 seconds).
ACTIVE, //just being used, can become inactive if not being used for a certain time (10 seconds).
NO_DELETE = 99 //stay in memory, can not be removed.
} LLGLTextureState;
LLGLTextureState mTextureState ; LLGLTextureState mTextureState ;
static F32 sTexelPixelRatio; static F32 sTexelPixelRatio;
@@ -744,7 +692,7 @@ public:
static LLViewerFetchedTexture* getFetchedTexture(const LLUUID &image_id, static LLViewerFetchedTexture* getFetchedTexture(const LLUUID &image_id,
BOOL usemipmap = TRUE, BOOL usemipmap = TRUE,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. LLGLTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0, LLGLint internal_format = 0,
LLGLenum primary_format = 0, LLGLenum primary_format = 0,
@@ -753,7 +701,7 @@ public:
static LLViewerFetchedTexture* getFetchedTextureFromFile(const std::string& filename, static LLViewerFetchedTexture* getFetchedTextureFromFile(const std::string& filename,
BOOL usemipmap = TRUE, BOOL usemipmap = TRUE,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, LLGLTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE,
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0, LLGLint internal_format = 0,
LLGLenum primary_format = 0, LLGLenum primary_format = 0,
@@ -762,7 +710,7 @@ public:
static LLViewerFetchedTexture* getFetchedTextureFromUrl(const std::string& url, static LLViewerFetchedTexture* getFetchedTextureFromUrl(const std::string& url,
BOOL usemipmap = TRUE, BOOL usemipmap = TRUE,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, LLGLTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE,
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0, LLGLint internal_format = 0,
LLGLenum primary_format = 0, LLGLenum primary_format = 0,

View File

@@ -217,7 +217,7 @@ void LLViewerTextureList::doPrefetchImages()
if(LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type) if(LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type)
{ {
LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, texture_type); LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, texture_type);
if (image) if (image)
{ {
image->addTextureStats((F32)pixel_area); image->addTextureStats((F32)pixel_area);
@@ -357,7 +357,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
if (full_path.empty()) if (full_path.empty())
{ {
llwarns << "Failed to find local image file: " << filename << llendl; llwarns << "Failed to find local image file: " << filename << llendl;
return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI); return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
} }
std::string url = "file://" + full_path; std::string url = "file://" + full_path;
@@ -382,7 +382,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
{ {
// Never mind that this ignores image_set_id; // Never mind that this ignores image_set_id;
// getImage() will handle that later. // getImage() will handle that later.
return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI); return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
} }
// generate UUID based on hash of filename // generate UUID based on hash of filename
@@ -455,7 +455,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
if ((&image_id == NULL) || image_id.isNull()) if ((&image_id == NULL) || image_id.isNull())
{ {
return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI)); return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI));
} }
LLPointer<LLViewerFetchedTexture> imagep = findImage(image_id); LLPointer<LLViewerFetchedTexture> imagep = findImage(image_id);
@@ -1324,7 +1324,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
U8 *data = new U8[data_size]; U8 *data = new U8[data_size];
msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size);
LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
if (!image) if (!image)
{ {
delete [] data; delete [] data;
@@ -1397,7 +1397,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
U8 *data = new U8[data_size]; U8 *data = new U8[data_size];
msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size);
LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
if (!image) if (!image)
{ {
delete [] data; delete [] data;
@@ -1497,9 +1497,9 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priori
LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename,
BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority ) BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority )
{ {
if (boost_priority == LLViewerTexture::BOOST_NONE) if (boost_priority == LLGLTexture::BOOST_NONE)
{ {
boost_priority = LLViewerTexture::BOOST_UI; boost_priority = LLGLTexture::BOOST_UI;
} }
LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, boost_priority); LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, boost_priority);
return loadUIImage(imagep, name, use_mips, scale_rect, clip_rect); return loadUIImage(imagep, name, use_mips, scale_rect, clip_rect);
@@ -1508,9 +1508,9 @@ LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std
LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority) BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority)
{ {
if (boost_priority == LLViewerTexture::BOOST_NONE) if (boost_priority == LLGLTexture::BOOST_NONE)
{ {
boost_priority = LLViewerTexture::BOOST_UI; boost_priority = LLGLTexture::BOOST_UI;
} }
LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, boost_priority); LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, boost_priority);
return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect); return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect);
@@ -1535,7 +1535,7 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
//Note: //Note:
//Some other textures such as ICON also through this flow to be fetched. //Some other textures such as ICON also through this flow to be fetched.
//But only UI textures need to set this callback. //But only UI textures need to set this callback.
if(imagep->getBoostLevel() == LLViewerTexture::BOOST_UI) if(imagep->getBoostLevel() == LLGLTexture::BOOST_UI)
{ {
LLUIImageLoadData* datap = new LLUIImageLoadData; LLUIImageLoadData* datap = new LLUIImageLoadData;
datap->mImageName = name; datap->mImageName = name;

View File

@@ -131,7 +131,7 @@ private:
LLViewerFetchedTexture * getImage(const LLUUID &image_id, LLViewerFetchedTexture * getImage(const LLUUID &image_id,
BOOL usemipmap = TRUE, BOOL usemipmap = TRUE,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0, LLGLint internal_format = 0,
LLGLenum primary_format = 0, LLGLenum primary_format = 0,
@@ -140,7 +140,7 @@ private:
LLViewerFetchedTexture * getImageFromFile(const std::string& filename, LLViewerFetchedTexture * getImageFromFile(const std::string& filename,
BOOL usemipmap = TRUE, BOOL usemipmap = TRUE,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0, LLGLint internal_format = 0,
LLGLenum primary_format = 0, LLGLenum primary_format = 0,
@@ -149,7 +149,7 @@ private:
LLViewerFetchedTexture* getImageFromUrl(const std::string& url, LLViewerFetchedTexture* getImageFromUrl(const std::string& url,
BOOL usemipmap = TRUE, BOOL usemipmap = TRUE,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0, LLGLint internal_format = 0,
LLGLenum primary_format = 0, LLGLenum primary_format = 0,
@@ -158,7 +158,7 @@ private:
LLViewerFetchedTexture* createImage(const LLUUID &image_id, LLViewerFetchedTexture* createImage(const LLUUID &image_id,
BOOL usemipmap = TRUE, BOOL usemipmap = TRUE,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0, LLGLint internal_format = 0,
LLGLenum primary_format = 0, LLGLenum primary_format = 0,
@@ -168,7 +168,7 @@ private:
// Request image from a specific host, used for baked avatar textures. // Request image from a specific host, used for baked avatar textures.
// Implemented in header in case someone changes default params above. JC // Implemented in header in case someone changes default params above. JC
LLViewerFetchedTexture* getImageFromHost(const LLUUID& image_id, LLHost host) LLViewerFetchedTexture* getImageFromHost(const LLUUID& image_id, LLHost host)
{ return getImage(image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); } { return getImage(image_id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); }
public: public:
typedef std::set<LLPointer<LLViewerFetchedTexture> > image_list_t; typedef std::set<LLPointer<LLViewerFetchedTexture> > image_list_t;
@@ -225,11 +225,11 @@ private:
LLPointer<LLUIImage> loadUIImageByName(const std::string& name, const std::string& filename, LLPointer<LLUIImage> loadUIImageByName(const std::string& name, const std::string& filename,
BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null,
const LLRect& clip_rect = LLRect::null, const LLRect& clip_rect = LLRect::null,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI); LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI);
LLPointer<LLUIImage> loadUIImageByID(const LLUUID& id, LLPointer<LLUIImage> loadUIImageByID(const LLUUID& id,
BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null,
const LLRect& clip_rect = LLRect::null, const LLRect& clip_rect = LLRect::null,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI); LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI);
LLPointer<LLUIImage> loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null); LLPointer<LLUIImage> loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null);

View File

@@ -232,7 +232,7 @@ BOOL LLVLComposition::generateComposition()
{ {
if (mDetailTextures[i]->getDiscardLevel() < 0) if (mDetailTextures[i]->getDiscardLevel() < 0)
{ {
mDetailTextures[i]->setBoostLevel(LLViewerTexture::BOOST_TERRAIN); // in case we are at low detail mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN); // in case we are at low detail
mDetailTextures[i]->addTextureStats(BASE_SIZE*BASE_SIZE); mDetailTextures[i]->addTextureStats(BASE_SIZE*BASE_SIZE);
return FALSE; return FALSE;
} }
@@ -249,7 +249,7 @@ BOOL LLVLComposition::generateComposition()
ddiscard++; ddiscard++;
min_dim /= 2; min_dim /= 2;
} }
mDetailTextures[i]->setBoostLevel(LLViewerTexture::BOOST_TERRAIN); // in case we are at low detail mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN); // in case we are at low detail
mDetailTextures[i]->setMinDiscardLevel(ddiscard); mDetailTextures[i]->setMinDiscardLevel(ddiscard);
return FALSE; return FALSE;
} }
@@ -472,7 +472,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
for (S32 i = 0; i < 4; i++) for (S32 i = 0; i < 4; i++)
{ {
// Un-boost detatil textures (will get re-boosted if rendering in high detail) // Un-boost detatil textures (will get re-boosted if rendering in high detail)
mDetailTextures[i]->setBoostLevel(LLViewerTexture::BOOST_NONE); mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_NONE);
mDetailTextures[i]->setMinDiscardLevel(MAX_DISCARD_LEVEL + 1); mDetailTextures[i]->setMinDiscardLevel(MAX_DISCARD_LEVEL + 1);
} }

View File

@@ -5382,7 +5382,7 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel
imagep->addTextureStats(pixel_area / texel_area_ratio); imagep->addTextureStats(pixel_area / texel_area_ratio);
imagep->setBoostLevel(boost_level); imagep->setBoostLevel(boost_level);
if(boost_level != LLViewerTexture::BOOST_AVATAR_BAKED_SELF) if(boost_level != LLGLTexture::BOOST_AVATAR_BAKED_SELF)
{ {
imagep->setAdditionalDecodePriority(ADDITIONAL_PRI) ; imagep->setAdditionalDecodePriority(ADDITIONAL_PRI) ;
} }
@@ -8321,7 +8321,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
&& baked_index != BAKED_SKIRT) && baked_index != BAKED_SKIRT)
{ {
setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, setTEImage(mBakedTextureDatas[baked_index].mTextureIndex,
LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureIndex, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureIndex, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
} }
} }

View File

@@ -568,8 +568,8 @@ private:
// Constants // Constants
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public: public:
virtual LLViewerTexture::EBoostLevel getAvatarBoostLevel() const { return LLViewerTexture::BOOST_AVATAR; } virtual LLViewerTexture::EBoostLevel getAvatarBoostLevel() const { return LLGLTexture::BOOST_AVATAR; }
virtual LLViewerTexture::EBoostLevel getAvatarBakedBoostLevel() const { return LLViewerTexture::BOOST_AVATAR_BAKED; } virtual LLViewerTexture::EBoostLevel getAvatarBakedBoostLevel() const { return LLGLTexture::BOOST_AVATAR_BAKED; }
virtual S32 getTexImageSize() const; virtual S32 getTexImageSize() const;
virtual S32 getTexImageArea() const { return getTexImageSize()*getTexImageSize(); } virtual S32 getTexImageArea() const { return getTexImageSize()*getTexImageSize(); }

View File

@@ -175,8 +175,8 @@ private:
// LLVOAvatar Constants // LLVOAvatar Constants
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public: public:
/*virtual*/ LLViewerTexture::EBoostLevel getAvatarBoostLevel() const { return LLViewerTexture::BOOST_AVATAR_SELF; } /*virtual*/ LLViewerTexture::EBoostLevel getAvatarBoostLevel() const { return LLGLTexture::BOOST_AVATAR_SELF; }
/*virtual*/ LLViewerTexture::EBoostLevel getAvatarBakedBoostLevel() const { return LLViewerTexture::BOOST_AVATAR_BAKED_SELF; } /*virtual*/ LLViewerTexture::EBoostLevel getAvatarBakedBoostLevel() const { return LLGLTexture::BOOST_AVATAR_BAKED_SELF; }
/*virtual*/ S32 getTexImageSize() const { return LLVOAvatar::getTexImageSize()*4; } /*virtual*/ S32 getTexImageSize() const { return LLVOAvatar::getTexImageSize()*4; }
/** Rendering /** Rendering

View File

@@ -63,7 +63,7 @@ LLVOClouds::LLVOClouds(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re
mbCanSelect = FALSE; mbCanSelect = FALSE;
setNumTEs(1); setNumTEs(1);
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(gCloudTextureID); LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(gCloudTextureID);
image->setBoostLevel(LLViewerTexture::BOOST_CLOUDS); image->setBoostLevel(LLGLTexture::BOOST_CLOUDS);
setTEImage(0, image); setTEImage(0, image);
} }

View File

@@ -111,7 +111,7 @@ void LLVOGrass::updateSpecies()
SpeciesMap::const_iterator it = sSpeciesTable.begin(); SpeciesMap::const_iterator it = sSpeciesTable.begin();
mSpecies = (*it).first; mSpecies = (*it).first;
} }
setTEImage(0, LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); setTEImage(0, LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
} }

View File

@@ -142,7 +142,7 @@ LLVoiceVisualizer::LLVoiceVisualizer( const U8 type )
for (int i=0; i<NUM_VOICE_SYMBOL_WAVES; i++) for (int i=0; i<NUM_VOICE_SYMBOL_WAVES; i++)
{ {
mSoundSymbol.mWaveFadeOutStartTime [i] = mCurrentTime; mSoundSymbol.mWaveFadeOutStartTime [i] = mCurrentTime;
mSoundSymbol.mTexture [i] = LLViewerTextureManager::getFetchedTextureFromFile(sound_level_img[i], FALSE, LLViewerTexture::BOOST_UI); mSoundSymbol.mTexture [i] = LLViewerTextureManager::getFetchedTextureFromFile(sound_level_img[i], FALSE, LLGLTexture::BOOST_UI);
mSoundSymbol.mWaveActive [i] = false; mSoundSymbol.mWaveActive [i] = false;
mSoundSymbol.mWaveOpacity [i] = 1.0f; mSoundSymbol.mWaveOpacity [i] = 1.0f;
mSoundSymbol.mWaveExpansion [i] = 1.0f; mSoundSymbol.mWaveExpansion [i] = 1.0f;

View File

@@ -384,9 +384,9 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
mSun.setIntensity(SUN_INTENSITY); mSun.setIntensity(SUN_INTENSITY);
mMoon.setIntensity(0.1f * SUN_INTENSITY); mMoon.setIntensity(0.1f * SUN_INTENSITY);
mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, LLViewerTexture::BOOST_UI); mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, LLGLTexture::BOOST_UI);
mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, LLViewerTexture::BOOST_UI); mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, LLGLTexture::BOOST_UI);
mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
mBloomTexturep = LLViewerTextureManager::getFetchedTexture(IMG_BLOOM1); mBloomTexturep = LLViewerTextureManager::getFetchedTexture(IMG_BLOOM1);
mBloomTexturep->setNoDelete() ; mBloomTexturep->setNoDelete() ;
@@ -478,9 +478,9 @@ void LLVOSky::restoreGL()
{ {
mSkyTex[i].restoreGL(); mSkyTex[i].restoreGL();
} }
mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, LLViewerTexture::BOOST_UI); mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, LLGLTexture::BOOST_UI);
mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, LLViewerTexture::BOOST_UI); mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, LLGLTexture::BOOST_UI);
mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
mBloomTexturep = LLViewerTextureManager::getFetchedTexture(IMG_BLOOM1); mBloomTexturep = LLViewerTextureManager::getFetchedTexture(IMG_BLOOM1);
mBloomTexturep->setNoDelete() ; mBloomTexturep->setNoDelete() ;

View File

@@ -331,7 +331,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
// Load Species-Specific data // Load Species-Specific data
// //
static const S32 MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 32 ; //frames. static const S32 MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 32 ; //frames.
mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
mTreeImagep->setMaxVirtualSizeResetInterval(MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); //allow to wait for at most 16 frames to reset virtual size. mTreeImagep->setMaxVirtualSizeResetInterval(MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); //allow to wait for at most 16 frames to reset virtual size.
mBranchLength = sSpeciesTable[mSpecies]->mBranchLength; mBranchLength = sSpeciesTable[mSpecies]->mBranchLength;

View File

@@ -540,7 +540,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
{ {
F32 area = (F32) camera->getScreenPixelArea(); F32 area = (F32) camera->getScreenPixelArea();
vsize = area; vsize = area;
imagep->setBoostLevel(LLViewerTexture::BOOST_HUD); imagep->setBoostLevel(LLGLTexture::BOOST_HUD);
face->setPixelArea(area); // treat as full screen face->setPixelArea(area); // treat as full screen
face->setVirtualSize(vsize); face->setVirtualSize(vsize);
} }
@@ -551,7 +551,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
{ {
if (permYouOwner()) if (permYouOwner())
{ {
imagep->setBoostLevel(LLViewerTexture::BOOST_HIGH); imagep->setBoostLevel(LLGLTexture::BOOST_HIGH);
} }
} }
} }
@@ -598,7 +598,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
if (mSculptTexture.notNull()) if (mSculptTexture.notNull())
{ {
mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(), mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(),
(S32)LLViewerTexture::BOOST_SCULPTED)); (S32)LLGLTexture::BOOST_SCULPTED));
mSculptTexture->setForSculpt() ; mSculptTexture->setForSculpt() ;
if(!mSculptTexture->isCachedRawImageReady()) if(!mSculptTexture->isCachedRawImageReady())
@@ -801,7 +801,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
if (is404) if (is404)
{ {
setIcon(LLViewerTextureManager::getFetchedTextureFromFile("inv_item_mesh.tga", TRUE, LLViewerTexture::BOOST_UI)); setIcon(LLViewerTextureManager::getFetchedTextureFromFile("inv_item_mesh.tga", TRUE, LLGLTexture::BOOST_UI));
//render prim proxy when mesh loading attempts give up //render prim proxy when mesh loading attempts give up
volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_NONE); volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_NONE);
@@ -881,7 +881,7 @@ void LLVOVolume::updateSculptTexture()
LLUUID id = sculpt_params->getSculptTexture(); LLUUID id = sculpt_params->getSculptTexture();
if (id.notNull()) if (id.notNull())
{ {
mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
} }
} }
else else
@@ -1932,7 +1932,7 @@ void LLVOVolume::updateSpotLightPriority()
if (mLightTexture.notNull()) if (mLightTexture.notNull())
{ {
mLightTexture->addTextureStats(mSpotLightPriority); mLightTexture->addTextureStats(mSpotLightPriority);
mLightTexture->setBoostLevel(LLViewerTexture::BOOST_CLOUDS); mLightTexture->setBoostLevel(LLGLTexture::BOOST_CLOUDS);
} }
} }

View File

@@ -709,7 +709,7 @@ void LLWearable::writeToAvatar()
{ {
image_id = getDefaultTextureImageID((ETextureIndex) te); image_id = getDefaultTextureImageID((ETextureIndex) te);
} }
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE ); LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE );
// MULTI-WEARABLE: assume index 0 will be used when writing to avatar. TODO: eliminate the need for this. // MULTI-WEARABLE: assume index 0 will be used when writing to avatar. TODO: eliminate the need for this.
gAgentAvatarp->setLocalTextureTE(te, image, 0); gAgentAvatarp->setLocalTextureTE(te, image, 0);
} }

View File

@@ -96,7 +96,7 @@ void LLSimInfo::setLandForSaleImage (LLUUID image_id)
// Fetch the image // Fetch the image
if (mMapImageID[SIM_LAYER_OVERLAY].notNull()) if (mMapImageID[SIM_LAYER_OVERLAY].notNull())
{ {
mLayerImage[SIM_LAYER_OVERLAY] = LLViewerTextureManager::getFetchedTexture(mMapImageID[SIM_LAYER_OVERLAY], MIPMAP_TRUE, LLViewerTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE); mLayerImage[SIM_LAYER_OVERLAY] = LLViewerTextureManager::getFetchedTexture(mMapImageID[SIM_LAYER_OVERLAY], MIPMAP_TRUE, LLGLTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE);
mLayerImage[SIM_LAYER_OVERLAY]->setAddressMode(LLTexUnit::TAM_CLAMP); mLayerImage[SIM_LAYER_OVERLAY]->setAddressMode(LLTexUnit::TAM_CLAMP);
} }
else else
@@ -110,13 +110,13 @@ LLPointer<LLViewerFetchedTexture> LLSimInfo::getLandForSaleImage ()
if (mLayerImage[SIM_LAYER_OVERLAY].isNull() && mMapImageID[SIM_LAYER_OVERLAY].notNull()) if (mLayerImage[SIM_LAYER_OVERLAY].isNull() && mMapImageID[SIM_LAYER_OVERLAY].notNull())
{ {
// Fetch the image if it hasn't been done yet (unlikely but...) // Fetch the image if it hasn't been done yet (unlikely but...)
mLayerImage[SIM_LAYER_OVERLAY] = LLViewerTextureManager::getFetchedTexture(mMapImageID[SIM_LAYER_OVERLAY], MIPMAP_TRUE, LLViewerTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE); mLayerImage[SIM_LAYER_OVERLAY] = LLViewerTextureManager::getFetchedTexture(mMapImageID[SIM_LAYER_OVERLAY], MIPMAP_TRUE, LLGLTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE);
mLayerImage[SIM_LAYER_OVERLAY]->setAddressMode(LLTexUnit::TAM_CLAMP); mLayerImage[SIM_LAYER_OVERLAY]->setAddressMode(LLTexUnit::TAM_CLAMP);
} }
if (!mLayerImage[SIM_LAYER_OVERLAY].isNull()) if (!mLayerImage[SIM_LAYER_OVERLAY].isNull())
{ {
// Boost the fetch level when we try to access that image // Boost the fetch level when we try to access that image
mLayerImage[SIM_LAYER_OVERLAY]->setBoostLevel(LLViewerTexture::BOOST_MAP); mLayerImage[SIM_LAYER_OVERLAY]->setBoostLevel(LLGLTexture::BOOST_MAP);
} }
return mLayerImage[SIM_LAYER_OVERLAY]; return mLayerImage[SIM_LAYER_OVERLAY];
} }
@@ -491,7 +491,7 @@ void LLWorldMap::processMapLayerReply(LLMessageSystem* msg, void**)
msg->getU32Fast(_PREHASH_LayerData, _PREHASH_Top, top, block); msg->getU32Fast(_PREHASH_LayerData, _PREHASH_Top, top, block);
msg->getU32Fast(_PREHASH_LayerData, _PREHASH_Bottom, bottom, block); msg->getU32Fast(_PREHASH_LayerData, _PREHASH_Bottom, bottom, block);
new_layer.LayerImage = LLViewerTextureManager::getFetchedTexture(new_layer.LayerImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE); new_layer.LayerImage = LLViewerTextureManager::getFetchedTexture(new_layer.LayerImageID, MIPMAP_TRUE, LLGLTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE);
gGL.getTexUnit(0)->bind(new_layer.LayerImage.get()); gGL.getTexUnit(0)->bind(new_layer.LayerImage.get());
new_layer.LayerImage->setAddressMode(LLTexUnit::TAM_CLAMP); new_layer.LayerImage->setAddressMode(LLTexUnit::TAM_CLAMP);

View File

@@ -832,7 +832,7 @@ void LLWorldMapView::drawLegacyBackgroundLayers(S32 width, S32 height) {
continue; continue;
} }
current_image->setBoostLevel(LLViewerTexture::BOOST_MAP); current_image->setBoostLevel(LLGLTexture::BOOST_MAP);
current_image->setKnownDrawSize(llround(pix_width * LLUI::sGLScaleFactor.mV[VX]), current_image->setKnownDrawSize(llround(pix_width * LLUI::sGLScaleFactor.mV[VX]),
llround(pix_height * LLUI::sGLScaleFactor.mV[VY])); llround(pix_height * LLUI::sGLScaleFactor.mV[VY]));
@@ -900,7 +900,7 @@ F32 LLWorldMapView::drawLegacySimTile(LLSimInfo& sim_info, S32 left, S32 top, S3
(textures_requested_this_tick < MAX_REQUEST_PER_TICK))) (textures_requested_this_tick < MAX_REQUEST_PER_TICK)))
{ {
textures_requested_this_tick++; textures_requested_this_tick++;
simimage = sim_info.mLayerImage[SIM_LAYER_COMPOSITE] = LLViewerTextureManager::getFetchedTexture(sim_info.mMapImageID[SIM_LAYER_COMPOSITE], MIPMAP_TRUE, LLViewerTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE); simimage = sim_info.mLayerImage[SIM_LAYER_COMPOSITE] = LLViewerTextureManager::getFetchedTexture(sim_info.mMapImageID[SIM_LAYER_COMPOSITE], MIPMAP_TRUE, LLGLTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE);
simimage->setAddressMode(LLTexUnit::TAM_CLAMP); simimage->setAddressMode(LLTexUnit::TAM_CLAMP);
} }
} }
@@ -924,7 +924,7 @@ F32 LLWorldMapView::drawLegacySimTile(LLSimInfo& sim_info, S32 left, S32 top, S3
S32 draw_size = llround(sMapScale); S32 draw_size = llround(sMapScale);
simimage->setKnownDrawSize( llround(draw_size * LLUI::sGLScaleFactor.mV[VX] * ((F32)sim_info.getSizeX() / REGION_WIDTH_METERS)), simimage->setKnownDrawSize( llround(draw_size * LLUI::sGLScaleFactor.mV[VX] * ((F32)sim_info.getSizeX() / REGION_WIDTH_METERS)),
llround(draw_size * LLUI::sGLScaleFactor.mV[VY] * ((F32)sim_info.getSizeY() / REGION_WIDTH_METERS))); llround(draw_size * LLUI::sGLScaleFactor.mV[VY] * ((F32)sim_info.getSizeY() / REGION_WIDTH_METERS)));
simimage->setBoostLevel(LLViewerTexture::BOOST_MAP); simimage->setBoostLevel(LLGLTexture::BOOST_MAP);
if(alpha >= ALPHA_CUTOFF) if(alpha >= ALPHA_CUTOFF)
{ {
gGL.getTexUnit(0)->bind(simimage); gGL.getTexUnit(0)->bind(simimage);

View File

@@ -80,21 +80,21 @@ void LLWorldMipmap::equalizeBoostLevels()
{ {
LLPointer<LLViewerFetchedTexture> img = iter->second; LLPointer<LLViewerFetchedTexture> img = iter->second;
S32 current_boost_level = img->getBoostLevel(); S32 current_boost_level = img->getBoostLevel();
if (current_boost_level == LLViewerTexture::BOOST_MAP_VISIBLE) if (current_boost_level == LLGLTexture::BOOST_MAP_VISIBLE)
{ {
// If level was BOOST_MAP_VISIBLE, the tile has been used in the last draw so keep it high // If level was BOOST_MAP_VISIBLE, the tile has been used in the last draw so keep it high
img->setBoostLevel(LLViewerTexture::BOOST_MAP); img->setBoostLevel(LLGLTexture::BOOST_MAP);
} }
else else
{ {
// If level was BOOST_MAP only (or anything else...), the tile wasn't used in the last draw // If level was BOOST_MAP only (or anything else...), the tile wasn't used in the last draw
// so we drop its boost level to BOOST_NONE. // so we drop its boost level to BOOST_NONE.
img->setBoostLevel(LLViewerTexture::BOOST_NONE); img->setBoostLevel(LLGLTexture::BOOST_NONE);
} }
#if DEBUG_TILES_STAT #if DEBUG_TILES_STAT
// Increment some stats if compile option on // Increment some stats if compile option on
nb_tiles++; nb_tiles++;
if (current_boost_level == LLViewerTexture::BOOST_MAP_VISIBLE) if (current_boost_level == LLGLTexture::BOOST_MAP_VISIBLE)
{ {
nb_visible++; nb_visible++;
} }
@@ -121,7 +121,7 @@ void LLWorldMipmap::dropBoostLevels()
for (sublevel_tiles_t::iterator iter = level_mipmap.begin(); iter != level_mipmap.end(); iter++) for (sublevel_tiles_t::iterator iter = level_mipmap.begin(); iter != level_mipmap.end(); iter++)
{ {
LLPointer<LLViewerFetchedTexture> img = iter->second; LLPointer<LLViewerFetchedTexture> img = iter->second;
img->setBoostLevel(LLViewerTexture::BOOST_NONE); img->setBoostLevel(LLGLTexture::BOOST_NONE);
} }
} }
} }
@@ -178,7 +178,7 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32
// Boost the tile level so to mark it's in use *if* load on // Boost the tile level so to mark it's in use *if* load on
if (load) if (load)
{ {
img->setBoostLevel(LLViewerTexture::BOOST_MAP_VISIBLE); img->setBoostLevel(LLGLTexture::BOOST_MAP_VISIBLE);
} }
return img; return img;
} }
@@ -195,8 +195,8 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32
// END DEBUG // END DEBUG
//LL_INFOS("World Map") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL; //LL_INFOS("World Map") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL;
LLPointer<LLViewerFetchedTexture> img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); LLPointer<LLViewerFetchedTexture> img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
img->setBoostLevel(LLViewerTexture::BOOST_MAP); img->setBoostLevel(LLGLTexture::BOOST_MAP);
// Return the smart pointer // Return the smart pointer
return img; return img;