|
|
I've now found how to add widgets to a GL3-using Fl_Gl_Window in a cross-platform way. The attached program is an example that runs on all 4 platforms (Windows, X11, Wayland, macOS) with the last git code of FLTK 1.4 where a partially transparent button is laid over a GL3 scene.
With those platforms that allow the so-called compatibility profile, the key is to call
glUseProgram(0); between the end of the GL3 and the beginning of the GL2 drawing parts. It has also been necessary to change the X11 driver code to have it ask for a compatibility profile.
macOS does not provide the compatibility profile. The solution is to create an additional Fl_Gl_Window above the window containing the GL3 scene, to put FLTK widgets therein, and to give it a transparent background.
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/62e338cd-2433-40fa-9d23-0f1958923015n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |