FLTK logo

Re: [fltk.general] Transparent window

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Transparent window Ian MacArthur Jun 20, 2022  
 
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.)

Code example attached...



--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/c4a09afd-915b-458d-a015-483f6bad4ed3n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.