FLTK logo

Re: [fltk.coredev] GL root Fl_Gl_Window::draw

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.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: GL root Fl_Gl_Window::draw Manolo Sep 23, 2022  
 
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 ]
 
     
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'.