On 15.11.2009, at 17:45, w. szukalski wrote:

>    void draw()
>   {
>       scroll_left();
>       fltk::redraw();
>   }

^^ don't call redraw() from within draw(). You are generating a huge  
CPU load and you keep on redrawing, even if nothing changed in the  
drawing. It would be better to call redraw() from within the timer  
callback.

> static void repeat_cb(void *v)
> {
>       ShiftText *st = (ShiftText*)v;
>
>       remove_timeout(repeat_cb, v);
^^ there should be no need for this call. It may actually be the  
reason why your timing is off.

>       if(st->stopped) return;
>
>       st->draw();
>       repeat_timeout(TIMESTEP, repeat_cb, v);
> }

Matthias

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

Reply via email to