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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -356,7 +356,7 @@ void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4& color)
|
||||
|
||||
void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4U& color)
|
||||
{
|
||||
glColor4ubv(color.mV);
|
||||
gGL.diffuseColor4ubv(color.mV);
|
||||
}
|
||||
|
||||
void LLFacePool::LLOverrideFaceColor::setColor(F32 r, F32 g, F32 b, F32 a)
|
||||
|
||||
Reference in New Issue
Block a user