static void resize (GtkGLArea* self, gint width, gint height, gpointer user_data)
{
- printf("%s(),%d\n", __func__, __LINE__);
-
- GdkGLContext *context;
+ GdkGLContext* context;
gtk_gl_area_make_current (self);
} else {
printf("%s(),%d, gl\n", __func__, __LINE__);
}
+
+// simp_avio_run(user_data);
}
static void unrealize(GtkWidget *widget)
static gboolean render(GtkGLArea* self, GdkGLContext* context, gpointer user_data)
{
- scf_loge("%s(),%d\n", __func__, __LINE__);
simp_avio_t* gl = user_data;
if (gtk_gl_area_get_error (self) != NULL)
return TRUE;
}
+static gboolean timeout_render(gpointer user_data)
+{
+ gtk_gl_area_queue_render(GTK_GL_AREA(user_data));
+ return TRUE;
+}
+
static gboolean button_release_event (GtkWidget* self, GdkEventButton* event, gpointer user_data)
{
gtk_gl_area_queue_render(GTK_GL_AREA(user_data));
return -1;
}
- gl->view = gl_area;
-
simp_filter_add_input (f, in);
simp_filter_add_output(f, alsa);
simp_filter_add_output(f, gl);
g_signal_connect(gl_area, "resize", G_CALLBACK(resize), gl);
g_signal_connect(gl_area, "unrealize", G_CALLBACK(unrealize), gl);
g_signal_connect(gl_area, "render", G_CALLBACK(render), gl);
+ g_timeout_add (10, timeout_render, gl_area);
g_signal_connect(window, "button-release-event", G_CALLBACK(button_release_event), f);