m_InitCalled is set by Init(), so Init() is only called once. I also tried 
using FLTK's valid(), but it does not make a difference.

Considering calling make_current(), I first tried without calling it 
explicitly, but the context is not set correctly. I then tried calling it 
explicitly but without success.

And I don't call draw() directly, I only call redraw() so that should be ok. 
This leaves me clueless why fl_window and fl_gc are not set correctly. Is there 
any way to debug this?



> On 16 Apr 2011, at 19:51, heda wrote:
>
> > void FLHMIWindow::draw()
> > {
> >   // Initialize components
> >   if (!m_InitCalled)
> >   {
> >      Init();
> >   }
>
> Where does m_InitCalled become set? If it is never set, you will be =
> calling Init() on every iteration and that would be Bad...
>
>
> >   make_current();
>
> Probably not necessary - the correct context should already be set by =
> the time fltk calls the draw method.
> Might even be a Bad Thing to call this explicitly at this point.
>
> You are not calling the draw method explicitly anywhere, are you?=20
> You don't do that, you must let fltk call it for you when it is ready...
>
>
>
>
>

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

Reply via email to