#include <GL/gl.h>
#include <GL/glu.h>
-#include "misc.h"
-#include "aweather-gui.h"
-#include "gis-world.h"
-#include "gis-view.h"
#include "gis-opengl.h"
/****************
static GObject *gis_opengl_constructor(GType gtype, guint n_properties,
GObjectConstructParam *properties)
{
- g_debug("gis_opengl: constructor");
+ g_debug("GisOpengl: constructor");
GObjectClass *parent_class = G_OBJECT_CLASS(gis_opengl_parent_class);
return parent_class->constructor(gtype, n_properties, properties);
}
gis_view_get_location(self->view, &x, &y, &z);
/* Window is at 500 m from camera */
- double width = GTK_WIDGET(self->drawing)->allocation.width;
- double height = GTK_WIDGET(self->drawing)->allocation.height;
+ double width = drawing->allocation.width;
+ double height = drawing->allocation.height;
glViewport(0, 0, width, height);
glRotatef(rz, 0, 0, 1);
/* Expose plugins */
- /* TODO: Figure out how to handle plugins:
- * - Do they belong to AWeatherGui, GisOpenGL, etc?
- */
- for (GList *cur = self->plugins; cur; cur = cur->next) {
- AWeatherPlugin *plugin = AWEATHER_PLUGIN(cur->data);
- aweather_plugin_expose(plugin);
- }
+ gis_plugins_foreach(self->plugins, G_CALLBACK(gis_plugin_expose), NULL);
gis_opengl_end(self);
gis_opengl_flush(self);
self->world = world;
self->view = view;
self->drawing = drawing;
+ g_message("drawing = %p", drawing);
g_object_ref(world);
g_object_ref(view);
g_object_ref(drawing);
{
g_assert(GIS_IS_OPENGL(self));
+ g_message("drawing = %p", self->drawing);
GdkGLContext *glcontext = gtk_widget_get_gl_context(GTK_WIDGET(self->drawing));
GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable(GTK_WIDGET(self->drawing));