On Sunday, 19 June 2022 at 14:30:05 UTC+1
Håvard wrote:
Sorry for re-posting. I do not know if the other post is shown as it is done as a follow-up on an old thread.
For the record - yes, the post (on the other thread) did indeed appear OK.
Based on the nice work by Matthias, I make a FL_Group in my
Fl_Gl_Window. This do support transparent colors, as can be seen in the
attached image.
Looks pretty good, doo.
This looks just like I wanted. However there are a few issues:
1) The event handling is not always ok. I suspect that my Fl_Gl_Window captrues it. This may be my mistake.
It could be - I've had weird issues with event handling in GL windows in the past, so it may well be tricky!
That said, I have no real grasp of how Matt handles propagation of events to fltk widgets within the GL window context, so...
I don't suppose you have a minimal compileable example that shows how you did your GL context?
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 ?
I'd speculate that the redraw of the GL scene is what triggers the flickering...
That said, if you are happy with a floating window that is translucent (including all its enclosed widgets) you can get that effect from the 2D API if you use the platform code I showed, so it may be possible to float a "translucent Fl_Double_Window" over your GL scene and have that redraw without flicker, I think.
Possibly.