Skip to content

Commit

Permalink
KOTOR: Reset the projection matrix after rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius authored and DrMcCoy committed Nov 24, 2017
1 parent e92fdae commit 5a72258
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engines/kotor/gui/guibackground.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ void GUIBackground::render(Graphics::RenderPass pass) {
glDepthMask(GL_FALSE);

glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(0.0, _screenWidth, 0.0, _screenHeight, -1.0, 1.0);

Expand All @@ -94,6 +95,11 @@ void GUIBackground::render(Graphics::RenderPass pass) {

glPopMatrix();

glMatrixMode(GL_PROJECTION);
glPopMatrix();

glMatrixMode(GL_MODELVIEW);

glDepthMask(GL_TRUE);
glEnable(GL_DEPTH_TEST);
}
Expand Down

0 comments on commit 5a72258

Please sign in to comment.