The GtkGLArea widget in GTK3.24 requires GLCORE profile, so the standard Ubuntu/Debian openscenegraph package will not work as it is compiled with GL2 profile. Unfortunately, my application uses Gtk so I am now forced to get it working. So I loaded the source package (openscenegraph 3.6.4) and tried to build it.
First, with default configuration, except added
SET(OpenGL_GL_PREFERENCE "GLVND")
to stop the warning about having multiple library choices. This uses GL2 profile, and after building, osgviewer works fine.
Next, selected OPENGL_PROFILE "GLCORE" and also turned off all "available" except OSG_GL3_AVAILABLE. Make clean then make again, and now osgviewer only shows an empty scene for the same test file.
Is there something else I have to do in the build? (I'm not yet even to the point of testing with Gtk).
Interestingly, on the Raspberry Pi 4, which also runs Gtk3.24, my code is working fine with the standard distribution package, so I know it can be done. On the Pi, OSG is version 3.2.3.
I don't mind a custom solution for this. Normally we don't want to stray too far from standard distro, but our application is a machine controller so we supply and maintain the PC as well.
Regards,
Steve