On 02/06/12 14:59, Shon Pritchett wrote: > My problem isn't so much FPS but whether calling redraw is > enough to refresh the screen. I can live with a much lower FPS otherwise.
I *think* it should be sufficient; calling refresh() just sets a flag inside FLTK that will cause it to call draw() immediately once the application loop regains control (ie. when you return from your timer callback) > The add_timeout function is triggering only once if my GlWindow is invalid. I'd probably start the timer in the ctor, as I'm not sure if a GL window can become invalid more than once (eg. if a window is stowed, and later reopened, which might start multiple timers..) Or, protect the timer start with a run-once flag, to prevent more than one timer from starting. > The repeat_timeout function is not triggering at 60FPS as best I can discern. I see; you probably should use gettimeofday() to see what your actual FPS rate is so you can measure it, and just draw the calculated value very frame as part of your opengl draw code. (Text drawing in opengl should be very fast) > [..pasted code snippets..] Thanks for the snippets, but can you post a compilable simple version of your code with all the extraneous stuff removed. I'd much rather compile and run it to see the behavior than to try to visually parse it. Also, often in such cases the problem lies in the part of the code the user leaves out, causing a lot of useless back+forths regarding only the pasted code.. > My GlWindow is embedded within a doublebuffered window but I have not > explicitly enabled double bufferring in the GlWindow. I can't remember if that's an issue or not; I think the GL window is treated separately, but I'd double check the docs, and/or see what others weigh in on this, as I honestly can't recall. _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk