X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fplugin-ridge.c;h=cd8c447996bf2ede782c3ab9b693440ebc048852;hb=721c55f22af98cf2fcc247169836e9b355a47104;hp=2b25bbf893cd82b9b60e3a092a1f963174697385;hpb=8efa2df296f672505211b4360c10279d9d57be22;p=grits diff --git a/src/plugin-ridge.c b/src/plugin-ridge.c index 2b25bbf..cd8c447 100644 --- a/src/plugin-ridge.c +++ b/src/plugin-ridge.c @@ -1,3 +1,20 @@ +/* + * 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 . + */ + #include #include #include @@ -38,7 +55,7 @@ static AWeatherGui *gui = NULL; * \param filename Path to the image file * \return The OpenGL identifier for the texture */ -void load_texture(const gchar *filename, gpointer _layer) +void load_texture(gchar *filename, gpointer _layer) { layer_t *layer = _layer; aweather_gui_gl_begin(gui); @@ -69,7 +86,7 @@ void load_texture(const gchar *filename, gpointer _layer) aweather_gui_gl_end(gui); /* Redraw */ - gtk_widget_queue_draw(GTK_WIDGET(aweather_gui_get_drawing(gui))); + gtk_widget_queue_draw(aweather_gui_get_widget(gui, "drawing")); } static void set_site(AWeatherView *view, gchar *site, gpointer user_data) @@ -94,10 +111,10 @@ static gboolean expose(GtkWidget *da, GdkEventExpose *event, gpointer user_data) glBindTexture(GL_TEXTURE_2D, layers[i].tex); glBegin(GL_POLYGON); - glTexCoord2f(0.0, 0.0); glVertex3f(500*1000*-1.0, 500*1000* 1.0, layers[i].z); - glTexCoord2f(0.0, 1.0); glVertex3f(500*1000*-1.0, 500*1000*-1.0, layers[i].z); - glTexCoord2f(1.0, 1.0); glVertex3f(500*1000* 1.0, 500*1000*-1.0, layers[i].z); - glTexCoord2f(1.0, 0.0); glVertex3f(500*1000* 1.0, 500*1000* 1.0, layers[i].z); + glTexCoord2f(0.0, 0.0); glVertex3f(250*1000*-1.0, 250*1000* 1.0, layers[i].z); + glTexCoord2f(0.0, 1.0); glVertex3f(250*1000*-1.0, 250*1000*-1.0, layers[i].z); + glTexCoord2f(1.0, 1.0); glVertex3f(250*1000* 1.0, 250*1000*-1.0, layers[i].z); + glTexCoord2f(1.0, 0.0); glVertex3f(250*1000* 1.0, 250*1000* 1.0, layers[i].z); glEnd(); } @@ -108,7 +125,7 @@ static gboolean expose(GtkWidget *da, GdkEventExpose *event, gpointer user_data) gboolean ridge_init(AWeatherGui *_gui) { gui = _gui; - GtkDrawingArea *drawing = aweather_gui_get_drawing(gui); + GtkDrawingArea *drawing = GTK_DRAWING_AREA(aweather_gui_get_widget(gui, "drawing")); AWeatherView *view = aweather_gui_get_view(gui); /* Set up OpenGL Stuff */