From 1ef24e0404d354d3e102fac676b41a3c228d897c Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 24 Jan 2012 12:08:12 +0900 Subject: [PATCH] Fix a gl matrix stack overflow. I'd missed a couple of places for glPopMatrix (worse, one was push!). --- libs/video/renderer/gl/gl_sky_clip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/video/renderer/gl/gl_sky_clip.c b/libs/video/renderer/gl/gl_sky_clip.c index e99f0f390..37154014d 100644 --- a/libs/video/renderer/gl/gl_sky_clip.c +++ b/libs/video/renderer/gl/gl_sky_clip.c @@ -703,7 +703,7 @@ draw_black_sky_polys (const instsurf_t *sky_chain) p = p->next; } if (sc->transform) - qfglPushMatrix (); + qfglPopMatrix (); sc = sc->tex_chain; } qfglEnable (GL_TEXTURE_2D); @@ -845,6 +845,8 @@ R_DrawSkyChain (const instsurf_t *sky_chain) qfglEnd (); p = p->next; } + if (sc->transform) + qfglPopMatrix (); sc = sc->tex_chain; } }