grits
10 years agoDocument GisOpenGL
Andy Spencer [Mon, 8 Feb 2010 22:26:13 +0000 (22:26 +0000)]
Document GisOpenGL

10 years agoDocument GisViewer
Andy Spencer [Mon, 8 Feb 2010 22:24:41 +0000 (22:24 +0000)]
Document GisViewer

10 years agoMiscellaneous updates, mostly aesthetic
Andy Spencer [Mon, 8 Feb 2010 22:20:49 +0000 (22:20 +0000)]
Miscellaneous updates, mostly aesthetic

10 years agoReplace ugly macros with ugly boilerplate
Andy Spencer [Mon, 8 Feb 2010 22:07:08 +0000 (22:07 +0000)]
Replace ugly macros with ugly boilerplate

10 years agoAdd man page for gis-demo
Andy Spencer [Mon, 8 Feb 2010 11:28:53 +0000 (11:28 +0000)]
Add man page for gis-demo

10 years agoConvert self to real names
Andy Spencer [Mon, 8 Feb 2010 10:47:06 +0000 (10:47 +0000)]
Convert self to real names

This follows the conventions used by the rest of the G world..

We were also using real names in the headers anyway, this makes them
consistent.

10 years agoSort of fix panning when rotated
Andy Spencer [Mon, 8 Feb 2010 05:38:00 +0000 (05:38 +0000)]
Sort of fix panning when rotated

Use the current rotation to move the expected direction. This isn't
accurate because it uses lat-lon which aren't Cartesian coordinates.

10 years agoForce WMS to only update once
Andy Spencer [Mon, 8 Feb 2010 05:14:59 +0000 (05:14 +0000)]
Force WMS to only update once

This can cause problems with halfway downloaded files. In the future it
would be better to save partially downloaded data into a .part file and
the continue that even with GIS_ONCE.

10 years agoUpdate todo with some implementation ideas
Andy Spencer [Mon, 8 Feb 2010 05:14:29 +0000 (05:14 +0000)]
Update todo with some implementation ideas

10 years agoFix SRTM url
Andy Spencer [Mon, 8 Feb 2010 05:13:18 +0000 (05:13 +0000)]
Fix SRTM url

10 years agoAdd mouse support
Andy Spencer [Mon, 8 Feb 2010 05:03:56 +0000 (05:03 +0000)]
Add mouse support

Left mouse button:   Panning
Middle mouse button: Zooming
Right mouse button:  Rotation

10 years agoMisc pointer fixes
Andy Spencer [Sat, 6 Feb 2010 15:08:06 +0000 (15:08 +0000)]
Misc pointer fixes

10 years agoGisTile: use g_object_unref instead of g_free
Andy Spencer [Sat, 6 Feb 2010 14:55:54 +0000 (14:55 +0000)]
GisTile: use g_object_unref instead of g_free

10 years agoUpdate TODO
Andy Spencer [Sat, 6 Feb 2010 12:58:35 +0000 (12:58 +0000)]
Update TODO

10 years agoDebugging and memory checking
Andy Spencer [Sat, 6 Feb 2010 12:55:27 +0000 (12:55 +0000)]
Debugging and memory checking

10 years agoFix various memory leaks, mostly in plugins
Andy Spencer [Sat, 6 Feb 2010 11:46:34 +0000 (11:46 +0000)]
Fix various memory leaks, mostly in plugins

- Keep references to objects in plugins and remove/free them when the
  plugins are destroyed.
- g_close_dir in gis-plugin.c

10 years agoGisViewer: Improve add/remove functions
Andy Spencer [Sat, 6 Feb 2010 11:42:45 +0000 (11:42 +0000)]
GisViewer: Improve add/remove functions

- Free the data stored in the tree
- Fix how data is stored (use our own linked list handling)
- Remove function now returns the original object

10 years agoGisViewer: remove begin/end functions
Andy Spencer [Sat, 6 Feb 2010 11:37:18 +0000 (11:37 +0000)]
GisViewer: remove begin/end functions

There's no reason for recreating the OpenGL context all the time, just
create it once at the beginning.

10 years agogis-demo: fix memory issues, cleanup
Andy Spencer [Sat, 6 Feb 2010 11:33:45 +0000 (11:33 +0000)]
gis-demo: fix memory issues, cleanup

