/*
- * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
- *
+ * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
+ *
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __GIS_OPENGL_H__
#define __GIS_OPENGL_H__
-#include <config.h>
-#include <gtk/gtk.h>
-#include <gtk/gtkgl.h>
#include <glib-object.h>
-#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))
typedef struct _GisOpenGL GisOpenGL;
typedef struct _GisOpenGLClass GisOpenGLClass;
+#include "gis-viewer.h"
+#include "roam.h"
+
struct _GisOpenGL {
- GObject parent_instance;
+ GisViewer parent_instance;
/* instance members */
- GisWorld *world;
- GisView *view;
- GtkDrawingArea *drawing;
- GList *plugins;
+ GTree *objects;
+ GMutex *objects_lock;
+ RoamSphere *sphere;
+ GMutex *sphere_lock;
+ guint sm_source[2];
+ guint ue_source;
+
+ /* for testing */
+ gboolean wireframe;
};
struct _GisOpenGLClass {
- GObjectClass parent_class;
-
+ GisViewerClass parent_class;
+
/* class members */
};
GType gis_opengl_get_type(void);
/* Methods */
-GisOpenGL *gis_opengl_new(GisWorld *world, GisView *view, GtkDrawingArea *drawing);
-
-void gis_opengl_redraw(GisOpenGL *gis);
-void gis_opengl_begin(GisOpenGL *gis);
-void gis_opengl_end(GisOpenGL *gis);
-void gis_opengl_flush(GisOpenGL *gis);
+GisViewer *gis_opengl_new(GisPlugins *plugins, GisPrefs *prefs);
#endif