double width = GTK_WIDGET(opengl)->allocation.width;
double height = GTK_WIDGET(opengl)->allocation.height;
- double ang = atan(height/FOV_DIST);
+ double ang = atan((height/2)/FOV_DIST)*2;
double atmos = 100000;
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
gdouble *lat, gdouble *lon, gdouble *elev)
{
GritsOpenGL *opengl = GRITS_OPENGL(_opengl);
+ if (!opengl->sphere->view)
+ return;
gdouble x, y, z;
if (pz < 0) {
gfloat tmp = 0;