summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2014-03-10 20:34:43 -0400
committerMonty Brandenberg <monty@lindenlab.com>2014-03-10 20:34:43 -0400
commit9c29000ba2f8192985ad0bf20889739ad12dd569 (patch)
tree3670a18100453ef589a04d40da5aa314b99f5d11 /indra/llrender/llrender.cpp
parent71e237a3f79cd90b432205460fe6e5c6b536d9db (diff)
parentcb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff)
Merge. Refresh from viewer-release after 3.7.3 release.
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rwxr-xr-xindra/llrender/llrender.cpp10
1 files changed, 9 insertions, 1 deletions
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)
{