10 years ago[Re]add gis-test
Andy Spencer [Sat, 6 Feb 2010 11:31:14 +0000 (11:31 +0000)]
[Re]add gis-test

Use gis-test for testing, valgrind, etc. It's simpler so it's easier to
debug, but not suitable for demonstrations.

10 years agoAdd better suppressions file
Andy Spencer [Sat, 6 Feb 2010 03:41:54 +0000 (03:41 +0000)]
Add better suppressions file

10 years agoConvert GisWms to use GisHttp
Andy Spencer [Fri, 5 Feb 2010 13:31:12 +0000 (13:31 +0000)]
Convert GisWms to use GisHttp

10 years agoSplit gis-data into data and http parts
Andy Spencer [Fri, 5 Feb 2010 13:03:25 +0000 (13:03 +0000)]
Split gis-data into data and http parts

gis-data:
  Generic things such as the callback types and cache types.

gis-http:
  HTTP related caching functions (what was GisData)

  This was almost entirely refactored to be single threaded. It also
  uses a GisHttp structure to store data between calls to the fetch
  function. Plugins, etc should call the fetch function from a thread to
  avoid blocking the UI.

10 years agoUpdate docs
Andy Spencer [Fri, 5 Feb 2010 11:00:12 +0000 (11:00 +0000)]
Update docs

10 years agoMove data access to a subdirectory
Andy Spencer [Fri, 5 Feb 2010 10:54:50 +0000 (10:54 +0000)]
Move data access to a subdirectory

10 years agoFix one more include folder
Andy Spencer [Fri, 5 Feb 2010 10:52:36 +0000 (10:52 +0000)]
Fix one more include folder

10 years agoFix include folders
Andy Spencer [Wed, 3 Feb 2010 12:39:42 +0000 (12:39 +0000)]
Fix include folders

10 years agoSplit gis-object.{c,h} -> gis-{object,marker,callback}.{c,h}
Andy Spencer [Wed, 3 Feb 2010 12:10:54 +0000 (12:10 +0000)]
Split gis-object.{c,h} -> gis-{object,marker,callback}.{c,h}

10 years agoMove objects to a subdirectory
Andy Spencer [Wed, 3 Feb 2010 11:53:00 +0000 (11:53 +0000)]
Move objects to a subdirectory

- Organize automake files a bit while we're at it

10 years agoUpdate API docs
Andy Spencer [Wed, 3 Feb 2010 09:16:57 +0000 (09:16 +0000)]
Update API docs

10 years agoConvert GisTile to GisObject
Andy Spencer [Wed, 3 Feb 2010 09:02:05 +0000 (09:02 +0000)]
Convert GisTile to GisObject

- This lets us remove the special gis_veiwer_render_tile[s] interfaces.

- We might want to add back in a similar gis_viewer_draw_object at some
  point.

10 years agoConvert GisObject to GObject
Andy Spencer [Wed, 3 Feb 2010 08:24:51 +0000 (08:24 +0000)]
Convert GisObject to GObject

- Sigh... oh well, at least we have evil macros to make ourselves feel
  better about this.

10 years agoBetter error checking for elev and sat plugins
Andy Spencer [Wed, 3 Feb 2010 02:13:08 +0000 (02:13 +0000)]
Better error checking for elev and sat plugins

10 years agomap: colormap for cities and linear texture filtering
Andy Spencer [Wed, 3 Feb 2010 02:12:36 +0000 (02:12 +0000)]
map: colormap for cities and linear texture filtering

10 years agogis-demo: avoid double-loading plugins
Andy Spencer [Wed, 3 Feb 2010 02:11:33 +0000 (02:11 +0000)]
gis-demo: avoid double-loading plugins

10 years agoUpdate TODO with data items
Andy Spencer [Wed, 3 Feb 2010 02:10:48 +0000 (02:10 +0000)]
Update TODO with data items

10 years agoAdd color mapping to map plugin
Andy Spencer [Thu, 28 Jan 2010 09:43:28 +0000 (09:43 +0000)]
Add color mapping to map plugin

10 years agoAdd blank background color to env
Andy Spencer [Thu, 28 Jan 2010 09:43:04 +0000 (09:43 +0000)]
Add blank background color to env

10 years agoImprove gis-demo
Andy Spencer [Thu, 28 Jan 2010 08:49:26 +0000 (08:49 +0000)]
Improve gis-demo

