]> Pileus Git - grits/commit
Add Blue Marble Next Gen plugin and tile rendering code
authorAndy Spencer <andy753421@gmail.com>
Mon, 9 Nov 2009 12:37:58 +0000 (12:37 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 9 Nov 2009 12:37:58 +0000 (12:37 +0000)
commitf510823bdc5b77fa0c5336ad608f13f251a0ada5
tree85c46b5dd594b9c835483b6880c1707e207d2d8c
parent2e575e2c348f44d3c723ac344b7296492c76f77a
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.
src/gis-opengl.c
src/gis-opengl.h
src/gis-tile.c
src/gis-tile.h
src/gis_test.c
src/plugins/bmng.c
src/plugins/bmng.h
src/roam.c
src/roam.h