From 4bb7a8dab78487fb967ea48dbd238b08f441dcdc Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 14 Aug 2012 22:16:55 -0400 Subject: [PATCH] fix GL projection matrix adjustment on window resize --- src/client/Client.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/Client.cc b/src/client/Client.cc index 1d2af11..de002e4 100755 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -75,5 +75,8 @@ void Client::resize_window(int width, int height) { glViewport(0, 0, width, height); float aspect = (float)width / (float)height; + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); glOrtho(-1.2 * aspect, 1.2 * aspect, -1.2, 1.2, 1, -1); + glMatrixMode(GL_MODELVIEW); }