How can I disable automatic buffer swapping in subwindows?

11 views
Skip to first unread message

jgcodes2020

unread,
Jul 31, 2022, 5:20:37 PM7/31/22
to fltk.general
I'm considering FLTK to build an emulator frontend for Mupen64Plus.

To allow the emulator to provide output, it needs a (child) window that it gains exclusive control of. This means that I need to somehow disable calling swap_buffers() after draw() in an Fl_Gl_Window, so that I can manually call swap_buffers when I desire.

However, I only want to do this for the emulator's child window. I want everything else to draw according to FLTK's event loop.

How would I accomplish this?



Ian MacArthur

unread,
Aug 2, 2022, 5:52:23 AM8/2/22
to fltk.general
This sounds a lot like a GL question - so not exactly my area! 

However, I think if you derive your own window widget from Fl_GL_Window, for use as your child window, and in the implementation of that derived widget you DO NOT call the base class draw or event handling, then the derived window will not get any swap_buffer events unless you explicitly trigger them.

But... do not take my word for it, I may be talking nonsense...

Reply all
Reply to author
Forward
0 new messages