SL-18964 Move creating of LLViewerFetchedTexture::sSmokeImagep to LLDrawPoolAlpha::renderDebugAlpha()

meow-7.2.2
Alexander Gavriliuk 2023-02-12 13:37:08 +01:00 committed by marchcat-pe
parent 8d21d29bd7
commit da3002bd0c
2 changed files with 11 additions and 0 deletions

View File

@ -280,6 +280,13 @@ void LLDrawPoolAlpha::renderDebugAlpha()
{
gHighlightProgram.bind();
gGL.diffuseColor4f(1, 0, 0, 1);
// SL-18964 : The creating of this texture was moved here from LLViewerTextureManager::init() to make the texture transparent before adding to cache
if (!LLViewerFetchedTexture::sSmokeImagep)
{
LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
LLViewerFetchedTexture::sSmokeImagep->setNoDelete();
}
LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f * 1024.f);
gGL.getTexUnit(0)->bindFast(LLViewerFetchedTexture::sSmokeImagep);

View File

@ -402,8 +402,12 @@ void LLViewerTextureManager::init()
LLViewerFetchedTexture::sDefaultImagep->dontDiscard();
LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER);
#if 0
// When called first time after clearing cache this call creates (and adds to cache) an opaque texture instead of transparent
// SL-18964 : The creating of this texture was moved to LLDrawPoolAlpha::renderDebugAlpha()
LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
LLViewerFetchedTexture::sSmokeImagep->setNoDelete();
#endif
image_raw = new LLImageRaw(32,32,3);
data = image_raw->getData();