]> Pileus Git - aweather/blobdiff - src/plugins/radar.c
Update copyright and email address
[aweather] / src / plugins / radar.c
index 5a1fcef46953db91614d020cba8066ac7e4bfc25..55cebdb0c4a36289231a52708695411a0bfd406b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
+ * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -56,7 +56,7 @@ static void _bscan_sweep(GisPluginRadar *self, Sweep *sweep, colormap_t *colorma
                        buf[buf_i+0] = colormap->data[val][0];
                        buf[buf_i+1] = colormap->data[val][1];
                        buf[buf_i+2] = colormap->data[val][2];
-                       buf[buf_i+3] = colormap->data[val][3]; // TESTING
+                       buf[buf_i+3] = colormap->data[val][3]/2; // TESTING
                        if (val == BADVAL     || val == RFVAL      || val == APFLAG ||
                            val == NOTFOUND_H || val == NOTFOUND_V || val == NOECHO) {
                                buf[buf_i+3] = 0x00; // transparent
@@ -314,10 +314,6 @@ static void _load_radar(GisPluginRadar *self, gchar *radar_file)
        _load_radar_gui(self, radar);
 }
 
-
-/*****************
- * ASync helpers *
- *****************/
 typedef struct {
        GisPluginRadar *self;
        gchar *radar_file;
@@ -539,14 +535,16 @@ static gpointer _draw_radar(GisCallback *callback, gpointer _self)
 
        glDisable(GL_ALPHA_TEST);
        glDisable(GL_CULL_FACE);
-       glDisable(GL_DEPTH_TEST);
        glDisable(GL_LIGHTING);
        glEnable(GL_TEXTURE_2D);
+       glEnable(GL_POLYGON_OFFSET_FILL);
+       glPolygonOffset(1.0, -2.0);
        glColor4f(1,1,1,1);
 
        /* Draw the rays */
        glBindTexture(GL_TEXTURE_2D, self->cur_sweep_tex);
-       glBegin(GL_QUAD_STRIP);
+       g_message("Tex = %d", self->cur_sweep_tex);
+       glBegin(GL_TRIANGLE_STRIP);
        for (int ri = 0; ri <= sweep->h.nrays; ri++) {
                Ray  *ray = NULL;
                double angle = 0;