Merge pull request #4077 from huffman/fix-render-hud-windows-linux

Fix gl projection matrix stack overflow when rendering to HUD
This commit is contained in:
Clément Brisset 2015-01-12 16:22:09 -08:00
commit 60aafba0ce

View file

@ -197,19 +197,23 @@ void ApplicationOverlay::renderOverlay(bool renderToTexture) {
const float FAR_CLIP = 10000;
glLoadIdentity();
glOrtho(0, glCanvas->width(), glCanvas->height(), 0, NEAR_CLIP, FAR_CLIP);
glMatrixMode(GL_MODELVIEW);
renderAudioMeter();
renderStatsAndLogs();
// give external parties a change to hook in
emit application->renderingOverlay();
overlays.renderHUD();
renderPointers();
renderDomainConnectionStatusBorder();
glMatrixMode(GL_PROJECTION);
} glPopMatrix();
glMatrixMode(GL_MODELVIEW);