/* Misc */
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glClearColor(0.8f, 0.8f, 1.0f, 0.0f);
+ glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
/* Tessellation, "finding intersecting triangles" */
/* http://research.microsoft.com/pubs/70307/tr-2006-81.pdf */
double width = da->allocation.width;
double height = da->allocation.height;
double dist = 500*1000; // 500 km
+ double cam = 300*1000; // 500 km
glViewport(0, 0, width, height);
glLoadIdentity();
double rad = atan(height/2*1000.0/dist); // 1px = 1000 meters
double deg = (rad*180)/M_PI;
- gluPerspective(deg*2, width/height, dist-20, dist+20);
+ gluPerspective(deg*2, width/height, cam-20, cam+20);
/* Camera position? */
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- glTranslatef(0.0, 0.0, -dist);
+ glTranslatef(0.0, 0.0, -cam);
//glRotatef(-45, 1, 0, 0);
aweather_gui_gl_end(gui);
g_signal_handlers_block_by_func(combo, G_CALLBACK(on_site_changed), gui);
gtk_combo_box_set_active_iter(combo, &iter2);
g_signal_handlers_unblock_by_func(combo, G_CALLBACK(on_site_changed), gui);
+ g_free(text);
return;
}
+ g_free(text);
}
}
}