From: mittorn Date: Fri, 20 Oct 2017 03:04:51 +0000 (+0700) Subject: Apply glColor when disabling color array X-Git-Url: http://deadsoftware.ru/gitweb?p=nanogl.git;a=commitdiff_plain;h=0e9592776617e9e83e7af878035f69fe7b5c094a Apply glColor when disabling color array --- diff --git a/nanoWrap.cpp b/nanoWrap.cpp index 0e997fe..b909738 100644 --- a/nanoWrap.cpp +++ b/nanoWrap.cpp @@ -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,