GisDemo now lists plugins and works with preferences to load and restore
offline settings and enabled plugins.

10 years agoMove around a lot of preferences management
Andy Spencer [Thu, 28 Jan 2010 08:48:23 +0000 (08:48 +0000)]
Move around a lot of preferences management

Things like setting offline, and plugin usage are not handled by libgis
directly instead of by the main programs.

10 years agoRename tile_test to tile-test
Andy Spencer [Thu, 28 Jan 2010 00:16:56 +0000 (00:16 +0000)]
Rename tile_test to tile-test

10 years agoRename gis_test to gis-demo
Andy Spencer [Thu, 28 Jan 2010 00:12:52 +0000 (00:12 +0000)]
Rename gis_test to gis-demo

10 years agoRename SRTM to Elev
Andy Spencer [Thu, 28 Jan 2010 00:06:18 +0000 (00:06 +0000)]
Rename SRTM to Elev

10 years agoRename BMNG to Sat
Andy Spencer [Thu, 28 Jan 2010 00:03:43 +0000 (00:03 +0000)]
Rename BMNG to Sat

10 years agoUpdate copyright and email address
Andy Spencer [Wed, 27 Jan 2010 23:48:01 +0000 (23:48 +0000)]
Update copyright and email address

10 years agoUpdate TODO
Andy Spencer [Wed, 27 Jan 2010 22:26:47 +0000 (22:26 +0000)]
Update TODO

10 years agoFix null pointer dereference
Andy Spencer [Wed, 27 Jan 2010 20:54:56 +0000 (20:54 +0000)]
Fix null pointer dereference

10 years agoReorder some sources
Andy Spencer [Wed, 27 Jan 2010 20:54:32 +0000 (20:54 +0000)]
Reorder some sources

10 years agoAdding map plugin using OpenStreetMap data
Andy Spencer [Wed, 27 Jan 2010 20:48:45 +0000 (20:48 +0000)]
Adding map plugin using OpenStreetMap data

10 years agoUse G_PI instead of M_PI
Andy Spencer [Wed, 27 Jan 2010 20:40:28 +0000 (20:40 +0000)]
Use G_PI instead of M_PI

10 years agoMove wms_test to tile_test
Andy Spencer [Wed, 27 Jan 2010 20:38:49 +0000 (20:38 +0000)]
Move wms_test to tile_test

10 years agoUse argv for loading plugins with gis_test
Andy Spencer [Tue, 26 Jan 2010 05:23:40 +0000 (05:23 +0000)]
Use argv for loading plugins with gis_test

10 years agoStub out an environment plugin.
Andy Spencer [Tue, 26 Jan 2010 01:58:28 +0000 (01:58 +0000)]
Stub out an environment plugin.

TODO: do a halfway decent sky and stars rendering.

10 years agoUse glAlphaFunc for transparency for now
Andy Spencer [Tue, 26 Jan 2010 01:05:26 +0000 (01:05 +0000)]
Use glAlphaFunc for transparency for now

10 years agoFix rendering at the poles
Andy Spencer [Tue, 26 Jan 2010 01:05:09 +0000 (01:05 +0000)]
Fix rendering at the poles

10 years agoCleanup memory on exit
Andy Spencer [Mon, 25 Jan 2010 21:52:24 +0000 (21:52 +0000)]
Cleanup memory on exit

10 years agoHandle broken images gracefully
Andy Spencer [Mon, 25 Jan 2010 20:52:35 +0000 (20:52 +0000)]
Handle broken images gracefully

Don't add broken data to tiles and delete broken pixmaps from disk.

Don't attempt to re-fetch it though, since that could infinite loop.

10 years agoLock the sphere when working with volatile triangles
Andy Spencer [Mon, 25 Jan 2010 20:43:27 +0000 (20:43 +0000)]
Lock the sphere when working with volatile triangles

As far as I know, this doesn't fix anything, but it's probably a good
idea incase threading causes issues.

10 years agoMinor debugging, precision, and performance updates
Andy Spencer [Mon, 25 Jan 2010 20:39:15 +0000 (20:39 +0000)]
Minor debugging, precision, and performance updates

- Print paths when loading tiles

- Only update heights of vertices inside a tile, instead of all the
  vertices on intersecting triangles.

