Discussion:
[osg-users] Building OSG on Ubuntu 20.04 with GLCORE profile
Hardy Family
2021-04-05 17:20:08 UTC
Permalink
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
--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/9bb6453e-a9f5-461c-8b4e-a1eb23dc99a0n%40googlegroups.com.
Broi, Franco
2021-04-05 22:27:37 UTC
Permalink
I'm using OSG on Linux Mint and CentOS with Gtk. From my notes all I did was:

CMakeLists.txt

461c461
< SET(OPENGL_PROFILE "GL3" CACHE STRING "OpenGL Profile to use, choose from GL1, GL2, GL3, GLES1, GLES2, GLES3")
---
SET(OPENGL_PROFILE "GL2" CACHE STRING "OpenGL Profile to use, choose from GL1, GL2, GL3, GLES1, GLES2, GLES3")
On Mon, 2021-04-05 at 10:20 -0700, Hardy Family wrote:
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


_______________________________________________

osg-users mailing list

<mailto:osg-***@lists.openscenegraph.org>

osg-***@lists.openscenegraph.org


<http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org>

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Scott
2021-04-06 04:12:31 UTC
Permalink
Hi Steve,

Here's the configuration that I've been using...

OPENGL_PROFILE=GLCORE
OSG_GL_CONTEXT_VERSION=4.6
OpenGL_GL_PREFERENCE=GLVND

With a clean CMAKE config, it will set the defaults... (purge all the
OSG_xxx items if they already have values assigned)

OPENGL_HEADER1=#include <GL/glcorearb.h>
OSG_GL1_AVAILABLE=OFF
OSG_GL2_AVAILABLE=OFF
OSG_GL3_AVAILABLE=ON
OSG_GL_DISPLAYLISTS_AVAILABLE=OFF
OSG_GL_FIXED_FUNCTION_AVAILABLE=OFF
etc...

Scott
Post by Hardy Family
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
--
You received this message because you are subscribed to the Google
Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/osg-users/9bb6453e-a9f5-461c-8b4e-a1eb23dc99a0n%40googlegroups.com
<https://groups.google.com/d/msgid/osg-users/9bb6453e-a9f5-461c-8b4e-a1eb23dc99a0n%40googlegroups.com?utm_medium=email&utm_source=footer>.
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Loading...