From 49f8ced0a3d9e7f28fbdc10d1476735efac1e507 Mon Sep 17 00:00:00 2001 From: masscat Date: Mon, 7 May 2007 22:58:12 +0000 Subject: [PATCH] Added glEnd for any primitive not ended at the completion of a scene. --- desmume/src/opengl_collector_3Demu.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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) {