]> Pileus Git - grits/blobdiff - src/plugins/sat.c
Lazy tile splitting
[grits] / src / plugins / sat.c
index 4856ae65b81acb07b420b55bbccf61f19d463082..abe0b24fbb69640c9c560aaf557debd85076ae00 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/**
+ * SECTION:sat
+ * @short_description: Satellite plugin
+ *
+ * #GisPluginSat provides overlays using satellite imagery. This is mostly
+ * provided by NASA's Blue Marble Next Generation.
+ */
+
 #include <time.h>
 #include <glib/gstdio.h>
 #include <GL/gl.h>
@@ -55,10 +63,10 @@ static gboolean _load_tile_cb(gpointer _data)
        glPixelStorei(GL_PACK_ALIGNMENT, 1);
        glTexImage2D(GL_TEXTURE_2D, 0, 4, width, height, 0,
                        (alpha ? GL_RGBA : GL_RGB), GL_UNSIGNED_BYTE, pixels);
-       glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-       glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
+       glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+       glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
        glFlush();
 
        tile->data = tex;
@@ -129,6 +137,14 @@ static void _on_location_changed(GisViewer *viewer,
 /***********
  * Methods *
  ***********/
+/**
+ * gis_plugin_sat_new:
+ * @viewer: the #GisViewer to use for drawing
+ *
+ * Create a new instance of the satellite plugin.
+ *
+ * Returns: the new #GisPluginSat
+ */
 GisPluginSat *gis_plugin_sat_new(GisViewer *viewer)
 {
        g_debug("GisPluginSat: new");