building OpenGL under GTK+ using gtkgl



I have a framework that is working well under GTK+, but there are a 
number of problems. Most critical, I need to know how to continuously 
busy-wait and force redrawing. I am currently using gtk_main() which 
sleeps and refreshes only when the screen is resized. Instead I assume 
I should do something like:

while (true) {
    while (gtk_main_iteration_do (TRUE))
       ;

    //then force a redraw (which is what I'm asking)

}

I cannot use a timing function as OpenGL is not threadsafe, and in any 
case to maximize performance, I simply want to loop as fast as 
possible, polling for input each time.

if there are no pending animations, then I can go back to sleeping 
until the next input event.

Second, though less critical, the screen does not refresh when I 
maximize. What call do I need to trap that?





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