On Monday, 20 June 2022 at 10:52:29 UTC+1 Matthias Melcher wrote:
2)
Clicking on the buttons causes a redraw, and that may lead to the
Fl_Group is "blinking". Is the problem that my Fl_Gl_Window/draw() uses
too much time ?
Redrawing a UI within a GL window is different to a regular window. A GL window must always be redrawn in its entirety (*including* the 3D scene in the background), whereas system windows use clipping and other tricks to redraw only what's needed. Again, I'll be happy to look into that, but I will need more detail, and probably some sample source code that shows the unexpected behaviour. The overridden Fl_Gl_Window::draw() function should redraw the entire 3D scene first, and then call the original draw() function.
As a rider to what Matt said, it turns out you can draw a translucent 2D dialog over the GL scene and that appears to be flicker-free (since it is in a separate window and not drawn as part of the GL scene.)
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.