a little hackery when in view frustum mode so we can see the frustum without OpenGL clipping us

This commit is contained in:
ZappoMan 2013-04-15 18:11:23 -07:00
parent 47a4211257
commit faf57d9fa8

View file

@ -1471,8 +1471,15 @@ void reshape(int width, int height)
glLoadIdentity();
// XXXBHG - If we're in view frustum mode, then we need to do this little bit of hackery so that
// OpenGL won't clip our frustum rendering lines. This is a debug hack for sure!
if (::frustumOn) {
nearClip -= 0.01f;
farClip += 0.01f;
}
// On window reshape, we need to tell OpenGL about our new setting
gluPerspective(fov,aspectRatio,nearClip-0.01f,farClip+0.01f);
gluPerspective(fov,aspectRatio,nearClip,farClip);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();