From 0ab4e112231878d1bd356f0cb3f672564697eaf7 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 8 Oct 2013 14:43:10 -0500 Subject: Fix for random bad colors in UI on Intel HD 4000 --- indra/llrender/llrender.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/llrender') 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) { -- cgit v1.2.3 From dfa6822b3464fbf0d778b524c867bc7329121b4a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 30 Oct 2013 14:26:11 +0200 Subject: MAINT-3359 Don't check for LLGLSLShader::sNoFixedFunction as we don't want to loose ui colours(depending on enabled/disabled basic shader). --- indra/llrender/llrender.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/llrender') diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 41301b6c85..b481cf7095 100755 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -2196,9 +2196,8 @@ void LLRender::texCoord2fv(const GLfloat* tc) void LLRender::color4ub(const GLubyte& r, const GLubyte& g, const GLubyte& b, const GLubyte& a) { - if (LLGLSLShader::sNoFixedFunction && - (!LLGLSLShader::sCurBoundShaderPtr || - LLGLSLShader::sCurBoundShaderPtr->mAttributeMask & LLVertexBuffer::MAP_COLOR)) + if (!LLGLSLShader::sCurBoundShaderPtr || + LLGLSLShader::sCurBoundShaderPtr->mAttributeMask & LLVertexBuffer::MAP_COLOR) { mColorsp[mCount] = LLColor4U(r,g,b,a); } -- cgit v1.2.3