Added fix for MacOS X orbit display bug

ver1_5_1
Hank Ramsey 2003-07-17 04:03:39 +00:00
parent 18cb390fd5
commit daebb6f8ef
1 changed files with 2 additions and 1 deletions

View File

@ -915,7 +915,8 @@ void Renderer::renderOrbits(PlanetarySystem* planets,
glLoadIdentity();
gluPerspective(fov,
(float) windowWidth / (float) windowHeight,
farDistance * 1e-6f, farDistance * 1.1f);
max( farDistance * 1e-6f, (float)(1e-5/2./tan(fov*3.14159/360.0)) ),
farDistance * 1.1f );
glMatrixMode(GL_MODELVIEW);
renderOrbit(body, t);