+/*
+ * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
+ *
+ * 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/>.
+ */
+
#include <config.h>
#include <gtk/gtk.h>
#include <curl/curl.h>
* \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);
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)
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();
}
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 */