diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 06ad5212d8d15ad37bb6725714ad6f744585f3d5..93d6de3c6817be72ea954493673bec517a618edc 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5752,7 +5752,7 @@ void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters, LLViewerTexture* image; if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null) { - image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.tga"); + image = LLViewerFetchedTexture::sPixieSmallImagep; } else { @@ -5801,7 +5801,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own LLViewerTexture* image; if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null) { - image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); + image = LLViewerFetchedTexture::sPixieSmallImagep; } else { @@ -5848,7 +5848,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_ LLViewerTexture* image; if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null) { - image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); + image = LLViewerFetchedTexture::sPixieSmallImagep; } else { diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index 8e756d2d9eb3624af84674a565ee384e56326e3c..8cbb700f4a12b07fdc32eeae60b6576fa74da009 100644 --- a/indra/newview/llviewerpartsource.cpp +++ b/indra/newview/llviewerpartsource.cpp @@ -114,7 +114,7 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) llassert(source_objp); mSourceObjectp = source_objp; mPosAgent = mSourceObjectp->getPositionAgent(); - mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); + mImagep = LLViewerFetchedTexture::sPixieSmallImagep; mImagep->setAddressMode(LLTexUnit::TAM_CLAMP); } @@ -622,7 +622,7 @@ void LLViewerPartSourceSpiral::update(const F32 dt) { if (!mImagep) { - mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); + mImagep = LLViewerFetchedTexture::sPixieSmallImagep; } const F32 RATE = 0.025f; @@ -791,7 +791,7 @@ void LLViewerPartSourceBeam::update(const F32 dt) if (!mImagep) { - mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); + mImagep = LLViewerFetchedTexture::sPixieSmallImagep; } LLViewerPart* part = new LLViewerPart(); @@ -878,7 +878,7 @@ void LLViewerPartSourceChat::update(const F32 dt) { if (!mImagep) { - mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); + mImagep = LLViewerFetchedTexture::sPixieSmallImagep; } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 4152e269b712ab1d829d2f4ed0b1b08163cbd43f..7a422d6550bf23cffe2974aab4f542edf65c1e50 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -79,6 +79,7 @@ LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = NULL; LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = NULL; LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sSmokeImagep = NULL; LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sFlatNormalImagep = NULL; +LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sPixieSmallImagep = NULL; // [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0) LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultDiffuseImagep = NULL; // [/SL:KB] @@ -456,9 +457,11 @@ void LLViewerTextureManager::cleanup() LLViewerFetchedTexture::sMissingAssetImagep = NULL; LLTexUnit::sWhiteTexture = 0; LLViewerFetchedTexture::sWhiteImagep = NULL; - + LLViewerFetchedTexture::sFlatNormalImagep = NULL; + LLViewerFetchedTexture::sPixieSmallImagep = NULL; + LLViewerMediaTexture::cleanUpClass(); } diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index da59e6e16f3184c01dec1dc7f2674f56f7c77565..9482450b63e2e41e25a31449a7d0e3882a228b15 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -530,6 +530,7 @@ class LLViewerFetchedTexture : public LLViewerTexture static LLPointer<LLViewerFetchedTexture> sDefaultImagep; // "Default" texture for error cases, the only case of fetched texture which is generated in local. static LLPointer<LLViewerFetchedTexture> sSmokeImagep; // Old "Default" translucent texture static LLPointer<LLViewerFetchedTexture> sFlatNormalImagep; // Flat normal map denoting no bumpiness on a surface + static LLPointer<LLViewerFetchedTexture> sPixieSmallImagep; // Small pixmap for default particle tex // [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0) static LLPointer<LLViewerFetchedTexture> sDefaultDiffuseImagep; // [/SL:KB] diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index ada50e2c0cbed9422ef158b0d503c8a3fde31b73..26efe46028d4276d8bf316d417212eebc518e2e3 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -131,6 +131,9 @@ void LLViewerTextureList::doPreloadImages() // Set the default flat normal map LLViewerFetchedTexture::sFlatNormalImagep = LLViewerTextureManager::getFetchedTextureFromFile("flatnormal.tga", FTT_LOCAL_FILE, MIPMAP_NO, LLViewerFetchedTexture::BOOST_BUMP); + // Set the default particle image + LLViewerFetchedTexture::sPixieSmallImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI); + image_list->initFromFile(); // turn off clamping and bilinear filtering for uv picking images