(very) newbie question: how request a redraw

I am working on my first significant Gtk-based application, which uses
the gtkglarea widget and will involve some animation.  My only
previous experience with this kind of programming was done with GLUT
(a simple toolkit for writing OpenGL applications).  In a GLUT version
of the program, I would use a timer callback to update the data
describing the scene to be drawn, and then I would tell the window to
redraw itself using the function


so that GLUT would callback-to my drawing function to redraw the

Assuming this is better than actually doing the OpenGL calls within
the timer function, how would I do the equivalent in Gtk?  Would I
send an GtkWidget::expose event to gtkglarea widget?  If so, how do I
do this (I haven't sent any Gtk signals yet)?  Is there some code in a
relevant application that I could study?


Christopher Lee

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]