summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-03-12 17:24:07 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-03-12 17:24:07 -0400
commitd9e3a2948af710741c99014bef03e8d97f69804c (patch)
tree98ed67f97cb6522f80c3720b4d1ae623e4c5920f /indra/llrender
parent895d52a399739962c38ddf571e57f85362823dff (diff)
parentcb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff)
merge
Diffstat (limited to 'indra/llrender')
-rwxr-xr-xindra/llrender/llfontfreetype.cpp1
-rwxr-xr-xindra/llrender/llrender.cpp10
2 files changed, 10 insertions, 1 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 058bef43a5..84c782e958 100755
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -125,6 +125,7 @@ LLFontFreetype::~LLFontFreetype()
// Delete glyph info
std::for_each(mCharGlyphInfoMap.begin(), mCharGlyphInfoMap.end(), DeletePairedPointer());
+ mCharGlyphInfoMap.clear();
// mFontBitmapCachep will be cleaned up by LLPointer destructor.
// mFallbackFonts cleaned up by LLPointer destructor
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 0ac30b4d63..b481cf7095 100755
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -2196,7 +2196,15 @@ void LLRender::texCoord2fv(const GLfloat* tc)
void LLRender::color4ub(const GLubyte& r, const GLubyte& g, const GLubyte& b, const GLubyte& a)
{
- mColorsp[mCount] = LLColor4U(r,g,b,a);
+ if (!LLGLSLShader::sCurBoundShaderPtr ||
+ LLGLSLShader::sCurBoundShaderPtr->mAttributeMask & LLVertexBuffer::MAP_COLOR)
+ {
+ mColorsp[mCount] = LLColor4U(r,g,b,a);
+ }
+ else
+ { //not using shaders or shader reads color from a uniform
+ diffuseColor4ub(r,g,b,a);
+ }
}
void LLRender::color4ubv(const GLubyte* c)
{