History

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

ZappoMan committed 13 years ago

Commit faf57d91 parent 47a42111 file · +8 −1Browse files

Showing the changes to interface/src/main.cpp (1 of 1 file). Show all

Unified · Split

interface/src/main.cpp+8−1
@@ -1471,8 +1471,15 @@ void reshape(int width, int height) · 1470 unmodified lines
14711471
14721472 glLoadIdentity();
14731473
1474+ // XXXBHG - If we're in view frustum mode, then we need to do this little bit of hackery so that
1475+ // OpenGL won't clip our frustum rendering lines. This is a debug hack for sure!
1476+ if (::frustumOn) {
1477+ nearClip -= 0.01f;
1478+ farClip += 0.01f;
1479+ }
1480+
14741481 // On window reshape, we need to tell OpenGL about our new setting
1475− gluPerspective(fov,aspectRatio,nearClip-0.01f,farClip+0.01f);
1482+ gluPerspective(fov,aspectRatio,nearClip,farClip);
14761483
14771484 glMatrixMode(GL_MODELVIEW);
14781485 glLoadIdentity();