Fix T49520: broken vertex colors in the game engine.
This commit is contained in:
parent
fd2bffd22e
commit
641e586b15
Notes:
blender-bot
2023-02-14 09:19:09 +01:00
Referenced by issue #49918, Make duplicates real crash on clicking operator toggles Referenced by issue #49576, Cycles hangs with normal map node Referenced by issue #49520, Vertex Colour Broken in GLSL mode
|
@ -171,7 +171,7 @@ void RAS_StorageVA::TexCoordPtr(const RAS_TexVert *tv)
|
|||
glVertexAttribPointerARB(unit, 4, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getTangent());
|
||||
break;
|
||||
case RAS_IRasterizer::RAS_TEXCO_VCOL:
|
||||
glVertexAttribPointerARB(unit, 4, GL_UNSIGNED_BYTE, GL_FALSE, sizeof(RAS_TexVert), tv->getRGBA());
|
||||
glVertexAttribPointerARB(unit, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(RAS_TexVert), tv->getRGBA());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -149,6 +149,9 @@ void VBO::Draw(int texco_num, RAS_IRasterizer::TexCoGen* texco, int attrib_num,
|
|||
glVertexAttribPointerARB(unit, 4, GL_FLOAT, GL_FALSE, this->stride, this->tangent_offset);
|
||||
glEnableVertexAttribArrayARB(unit);
|
||||
break;
|
||||
case RAS_IRasterizer::RAS_TEXCO_VCOL:
|
||||
glVertexAttribPointerARB(unit, 4, GL_UNSIGNED_BYTE, GL_TRUE, this->stride, this->color_offset);
|
||||
glEnableVertexAttribArrayARB(unit);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue