X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=src%2Fgrits-opengl.h;fp=src%2Fgrits-opengl.h;h=72d7b13bdf0fe62050ad28a4bbc190e06fce401e;hb=4bef8517366b0195e321add06250e7d659434661;hp=0000000000000000000000000000000000000000;hpb=901270339e83192fd5765f32584941435f96331f;p=grits diff --git a/src/grits-opengl.h b/src/grits-opengl.h new file mode 100644 index 0000000..72d7b13 --- /dev/null +++ b/src/grits-opengl.h @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2009-2010 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 . + */ + +#ifndef __GIS_OPENGL_H__ +#define __GIS_OPENGL_H__ + +#include + +/* Type macros */ +#define GIS_TYPE_OPENGL (gis_opengl_get_type()) +#define GIS_OPENGL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GIS_TYPE_OPENGL, GisOpenGL)) +#define GIS_IS_OPENGL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GIS_TYPE_OPENGL)) +#define GIS_OPENGL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIS_TYPE_OPENGL, GisOpenGLClass)) +#define GIS_IS_OPENGL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIS_TYPE_OPENGL)) +#define GIS_OPENGL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIS_TYPE_OPENGL, GisOpenGLClass)) + +typedef struct _GisOpenGL GisOpenGL; +typedef struct _GisOpenGLClass GisOpenGLClass; + +#include "gis-viewer.h" +#include "roam.h" + +struct _GisOpenGL { + GisViewer parent_instance; + + /* instance members */ + GTree *objects; + GMutex *objects_lock; + RoamSphere *sphere; + GMutex *sphere_lock; + guint sm_source[2]; + guint ue_source; + + /* for testing */ + gboolean wireframe; +}; + +struct _GisOpenGLClass { + GisViewerClass parent_class; + + /* class members */ +}; + +GType gis_opengl_get_type(void); + +/* Methods */ +GisViewer *gis_opengl_new(GisPlugins *plugins, GisPrefs *prefs); + +#endif