opnsense-ports/graphics/reallyslick/files/patch-src__hyperspace.cpp
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

17 lines
548 B
C++

--- src/hyperspace.cpp.orig 2009-05-17 07:41:52.000000000 +0900
+++ src/hyperspace.cpp 2009-05-21 18:05:29.000000000 +0900
@@ -144,6 +144,14 @@
first = 0;
}
+ aspectRatio = float(XStuff->windowWidth) / float(XStuff->windowHeight);
+ glViewport(0, 0, XStuff->windowWidth, XStuff->windowHeight);
+
+ // setup projection matrix
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ gluPerspective(float(dFov), aspectRatio, 0.001f, 200.0f);
+ glGetDoublev(GL_PROJECTION_MATRIX, projMat);
glMatrixMode(GL_MODELVIEW);
// Camera movements