mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 02:37:00 +02:00
a little hackery when in view frustum mode so we can see the frustum without OpenGL clipping us
This commit is contained in:
parent
47a4211257
commit
faf57d9fa8
1 changed files with 8 additions and 1 deletions
|
@ -1471,8 +1471,15 @@ void reshape(int width, int height)
|
||||||
|
|
||||||
glLoadIdentity();
|
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
|
// 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);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|
Loading…
Reference in a new issue