diff options
Diffstat (limited to 'indra/llrender')
-rwxr-xr-x | indra/llrender/llfontfreetype.cpp | 1 | ||||
-rwxr-xr-x | indra/llrender/llrender.cpp | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index bde62f89b3..25b1c533c1 100755 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -126,6 +126,7 @@ LLFontFreetype::~LLFontFreetype() // Delete glyph info std::for_each(mCharGlyphInfoMap.begin(), mCharGlyphInfoMap.end(), DeletePairedPointer()); + mCharGlyphInfoMap.clear(); delete mFontBitmapCachep; // mFallbackFonts cleaned up by LLPointer destructor diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 8e47802fea..388d3a4f1a 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) { |