building OpenGL under GTK+ using gtkgl
- From: "Dov B. Kruger" <dkruger stevens edu>
- To: gtk-app-devel-list gnome org
- Subject: building OpenGL under GTK+ using gtkgl
- Date: Tue, 28 Mar 2006 23:03:25 -0500 (EST)
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]