p3/regal — pull request #47 by adhoc-bobcat (2013-02-14 00:49:39+00:00)
Title: Invalidate the Fixed Function State on glPopMatrix

Under a sequence like:

// Render some geometry

glMatrixMode(GL_PROJECTION);
glPushMatrix();
glOrtho( /* for rendering a HUD/overlay in screen space */ )
// Render the overlay
glPopMatrix();

// Render some more geometry

... I found that the glOrtho call was unexpectedly affecting the
rendering of subsequent geometry.

I traced it down to a issue in the Regal code, where the fixed function
emulation shader uniform state was not being invalidated when performing
the glPopMatrix, so it would go on using the incorrect matrix.

Note this also affected other matrix modes, not just GL_PROJECTION.

This patch is the one line fix needed to invalidate the state so the
proper matricies are loaded.

Sorry, I didn't feel like adding a whole new unit test file for a one
line change.