DEADSOFTWARE

Apply glColor when disabling color array
authormittorn <mittorn@sibmail.com>
Fri, 20 Oct 2017 03:04:51 +0000 (10:04 +0700)
committermittorn <mittorn@sibmail.com>
Fri, 20 Oct 2017 03:04:51 +0000 (10:04 +0700)
nanoWrap.cpp

index 0e997fe783b5cfd83a7d7b6112111472c25d3f6b..b9097386b430fd2920a8f23e63a567b96f2292b1 100644 (file)
@@ -1913,6 +1913,9 @@ void glDrawElements( GLenum mode, GLsizei count, GLenum type, const GLvoid *indi
                else
                {
                        glEsImpl->glDisableClientState( GL_COLOR_ARRAY );
+                       glEsImpl->glColor4f( currentVertexAttrib.red/255.0f, currentVertexAttrib.green/255.0f,
+                                       currentVertexAttrib.blue/255.0f, currentVertexAttrib.alpha/255.0f );
+
                }
                glEsImpl->glColorPointer( tmuState0.color_array.size,
                                          tmuState0.color_array.type,
@@ -2385,6 +2388,9 @@ void glDrawArrays( GLenum mode, GLint first, GLsizei count )
                else
                {
                        glEsImpl->glDisableClientState( GL_COLOR_ARRAY );
+                       glEsImpl->glColor4f( currentVertexAttrib.red/255.0f, currentVertexAttrib.green/255.0f,
+                                       currentVertexAttrib.blue/255.0f, currentVertexAttrib.alpha/255.0f );
+
                }
                glEsImpl->glColorPointer( tmuState0.color_array.size,
                                          tmuState0.color_array.type,