#include <glib/gstdio.h>
#include <GL/gl.h>
-#include <gis.h>
+#include <grits.h>
#include "elev.h"
/* Do necessasairy processing */
/* TODO: Lock this and move to thread, can remove elev from _load then */
if (LOAD_BIL)
- gis_viewer_set_height_func(elev->viewer, tile, _height_func, elev, TRUE);
+ gis_viewer_set_height_func(elev->viewer, &tile->edge, _height_func, elev, TRUE);
/* Cleanup unneeded things */
if (!LOAD_BIL)
}
static void _free_tile(GisTile *tile, gpointer _elev)
{
- GisPluginElev *elev = _elev;
g_debug("GisPluginElev: _free_tile: %p", tile->data);
if (tile->data)
g_idle_add_full(G_PRIORITY_LOW, _free_tile_cb, tile->data, NULL);
GisPluginElev *elev = _elev;
if (!g_mutex_trylock(elev->mutex))
return NULL;
- gdouble lat, lon, elevation;
- gis_viewer_get_location(elev->viewer, &lat, &lon, &elevation);
- gis_tile_update(elev->tiles,
+ GisPoint eye;
+ gis_viewer_get_location(elev->viewer, &eye.lat, &eye.lon, &eye.elev);
+ gis_tile_update(elev->tiles, &eye,
MAX_RESOLUTION, TILE_WIDTH, TILE_WIDTH,
- lat, lon, elevation,
_load_tile, elev);
gis_tile_gc(elev->tiles, time(NULL)-10,
_free_tile, elev);