Merge Firestorm LGPL
commit
c8b4e71c23
|
|
@ -57,6 +57,38 @@ F32 LLDrawPoolTerrain::sDetailScale = DETAIL_SCALE;
|
|||
static LLGLSLShader* sShader = NULL;
|
||||
static LLTrace::BlockTimerStatHandle FTM_SHADOW_TERRAIN("Terrain Shadow");
|
||||
|
||||
// <FS:ND> Hack to preload the invisiprim textures and make them fall into the right texturelist bucket
|
||||
|
||||
LLPointer<LLViewerTexture> mAlphaRampImagep2;
|
||||
LLPointer<LLViewerTexture> m2DAlphaRampImagep2;
|
||||
|
||||
void preloadForInvisiprims()
|
||||
{
|
||||
U32 format = GL_ALPHA8;
|
||||
U32 int_format = GL_ALPHA;
|
||||
mAlphaRampImagep2 = LLViewerTextureManager::getFetchedTextureFromFile( "alpha_gradient.tga",
|
||||
FTT_LOCAL_FILE,
|
||||
TRUE, LLGLTexture::BOOST_NONE,
|
||||
LLViewerTexture::FETCHED_TEXTURE,
|
||||
format, int_format,
|
||||
LLUUID( "e97cf410-8e61-7005-ec06-629eba4cd1fb" ) );
|
||||
|
||||
//gGL.getTexUnit(0)->bind(mAlphaRampImagep.get());
|
||||
mAlphaRampImagep2->setAddressMode( LLTexUnit::TAM_CLAMP );
|
||||
|
||||
m2DAlphaRampImagep2 = LLViewerTextureManager::getFetchedTextureFromFile( "alpha_gradient_2d.j2c",
|
||||
FTT_LOCAL_FILE,
|
||||
TRUE, LLGLTexture::BOOST_NONE,
|
||||
LLViewerTexture::FETCHED_TEXTURE,
|
||||
format, int_format,
|
||||
LLUUID( "38b86f85-2575-52a9-a531-23108d8da837" ) );
|
||||
|
||||
//gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
|
||||
m2DAlphaRampImagep2->setAddressMode( LLTexUnit::TAM_CLAMP );
|
||||
|
||||
}
|
||||
// </FS:ND>
|
||||
|
||||
|
||||
LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
|
||||
LLFacePool(POOL_TERRAIN),
|
||||
|
|
@ -99,6 +131,8 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
|
|||
mTexturep->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
|
||||
|
||||
//gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
preloadForInvisiprims(); // <FS:ND/> load textures for invisiprims (same UUID as above, but put them into the texturelist for normal textures rather than UI).
|
||||
}
|
||||
|
||||
LLDrawPoolTerrain::~LLDrawPoolTerrain()
|
||||
|
|
|
|||
|
|
@ -126,6 +126,11 @@ const F32 desired_discard_bias_min = -2.0f; // -max number of levels to improve
|
|||
const F32 desired_discard_bias_max = (F32)MAX_DISCARD_LEVEL; // max number of levels to reduce image quality by
|
||||
const F64 log_2 = log(2.0);
|
||||
|
||||
LLUUID LLViewerTexture::sInvisiprimTexture1 = LLUUID::null;
|
||||
LLUUID LLViewerTexture::sInvisiprimTexture2 = LLUUID::null;
|
||||
#define TEX_INVISIPRIM1 "e97cf410-8e61-7005-ec06-629eba4cd1fb"
|
||||
#define TEX_INVISIPRIM2 "38b86f85-2575-52a9-a531-23108d8da837"
|
||||
|
||||
//----------------------------------------------------------------------------------------------
|
||||
//namespace: LLViewerTextureAccess
|
||||
//----------------------------------------------------------------------------------------------
|
||||
|
|
@ -479,6 +484,15 @@ void LLViewerTexture::initClass()
|
|||
{
|
||||
sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio");
|
||||
}
|
||||
|
||||
if (sInvisiprimTexture1.isNull())
|
||||
{
|
||||
sInvisiprimTexture1 = LLUUID(TEX_INVISIPRIM1);
|
||||
}
|
||||
if (sInvisiprimTexture2.isNull())
|
||||
{
|
||||
sInvisiprimTexture2 = LLUUID(TEX_INVISIPRIM2);
|
||||
}
|
||||
}
|
||||
|
||||
// tuning params
|
||||
|
|
@ -1030,6 +1044,17 @@ BOOL LLViewerTexture::isLargeImage()
|
|||
return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize;
|
||||
}
|
||||
|
||||
bool LLViewerTexture::isInvisiprim()
|
||||
{
|
||||
return isInvisiprim(mID);
|
||||
}
|
||||
|
||||
//static
|
||||
bool LLViewerTexture::isInvisiprim(LLUUID id)
|
||||
{
|
||||
return (id == sInvisiprimTexture1) || (id == sInvisiprimTexture2);
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLViewerTexture::updateBindStatsForTester()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -164,6 +164,8 @@ public:
|
|||
|
||||
virtual void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ;
|
||||
BOOL isLargeImage() ;
|
||||
bool isInvisiprim() ;
|
||||
static bool isInvisiprim(LLUUID id) ;
|
||||
|
||||
void setParcelMedia(LLViewerMediaTexture* media) {mParcelMedia = media;}
|
||||
BOOL hasParcelMedia() const { return mParcelMedia != NULL;}
|
||||
|
|
@ -236,6 +238,8 @@ public:
|
|||
static S32 sMaxSmallImageSize ;
|
||||
static BOOL sFreezeImageScalingDown ;//do not scale down image res if set.
|
||||
static F32 sCurrentTime ;
|
||||
static LLUUID sInvisiprimTexture1 ;
|
||||
static LLUUID sInvisiprimTexture2 ;
|
||||
|
||||
enum EDebugTexels
|
||||
{
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ void LLViewerTextureList::doPrefetchImages()
|
|||
S32 pixel_area = imagesd["area"];
|
||||
S32 texture_type = imagesd["type"];
|
||||
|
||||
if(LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type)
|
||||
if((LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type) && !LLViewerTexture::isInvisiprim(uuid))
|
||||
{
|
||||
LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, texture_type);
|
||||
if (image)
|
||||
|
|
@ -257,7 +257,8 @@ void LLViewerTextureList::shutdown()
|
|||
!image->getUseDiscard() ||
|
||||
image->needsAux() ||
|
||||
!image->getTargetHost().isInvalid() ||
|
||||
!image->getUrl().empty()
|
||||
!image->getUrl().empty() ||
|
||||
image->isInvisiprim()
|
||||
)
|
||||
{
|
||||
continue; // avoid UI, baked, and other special images
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
<text name="note_lookat">
|
||||
(Śledzenie spojrzeń Awatara w zakładce Prywatność)
|
||||
</text>
|
||||
<check_box label="Wyłącz losowe ruchy gałek ocznych awatara" name="FSStaticEyes" />
|
||||
<text name="BeamPrefs">
|
||||
Efekty wiązki wyboru
|
||||
</text>
|
||||
|
|
|
|||
Loading…
Reference in New Issue