From 0e9592776617e9e83e7af878035f69fe7b5c094a Mon Sep 17 00:00:00 2001 From: mittorn Date: Fri, 20 Oct 2017 10:04:51 +0700 Subject: [PATCH] Apply glColor when disabling color array --- nanoWrap.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- 2.29.2