Skip to content

Commit

Permalink
flush: correctly reset marking states to not cause integer overflow i…
Browse files Browse the repository at this point in the history
…n pglEnd
  • Loading branch information
a1batross committed Mar 29, 2020
1 parent b5a0564 commit 5a22eab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nanoWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,12 @@ void FlushOnStateChange( )
#if defined( __MULTITEXTURE_SUPPORT__ )
useMultiTexCoordArray = GL_FALSE;
#endif
vertexCount = 0;
indexCount = 0;
ptrVertexAttribArray = vertexattribs;
ptrVertexAttribArrayMark = ptrVertexAttribArray;
vertexMark = vertexCount = 0;
indexbase = indexCount = 0;
ptrVertexAttribArrayMark = ptrVertexAttribArray = vertexattribs;

ptrIndexArray = indexArray;

useTexCoordArray = GL_FALSE;
}
void nanoGL_Flush( )
Expand Down

0 comments on commit 5a22eab

Please sign in to comment.