Have LLRender::color4ub fall back to uniform if bound vbo lacks color attribute. Fixed fixed-function call in LLFacePool::LLOverrideFaceColor::setColor.

This commit is contained in:
Shyotl
2014-05-08 16:29:53 -05:00
parent 75b31b4151
commit e2a0f801b9
2 changed files with 10 additions and 2 deletions

View File

@@ -2199,7 +2199,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)
{