- Use g_list_prepend instead of g_list_append

10 years agoFix holes in the earth
Andy Spencer [Mon, 25 Jan 2010 20:35:13 +0000 (20:35 +0000)]
Fix holes in the earth

- Add user_data to tile before updating height, otherwise the latest
  tile doesn't get used.

- Add flag to get_intersect to fetch all triangles, not just leaves.
  Update these heights when setting height funcs.

10 years agoFix wireframe mode
Andy Spencer [Mon, 25 Jan 2010 20:34:51 +0000 (20:34 +0000)]
Fix wireframe mode

10 years agoAdd gis-object to doc index
Andy Spencer [Mon, 25 Jan 2010 20:19:58 +0000 (20:19 +0000)]
Add gis-object to doc index

10 years agoUpdate teapot example with callback object
Andy Spencer [Mon, 25 Jan 2010 09:51:53 +0000 (09:51 +0000)]
Update teapot example with callback object

10 years agoAdd gis-object.h to includes dist
Andy Spencer [Mon, 25 Jan 2010 09:51:04 +0000 (09:51 +0000)]
Add gis-object.h to includes dist

10 years agoMisc OpenGL refactoring and minor updates
Andy Spencer [Mon, 25 Jan 2010 08:10:27 +0000 (08:10 +0000)]
Misc OpenGL refactoring and minor updates

10 years agoRemove site from GisViewer
Andy Spencer [Mon, 25 Jan 2010 08:07:29 +0000 (08:07 +0000)]
Remove site from GisViewer

AWeather determines site based on location now.

10 years agoConvert for expose callback to callback objects
Andy Spencer [Mon, 25 Jan 2010 08:03:37 +0000 (08:03 +0000)]
Convert for expose callback to callback objects

Objects are now added using a level and a sorting parameter
- Levels are rendered in order
- Semi-transparent objects should be added with sort=TRUE
  (note: this is currently broken)

10 years agoRemove properties from gis-viewer
Andy Spencer [Mon, 25 Jan 2010 07:49:55 +0000 (07:49 +0000)]
Remove properties from gis-viewer

Nobody uses these..

10 years agoAdd NEVER update for gis-data
Andy Spencer [Mon, 25 Jan 2010 07:47:43 +0000 (07:47 +0000)]
Add NEVER update for gis-data

10 years agoRemoving unnecessary things from gis-object
Andy Spencer [Mon, 25 Jan 2010 07:45:09 +0000 (07:45 +0000)]
Removing unnecessary things from gis-object

- GisObject primitives aren't being used anymore (for now)

10 years agoUpdate sorting example to use a shader (broken)
Andy Spencer [Mon, 25 Jan 2010 07:36:11 +0000 (07:36 +0000)]
Update sorting example to use a shader (broken)

Maybe we can use a shader to make the textures work? Not sure if this is
possible or not..

10 years agoUpdate sorting example with textures (broken)
Andy Spencer [Mon, 25 Jan 2010 07:35:25 +0000 (07:35 +0000)]
Update sorting example with textures (broken)

10 years agoAdding OpenGL shader (GLSL) example
Andy Spencer [Mon, 25 Jan 2010 07:33:09 +0000 (07:33 +0000)]
Adding OpenGL shader (GLSL) example

10 years agoDebugging and code formatting
Andy Spencer [Sat, 23 Jan 2010 19:25:41 +0000 (19:25 +0000)]
Debugging and code formatting

10 years agoTemplate for tessellation example, currently broke
Andy Spencer [Sat, 23 Jan 2010 00:00:54 +0000 (00:00 +0000)]
Template for tessellation example, currently broke

10 years agoAdd polygon sorting to sorting example
Andy Spencer [Fri, 22 Jan 2010 22:35:21 +0000 (22:35 +0000)]
Add polygon sorting to sorting example

Sorting works!
TODO: tessellations

10 years agoTemplate for sorting example, currently broken
Andy Spencer [Fri, 22 Jan 2010 20:25:20 +0000 (20:25 +0000)]
Template for sorting example, currently broken

10 years agoConvert from xyz to lle as the main roam coordinates
Andy Spencer [Sat, 19 Dec 2009 22:59:49 +0000 (22:59 +0000)]
Convert from xyz to lle as the main roam coordinates

