X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=src%2Fgis-opengl.h;h=d55254f6ed606d44607e57b8ffcfc4e28f900255;hb=bc5aa14663ac94d7feae1600db18bac3fbbea1a0;hp=aca186fe88cd65a1a8f001a396289663fe022f7d;hpb=5e8bf923bce829075eb0754eecfd7e6b9b768a61;p=grits diff --git a/src/gis-opengl.h b/src/gis-opengl.h index aca186f..d55254f 100644 --- a/src/gis-opengl.h +++ b/src/gis-opengl.h @@ -1,16 +1,16 @@ /* * Copyright (C) 2009 Andy Spencer - * + * * 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 * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -18,14 +18,10 @@ #ifndef __GIS_OPENGL_H__ #define __GIS_OPENGL_H__ -#include #include #include #include -#include "gis-view.h" -#include "gis-world.h" - /* Type macros */ #define GIS_TYPE_OPENGL (gis_opengl_get_type()) #define GIS_OPENGL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GIS_TYPE_OPENGL, GisOpenGL)) @@ -37,30 +33,53 @@ typedef struct _GisOpenGL GisOpenGL; typedef struct _GisOpenGLClass GisOpenGLClass; +#include "gis-view.h" +#include "gis-world.h" +#include "gis-plugin.h" +#include "gis-tile.h" +#include "roam.h" + struct _GisOpenGL { - GObject parent_instance; + GtkDrawingArea parent_instance; /* instance members */ - GisWorld *world; - GisView *view; - GtkDrawingArea *drawing; - GList *plugins; + GisWorld *world; + GisView *view; + GisPlugins *plugins; + RoamSphere *sphere; + guint sm_source[2]; + + /* for testing */ + gboolean wireframe; }; struct _GisOpenGLClass { - GObjectClass parent_class; - + GtkDrawingAreaClass parent_class; + /* class members */ }; GType gis_opengl_get_type(void); /* Methods */ -GisOpenGL *gis_opengl_new(GisWorld *world, GisView *view, GtkDrawingArea *drawing); +GisOpenGL *gis_opengl_new(GisWorld *world, GisView *view, GisPlugins *plugins); + +void gis_opengl_center_position(GisOpenGL *opengl, + gdouble lat, gdouble lon, gdouble elev); + +void gis_opengl_render_tile(GisOpenGL *opengl, GisTile *tile); + +void gis_opengl_render_tiles(GisOpenGL *opengl, GisTile *root); + +void gis_opengl_set_height_func(GisOpenGL *self, GisTile *tile, + RoamHeightFunc height_func, gpointer user_data, gboolean update); + +void gis_opengl_clear_height_func(GisOpenGL *self); + +void gis_opengl_redraw(GisOpenGL *opengl); -void gis_opengl_redraw(GisOpenGL *gis); -void gis_opengl_begin(GisOpenGL *gis); -void gis_opengl_end(GisOpenGL *gis); -void gis_opengl_flush(GisOpenGL *gis); +void gis_opengl_begin(GisOpenGL *opengl); +void gis_opengl_end(GisOpenGL *opengl); +void gis_opengl_flush(GisOpenGL *opengl); #endif