On 06.02.2012 23:59, Shon Pritchett wrote:
>> On 02/06/12 13:59, Shon Pritchett wrote:
>>> Hello Everyone,
>>>
>>> I am using a GlWindow to display some images off disk in sequential order.  
>>> I'm having some trouble getting the GlWindow to refresh in a timely fashion.
>>>
>>> I am using the add_timeout function to register my opengl setup code and 
>>> then I'm using the repeat_timeout function to update the screen at a fixed 
>>> interval the intention being every 1/60th of a second. In the update 
>>> function I'm only displaying a QUAD with a texture on it and then swapping 
>>> that texture out at every fixed tick.
>>>
>>> Is there some way to force the window to update faster?

[... snipped...]

> 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.

One potential issue with repeat_timeout and redraw is that *if* the
called function takes longer than the specified timeout period, then
FLTK won't call flush to draw anything after return from the timer
function, since the next timeout is already pending. I suggest to
measure the timing and reduce FPS to see if this can fix the
update/flush problem.

Otherwise you could call Fl::flush() to update the window, but I'd
not recommend that since it would usually produce more overhead,
because it would update the window more frequently than if FLTK
would do it by itself.

> I'm only calling redraw.
> My GlWindow is embedded within a doublebuffered window but I have not 
> explicitly enabled double bufferring in the GlWindow.

We saw weird problems when we changed all test programs to use
Fl_Double_Window in (some of?) the programs that use GL. We had to
revert the change for these programs, so I'd try to use Fl_Window
for the main window and see what happens. Ian reported a similar
problem in another post.

(See all GL-using programs in the test folder. I think the mandelbrot
demo was one of those we had to change).

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to