This keeps splits along latitude lines instead of along great circles.
It is a little less accurate, but makes texture mapping much simpler, at
least with Mercator projections.

If we ever manage to get lle->xyz conversions done in an OpenGL shader,
this should make the transition a little easier as well.

     Old Way           New Way
    .-''/'''-.        .-''/'''-.
   / __/_____ \      /.__/____..\
  /''  |     ''\    /    |       \
  *..__*_____..*    *..__*_____..*
  \    |       /    \    |       /
   \   \      /      \   \      /
    '-..\...-'        '-..\...-'

10 years agoMarkers as individual textures
Andy Spencer [Sun, 15 Nov 2009 08:10:49 +0000 (08:10 +0000)]
Markers as individual textures

10 years agoAdd support for GisMarker to Gis{Viewer,OpenGL}
Andy Spencer [Sun, 15 Nov 2009 00:42:42 +0000 (00:42 +0000)]
Add support for GisMarker to Gis{Viewer,OpenGL}

10 years agoUpdate example plugin
Andy Spencer [Sat, 14 Nov 2009 14:33:18 +0000 (14:33 +0000)]
Update example plugin

10 years agoUpdate doc index
Andy Spencer [Sat, 14 Nov 2009 13:57:41 +0000 (13:57 +0000)]
Update doc index

10 years agoRefactor GisViewer and GisOpenGL
Andy Spencer [Sat, 14 Nov 2009 13:38:33 +0000 (13:38 +0000)]
Refactor GisViewer and GisOpenGL

- GisViewer is an abstract type that extends GtkDrawingArea
- GisOpenGL extends GisViewer and is the core of the library.
  It is always accessed though the GisViewer API

10 years agoFix naming for the GisView/GisWorld -> GisViewer merge
Andy Spencer [Sat, 14 Nov 2009 11:29:54 +0000 (11:29 +0000)]
Fix naming for the GisView/GisWorld -> GisViewer merge

10 years agoMerging GisWorld and GisView into GisViewer
Andy Spencer [Sat, 14 Nov 2009 11:04:31 +0000 (11:04 +0000)]
Merging GisWorld and GisView into GisViewer

This commit is broken, but will hopefully be easier for Git to track
changed files

10 years agoAdd primitive rendering types
Andy Spencer [Sat, 14 Nov 2009 08:45:52 +0000 (08:45 +0000)]
Add primitive rendering types

These types are not full GObjects, hopefully they will be faster and
more space efficient this way since there will likely be a very large
number of these objects. However, the API is similar.

GisProjection:
  Stores camera parameters.

GisPoint:
  Corresponds to OpenGL Vertex.

GisPrimitive:
  Base class for primitive drawing objects.
    - Contains a centroid for depth sorting
    - Contains a projection so that xyz values for vertexes associated with the
      primitive points can be store relative to a projection.

GisTriangle:
  For GL_TRIANGLES

GisQuad:
  For GL_QUADS

GisCallback:
  Contains a callback and user_data pointer that is called when the object is
  to be rendered.

10 years agoAdd preliminary support for points/markers
Andy Spencer [Fri, 13 Nov 2009 23:54:06 +0000 (23:54 +0000)]
Add preliminary support for points/markers

10 years agoUse G_MODULE_SUFFIX in gis-plugin v0.3.x
Andy Spencer [Wed, 11 Nov 2009 09:58:07 +0000 (09:58 +0000)]
Use G_MODULE_SUFFIX in gis-plugin

10 years agoRemove redundant print from gis-prefs
Andy Spencer [Wed, 11 Nov 2009 09:57:50 +0000 (09:57 +0000)]
Remove redundant print from gis-prefs

10 years agoRevert problems with the win32 build
Andy Spencer [Wed, 11 Nov 2009 07:11:45 +0000 (07:11 +0000)]
Revert problems with the win32 build

* Revert texture params for srtm/bmng
* Remove gdk_threads enter/leave from GisOpeng

10 years agoFix various win32 runtime issues
Andy Spencer [Wed, 11 Nov 2009 06:59:24 +0000 (06:59 +0000)]
Fix various win32 runtime issues

* Add -no-undefined so mingw-ld will generate dlls

* Make gis_test static so we don't have double copies if the plugins
  when they're loaded.

* Add gdk_threads_enter to opengl_start (to match opengl_end)

* Various debugging messages

10 years agoWin32 build fixes
Andy Spencer [Tue, 10 Nov 2009 08:34:13 +0000 (08:34 +0000)]
Win32 build fixes

10 years agoRemove redundant LIBADD from plugins makefiles
Andy Spencer [Tue, 10 Nov 2009 02:41:19 +0000 (02:41 +0000)]
Remove redundant LIBADD from plugins makefiles

10 years agoGet example plugin working again
Andy Spencer [Tue, 10 Nov 2009 01:24:43 +0000 (01:24 +0000)]
Get example plugin working again

* Remove <config.h> from include files
* Add a second slower but higher priority split-merge callback

10 years agoAdd GError to prefs_get functions
Andy Spencer [Tue, 10 Nov 2009 00:50:01 +0000 (00:50 +0000)]
Add GError to prefs_get functions

This allows users to check the reason for a return value.
E.g. G_KEY_FILE_ERROR_NOT_FOUND

10 years agoFix rendering plugins if they're loaded after radar.so
Andy Spencer [Tue, 10 Nov 2009 00:23:44 +0000 (00:23 +0000)]
Fix rendering plugins if they're loaded after radar.so

Radar sets glColor to transparent at the end of it's expose, this was
never reset to something opaque so the world was being drawn
transparent. Fixed by resetting glColor in set_visuals.

10 years agoFix misc bugs and bump version to 0.3 v0.3
Andy Spencer [Mon, 9 Nov 2009 15:00:20 +0000 (15:00 +0000)]
Fix misc bugs and bump version to 0.3

10 years agoFix UI hangs with parallel processing and callbacks
Andy Spencer [Mon, 9 Nov 2009 13:40:49 +0000 (13:40 +0000)]
Fix UI hangs with parallel processing and callbacks

* Multi-threading
* Thread protection
* Priorities on callbacks

10 years agoAdd Shuttle Radar Topography Mission plugin and height code
Andy Spencer [Mon, 9 Nov 2009 13:24:54 +0000 (13:24 +0000)]
Add Shuttle Radar Topography Mission plugin and height code

For the most part, the SRTM plugin is simmilar to the BMNG plugin. The
loaders are more complicated because it generates both a bil (unsigned
short array) and a pixmap from the downloaded files.

Highmaps are in two parts when set_height_func is called with
update=TRUE, the heights of all the vertices for a given tile are
updated by calling height_func and using the returned value as the new
vertex height.

In addition to updating the vertex height immediately, the height
function is also stored in each vertex and used later during the
split-merge process.

The user_data passed with set_height_func could theoretically be used to
speed searching for the correct tile during the split-merge process, but
this is currently not done. (Each call to the srtm height function does
a search for the correct tile)

10 years agoAdd Blue Marble Next Gen plugin and tile rendering code
Andy Spencer [Mon, 9 Nov 2009 12:37:58 +0000 (12:37 +0000)]
Add Blue Marble Next Gen plugin and tile rendering code

Tile Splitting:
  (These functions were skipped in the previous commit for GisTile)

  To update a set of tiles, the plugin responsible for the tiles needs
  to periodically call the update function which will split any tiles
  that are below the viewers desired resolution.

  Unlike the WmsInfo method, the tiles are not automatically updated
  when a particular tile is requested. (In fact, requesting a particular
  tile is rarely done).

Tile Rendering:
  Rendering with GisTile is significantly different than with WmsInfo
  and fans. This difference is easily explained with some pseudocode:

  Old way:
    for triangle in mesh:
        for tile in find_tiles(triangle):
            render(triangle, tile.texture)

  New way:
    for tile in tiles:
        for triangle in find_triangles(tile):
            render(triangle, tile.texture)

  Both find_tiles and find_triangles are O(log n) operations in the
  worst case, but I think using find_triangles should result in faster
  code because find_triangles can quickly return a large group of tiles,
  while the find_tile function typically reruns a single tile. There's
  additional discussion of this in the source code.

  From an implementation standpoint, the new way makes it easier to add
  plugins. With the old way, the find_tiles function was invoked by a
  function pointer attached to the sphere, which makes rendering
  multiples layers of tiles difficult. In the new, each plugin just
  calls the render_tiles function which renders a set of tiles
  (recursively) on top of the sphere.