From: Andy Spencer Date: Mon, 6 Feb 2012 05:50:00 +0000 (+0000) Subject: Update objects for new Grits expose settings X-Git-Tag: v0.7~10 X-Git-Url: http://pileus.org/git/?p=aweather;a=commitdiff_plain;h=61b0ab034c38090b9b39822e0ce0d39b77d4cf15 Update objects for new Grits expose settings All objects are drawn with sorting (depth testing) disabled except for the Level-II sweeps and volume scans. The order things appear is determined based on the level they are drawn in since depth testing works across levels now. The order is as follows, from lowest to highest: WORLD+1 - Counties outlines - no depth test WORLD+1 - County-based warnings - no depth test WORLD+2 - Conus radar overlays - no depth test WORLD+3 - Level-II radar sweeps - depth test enabled WORLD+4 - Storm-based warnings - no depth test WORLD+5 - Level-II Volume scans - depth test enabled OVERLAY - Level-II site markers - no depth test HUD - Level-II color table - no depth test The advantage to this order is that: - County-based warnings do not effect the radar colors - Level-II sweeps do not hide storm-based warnings - Storm based warnings don't show through volume scans --- diff --git a/src/plugins/alert.c b/src/plugins/alert.c index a82528b..ee9b143 100644 --- a/src/plugins/alert.c +++ b/src/plugins/alert.c @@ -575,7 +575,7 @@ static GritsPoly *_load_storm_based(GritsPluginAlert *alert, AlertMsg *msg) GritsPoly *poly = grits_poly_parse(msg->polygon, "\t", " ", ","); _load_common(alert, msg, poly, 0, 1, 3, "alert/hide_storm_based"); - grits_viewer_add(alert->viewer, GRITS_OBJECT(poly), GRITS_LEVEL_WORLD+2, TRUE); + grits_viewer_add(alert->viewer, GRITS_OBJECT(poly), GRITS_LEVEL_WORLD+4, FALSE); return poly; } diff --git a/src/plugins/level2.c b/src/plugins/level2.c index c6b7194..7a4bb44 100644 --- a/src/plugins/level2.c +++ b/src/plugins/level2.c @@ -323,7 +323,7 @@ void aweather_level2_set_iso(AWeatherLevel2 *level2, gfloat level) vol->disp = GRITS_VOLUME_SURFACE; GRITS_OBJECT(vol)->center = GRITS_OBJECT(level2)->center; grits_viewer_add(GRITS_OBJECT(level2)->viewer, - GRITS_OBJECT(vol), GRITS_LEVEL_WORLD+1, FALSE); + GRITS_OBJECT(vol), GRITS_LEVEL_WORLD+5, TRUE); level2->volume = vol; } if (ISO_MIN < level && level < ISO_MAX) { diff --git a/src/plugins/radar.c b/src/plugins/radar.c index 016aa91..a79afb1 100644 --- a/src/plugins/radar.c +++ b/src/plugins/radar.c @@ -182,7 +182,7 @@ gpointer _site_update_thread(gpointer _site) } grits_object_hide(GRITS_OBJECT(site->level2), site->hidden); grits_viewer_add(site->viewer, GRITS_OBJECT(site->level2), - GRITS_LEVEL_WORLD+1, TRUE); + GRITS_LEVEL_WORLD+3, TRUE); out: g_idle_add(_site_update_end, site); @@ -572,8 +572,8 @@ RadarConus *radar_conus_new(GtkWidget *pconfig, conus->tile[1] = grits_tile_new(NULL, CONUS_NORTH, south, east, mid); conus->tile[0]->zindex = 2; conus->tile[1]->zindex = 1; - grits_viewer_add(viewer, GRITS_OBJECT(conus->tile[0]), GRITS_LEVEL_WORLD, TRUE); - grits_viewer_add(viewer, GRITS_OBJECT(conus->tile[1]), GRITS_LEVEL_WORLD, TRUE); + grits_viewer_add(viewer, GRITS_OBJECT(conus->tile[0]), GRITS_LEVEL_WORLD+2, FALSE); + grits_viewer_add(viewer, GRITS_OBJECT(conus->tile[1]), GRITS_LEVEL_WORLD+2, FALSE); conus->time_id = g_signal_connect_swapped(viewer, "time-changed", G_CALLBACK(_conus_update), conus);