Skip to content

Commit

Permalink
gl2shim: fix wrong color vertex
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Toroshchin committed Oct 12, 2023
1 parent c6fc82c commit 573aa32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ref/gl/gl2_shim/gl2_shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ static void APIENTRY GL2_Vertex3f( GLfloat x, GLfloat y, GLfloat z )
*p++ = x;
*p++ = y;
*p++ = z;
++gl2wrap.end;

if(gl2wrap.cur_flags & 1 << GL2_ATTR_COLOR)
{
GLfloat *p = gl2wrap.attrbuf[GL2_ATTR_COLOR] + gl2wrap.end * 4;
Expand All @@ -1018,6 +1018,7 @@ static void APIENTRY GL2_Vertex3f( GLfloat x, GLfloat y, GLfloat z )
*p++ = gl2wrap.color[2];
*p++ = gl2wrap.color[3];
}
++gl2wrap.end;
if ( gl2wrap.end - gl2wrap.begin >= MAX_BEGINEND_VERTS )
{
GLenum prim = gl2wrap.prim;
Expand Down

0 comments on commit 573aa32

Please sign in to comment.