]> Pileus Git - grits/blobdiff - src/grits-opengl.c
Fix clipping plane issues
[grits] / src / grits-opengl.c
index dc13ea2411bbdcb6eb482b1efb95032b4a1064cd..323e7f34b67e2d03dfc57aab84fe2a05d84309dc 100644 (file)
@@ -69,8 +69,8 @@ static void _set_visuals(GritsOpenGL *opengl)
        double height = GTK_WIDGET(opengl)->allocation.height;
        double ang    = atan(height/FOV_DIST);
        double atmos  = 100000;
-       double near   = MAX(elev - atmos, 10);    // View 100km of atmosphere
-       double far    = elev + 2*EARTH_R + atmos; // on both sides of the earth
+       double near   = MAX(elev*0.75 - atmos, 50); // View 100km of atmosphere
+       double far    = elev + 2*EARTH_R + atmos;   // on both sides of the earth
 
        grits_viewer_get_location(GRITS_VIEWER(opengl), &lat, &lon, &elev);
        glViewport(0, 0, width, height);