mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Fix gl projection matrix stack overflow when rendering to HUD
The projection matrix stack is considerably smaller than the modelview stack and was overflowing on Windows and Linux machines that were tested.
This commit is contained in:
parent
f18594cfdb
commit
e00b629133
1 changed files with 10 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue