This is a hack, a better solution is in 0.5.x.
This fixes a bug when using Mesa.
{
g_debug("GisOpenGL: on_configure");
{
g_debug("GisOpenGL: on_configure");
+ /* wait for "realize" */
+ if (!gdk_gl_context_get_current())
+ return FALSE;
+
double width = GTK_WIDGET(opengl)->allocation.width;
double height = GTK_WIDGET(opengl)->allocation.height;
double width = GTK_WIDGET(opengl)->allocation.width;
double height = GTK_WIDGET(opengl)->allocation.height;