diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-12-16 14:58:56 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-12-16 14:58:56 +0100 |
commit | ea08fea654b4702a77f623b74137fabc7d6800d8 (patch) | |
tree | 7550e20704ee9a93e6b1ea95d72563250956ac17 /src/zoom.cpp | |
parent | a407f8b9edbc7a6e865b2daf65b2a6cd10edd2d7 (diff) | |
download | zoom++-ea08fea654b4702a77f623b74137fabc7d6800d8.tar zoom++-ea08fea654b4702a77f623b74137fabc7d6800d8.zip |
Use perspective projection matrix without far clipping plane.
Diffstat (limited to 'src/zoom.cpp')
-rw-r--r-- | src/zoom.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/zoom.cpp b/src/zoom.cpp index d9df6d4..b222286 100644 --- a/src/zoom.cpp +++ b/src/zoom.cpp @@ -18,9 +18,11 @@ */ #include "Game.h" +#include "MathUtil.h" #include "config.h" #include "gl.h" + #ifdef _WIN32 #else #include <iostream> @@ -38,8 +40,7 @@ void resize(int width, int height) glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(50.0f, (GLfloat)width/(GLfloat)height, 0.1, 1000); + glLoadMatrixf(Zoom::MathUtil::perspective(50.0f, (float)width/(float)height, 0.1).array); glMatrixMode(GL_MODELVIEW); |