diff --git a/desmume/src/opengl_collector_3Demu.c b/desmume/src/opengl_collector_3Demu.c index 74a466f03..c28f20732 100644 --- a/desmume/src/opengl_collector_3Demu.c +++ b/desmume/src/opengl_collector_3Demu.c @@ -1,4 +1,4 @@ -/* $Id: opengl_collector_3Demu.c,v 1.13 2007-05-07 21:25:32 masscat Exp $ +/* $Id: opengl_collector_3Demu.c,v 1.14 2007-05-07 22:58:12 masscat Exp $ */ /* Copyright (C) 2006-2007 Ben Jaques, shash @@ -2002,6 +2002,16 @@ draw_3D_area( void) { } } + /* + * Complete any primitive that may be left unended + */ + if ( inside_primitive) { + LOG( "implicit primitive end at end\n"); + glEnd(); + + inside_primitive = 0; + } + complete_render_ogl_collector_platform(); if ((errCode = glGetError()) != GL_NO_ERROR) {