summaryrefslogtreecommitdiffstats
path: root/demos/boxes/glbuffers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'demos/boxes/glbuffers.cpp')
-rw-r--r--demos/boxes/glbuffers.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/demos/boxes/glbuffers.cpp b/demos/boxes/glbuffers.cpp
index 694d05b..84ab26c 100644
--- a/demos/boxes/glbuffers.cpp
+++ b/demos/boxes/glbuffers.cpp
@@ -42,6 +42,16 @@
#include "glbuffers.h"
#include <QtGui/qmatrix4x4.h>
+
+void qgluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
+{
+ const GLdouble ymax = zNear * tan(fovy * M_PI / 360.0);
+ const GLdouble ymin = -ymax;
+ const GLdouble xmin = ymin * aspect;
+ const GLdouble xmax = ymax * aspect;
+ glFrustum(xmin, xmax, ymin, ymax, zNear, zFar);
+}
+
//============================================================================//
// GLTexture //
//============================================================================//