Fix a gl matrix stack overflow.

I'd missed a couple of places for glPopMatrix (worse, one was push!).
This commit is contained in:
Bill Currie 2012-01-24 12:08:12 +09:00
parent 8448a8f332
commit 1ef24e0404

View file

@ -703,7 +703,7 @@ draw_black_sky_polys (const instsurf_t *sky_chain)
p = p->next; p = p->next;
} }
if (sc->transform) if (sc->transform)
qfglPushMatrix (); qfglPopMatrix ();
sc = sc->tex_chain; sc = sc->tex_chain;
} }
qfglEnable (GL_TEXTURE_2D); qfglEnable (GL_TEXTURE_2D);
@ -845,6 +845,8 @@ R_DrawSkyChain (const instsurf_t *sky_chain)
qfglEnd (); qfglEnd ();
p = p->next; p = p->next;
} }
if (sc->transform)
qfglPopMatrix ();
sc = sc->tex_chain; sc = sc->tex_chain;
} }
} }