diff options
author | Dave Parks <davep@lindenlab.com> | 2013-10-08 14:43:10 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-10-08 14:43:10 -0500 |
commit | 0ab4e112231878d1bd356f0cb3f672564697eaf7 (patch) | |
tree | 270349e072586e80e8f190eca781b0fc26fdf313 /indra/llrender | |
parent | 954c8fb1e3c47b3ebf219f97129e5c6e9bf911b8 (diff) |
Fix for random bad colors in UI on Intel HD 4000
Diffstat (limited to 'indra/llrender')
-rwxr-xr-x | indra/llrender/llrender.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 0ac30b4d63..41301b6c85 100755 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -2196,7 +2196,16 @@ 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::sNoFixedFunction && + (!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) { |