summaryrefslogtreecommitdiff
path: root/indra/llappearance
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2012-11-15 15:20:46 -0500
committerLogan Dethrow <log@lindenlab.com>2012-11-15 15:20:46 -0500
commit79dbaed1581a5d8212caebf6b6a3672660e2f5a9 (patch)
treec3c539a8ce3ccfb4d7d1a66b58b56fce9b5c293b /indra/llappearance
parentf93604c399c889e06980554e1cb59a833e7f847d (diff)
parent51a016a0cc6928dd2a685ce22dd6475e2610a5c5 (diff)
Merge lindenlab/sunshine-internal -> log/sunshine-internal
Diffstat (limited to 'indra/llappearance')
-rwxr-xr-xindra/llappearance/llavatarappearance.cpp2
-rwxr-xr-xindra/llappearance/llavatarappearance.h2
-rwxr-xr-xindra/llappearance/lldriverparam.cpp1
-rwxr-xr-x[-rw-r--r--]indra/llappearance/lltexlayer.cpp44
4 files changed, 27 insertions, 22 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 3c01a00e61..c4ff667fa1 100755
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -175,7 +175,7 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
for (U32 i = 0; i < mBakedTextureDatas.size(); i++ )
{
- mBakedTextureDatas[i].mLastTextureIndex = IMG_DEFAULT_AVATAR;
+ mBakedTextureDatas[i].mLastTextureID = IMG_DEFAULT_AVATAR;
mBakedTextureDatas[i].mTexLayerSet = NULL;
mBakedTextureDatas[i].mIsLoaded = false;
mBakedTextureDatas[i].mIsUsed = false;
diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h
index abe3599685..11ea5e5a46 100755
--- a/indra/llappearance/llavatarappearance.h
+++ b/indra/llappearance/llavatarappearance.h
@@ -308,7 +308,7 @@ protected:
typedef std::deque<LLMaskedMorph *> morph_list_t;
struct BakedTextureData
{
- LLUUID mLastTextureIndex;
+ LLUUID mLastTextureID;
LLTexLayerSet* mTexLayerSet; // Only exists for self
bool mIsLoaded;
bool mIsUsed;
diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp
index 01184a9e23..1f7e8b8652 100755
--- a/indra/llappearance/lldriverparam.cpp
+++ b/indra/llappearance/lldriverparam.cpp
@@ -190,6 +190,7 @@ BOOL LLDriverParam::setInfo(LLDriverParamInfo *info)
// FIXME DRANO this clobbers mWearablep, which means any code
// currently using mWearablep is wrong, or at least untested.
*new_param = *this;
+ //new_param->mWearablep = wearable;
// new_param->mDriven.clear(); // clear driven list to avoid overwriting avatar driven params from wearables.
return new_param;
}
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index b8c8228f85..a8bbbdbc06 100644..100755
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -48,9 +48,6 @@
using namespace LLAvatarAppearanceDefines;
-static const S32 BAKE_UPLOAD_ATTEMPTS = 7;
-static const F32 BAKE_UPLOAD_RETRY_DELAY = 2.f; // actual delay grows by power of 2 each attempt
-
// runway consolidate
extern std::string self_av_string();
@@ -148,6 +145,8 @@ BOOL LLTexLayerSetBuffer::renderTexLayerSet()
bool use_shaders = LLGLSLShader::sNoFixedFunction;
+ LLGLEnable(GL_ALPHA_TEST);
+
if (use_shaders)
{
gAlphaMaskProgram.bind();
@@ -155,7 +154,7 @@ BOOL LLTexLayerSetBuffer::renderTexLayerSet()
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.004f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f);
}
LLVertexBuffer::unbind();
@@ -395,6 +394,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
LLGLSUIDefault gls_ui;
LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE);
gGL.setColorMask(true, true);
+ LLGLEnable(GL_ALPHA_TEST);
// clear buffer area to ensure we don't pick up UI elements
{
@@ -406,7 +406,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.0f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -421,7 +421,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.004f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f);
}
}
@@ -455,7 +455,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.0f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -471,7 +471,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.004f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f);
}
}
@@ -564,6 +564,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
gGL.setColorMask(false, true);
gGL.setSceneBlendType(LLRender::BT_REPLACE);
+ LLGLEnable(GL_ALPHA_TEST);
// (Optionally) replace alpha with a single component image from a tga file.
if (!info->mStaticAlphaFileName.empty())
@@ -592,7 +593,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.0f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -607,7 +608,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.004f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f);
}
}
@@ -1117,6 +1118,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
//gPipeline.disableLights();
stop_glerror();
glDisable(GL_LIGHTING);
+ LLGLEnable(GL_ALPHA_TEST);
stop_glerror();
bool use_shaders = LLGLSLShader::sNoFixedFunction;
@@ -1211,7 +1213,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.0f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f);
}
}
@@ -1232,7 +1234,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.004f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f);
}
}
@@ -1274,7 +1276,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.0f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -1286,7 +1288,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.004f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f);
}
}
@@ -1376,6 +1378,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
gGL.flush();
bool use_shaders = LLGLSLShader::sNoFixedFunction;
+ LLGLEnable(GL_ALPHA_TEST);
if( !getInfo()->mStaticImageFileName.empty() )
{
@@ -1389,7 +1392,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.0f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f);
}
gGL.getTexUnit(0)->bind(tex, TRUE);
@@ -1401,7 +1404,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.004f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f);
}
}
else
@@ -1423,7 +1426,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.0f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f);
}
gGL.getTexUnit(0)->bind(tex);
@@ -1436,7 +1439,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.004f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f);
}
}
}
@@ -1459,6 +1462,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
llassert( !mParamAlphaList.empty() );
bool use_shaders = LLGLSLShader::sNoFixedFunction;
+ LLGLEnable(GL_ALPHA_TEST);
if (use_shaders)
{
@@ -1466,7 +1470,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.0f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f);
}
@@ -1551,7 +1555,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
else
{
- glAlphaFunc(GL_GEQUAL, 0.004f);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f);
}
LLGLSUIDefault gls_ui;