On Tue, Apr 8, 2008 at 8:49 PM, rogx. libero <[EMAIL PROTECTED]> wrote:
> from documentation/opengl.html:
>
>  "The easiest way to make an OpenGL display is to subclass Fl_Gl_Window.
>  Your subclass must implement a draw() method which uses OpenGL calls to
>  draw the display.
>  Your main program should call redraw() when the display needs to change,
>  and (somewhat later) FLTK will call draw()."
>
>  I try do do a little 3d opengl animation with a sequence like:
>
>  To show a number of frames:
>
>  end=number of positions (frames)
>  counter=0;
>  while(counter<end)
>   {
>   do linear interpolation. %: (1/end) * counter;
>   do trasformations for position;
>   mywindow->redraw();
>   counter++;
>   }
>
>  Well, I see only the last position, also if every thing seems
>  to go in the right way.
>
>  So, here are 2 questions:
>
>  There is a way to know if draw() has finish?
>  How long is "(somewhat later) FLTK will call draw()." ?

In order to let FLTK call draw, you have to yield control to fltk
(it's not multithreaded!), so at least call FL::wait or something
after mywindow->redraw();

Shai

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

Reply via email to