Skip to content

Commit

Permalink
UPBGE: Fix gl_Color.
Browse files Browse the repository at this point in the history
gl_Color is set as the vertex color of the first color layer,
this was broken by the addressu sage of RAS_DisplayArrayLayout::colors
instead of RAS_DisplayArrayLayout::colors[0].

Fix issue #784.
  • Loading branch information
panzergame committed Aug 10, 2018
1 parent f30d10d commit 26c128f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RAS_StorageVao::RAS_StorageVao(const RAS_DisplayArrayLayout &layout, RAS_Display
glNormalPointer(GL_FLOAT, 0, (const void *)layout.normal);

glEnableClientState(GL_COLOR_ARRAY);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, (const void *)layout.colors);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, (const void *)layout.colors[0]);

for (const RAS_AttributeArray::Attrib& attrib : attribList) {
const RAS_AttributeArray::AttribType type = attrib.m_type;
Expand Down

0 comments on commit 26c128f

Please sign in to comment.