| Age | Commit message (Collapse) | Author |
|
|
|
This commit allows to switch between FL_DOUBLE / FL_SINGLE modes
in widget-containing GL3 windows.
Demo program examples/OpenGL3test is modified to show FLTK widgets
even if the platform does not support OpenGL 3.
|
|
This code is OK under macOS 10 9 and 13.
|
|
Also, the application-level code to add widgets to a GL3 window becomes
platform-independent.
|
|
Under non-macOS platforms, the key is to call glUseProgram(0); after having used OpenGL 3
which allows to then use OpenGL 1 and draw FLTK widgets over the OpenGL3 scene.
Under macOS, this is impossible because macOS GL3 contexts are not compatible
with GL1. The solution implemented here is to create an additional Fl_Gl_Window
placed above and sized as the GL3-based window, to give it a non opaque,
GL1-based context, and to put the FLTK widgets in that additional window.
|
|
|
|
1) add Wayland code that prevent subwindows from leaking outside their parent.
This does not cover GL subwindows.
2) add macOS code that prevent GL subwindows from leaking outside their parent.
This fixes issue #494 for the macOS platform.
N.B.: Wayland GL subwindows are not prevented from leaking because no solution
that would not require any change in client applications was found. Code that
would cover Wayland GL subwindows but would require client applications to always
use the FL_ALPHA flag is included in this commit in commented out form.
|
|
|
|
|
|
|
|
|
|
The font size is set to the value necessary for the GL scene before
computing the string width.
Virtual Fl_Gl_Window_Driver::effective_size() becomes unnecessary.
|
|
Fl_Gl_Window_Driver::alpha_mask_for_string()
|
|
|
|
|