On 13 Sep 2009, at 21:32, Tomas Bym wrote: > Hello, > I am trying to draw a rectangle from the point, where the user > starts to drag the mouse to the actual mouse position. I tried to > make the code like this, it draws the rectangle but only when the > mouse is moving. When I stop moving the mouse, the rectangle > disapears till I move again. > Can you please help me to make the rectangle visible until I > release the mouse button?
I think the traditional way to do that is via a Fl_Overlay_Window, see Greg's demo: http://www.seriss.com/people/erco/fltk/#Overlay However, I don't think that integrates well with OpenGL, so may not work for you. Perhaps some of the ideas explored in Greg's example here might help: http://www.seriss.com/people/erco/fltk/#GL4PortResizable _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

