[osg-users] C++11 for next stable release of OpenSceneGraph?

Robert Osfield robert.osfield at gmail.com
Sun Jun 10 23:57:50 PDT 2018

Hi All,

My current focus is on the VulkanSceneGraph, exploring C+11, Vulkan
and new ideas of what a next gen scene graph should look like.
OpenSceneGraph is still very much my baby though.  Stuff that is
working well on the VulkanSceneGraph could serve as a model for what
we can do to elements of the OpenSceneGraph, so potentially as
advances are made in VulkanSceneGraph would could refactor the
OpenSceneGraph to take advantage of similar approaches.

While OpenSceneGraph will remain focused on OpenGL and aim to retain
good backwards compatibility there may be opportunities to make life
easier to OpenSceneGraph users.  One of these areas is taking
advantage of some of the features that C++11 has to offer.  So far on
the VulkanSceneGraph side I've experimented with some low level
equivalents of things like ref counting, ref pointers, observer
pointers taking advantage of C++11 and it's a delight, the code is
SOOOO much simpler and cleaner that what's presently in the

So I'd like to put out the topic for discussion about whether we could
set the min compiler version of the OpenSceneGraph to C++11 for the
next major stable release.  I don't have any specific plans to this
next stable release, I'm assuming it'll be 4.0, it'll likely be
another year or so before being released.  I would like to this
OpenSceneGraph stable release to sync in a bit with the
VulkanSceneGraph efforts but as this project is just beginning the
schedule for it's own releases is completely open.  When I say sync a
bit, I'm really just referring to taking opportunities to cross
pollinate ideas a bit, make co-existance of the two projects easier,
what that will mean in practice I absolutely can't say, it's really
just an aspiration right now.

Back to C++11, the pros of adopting it for OpenSceneGraph-4.0 is that
we could simplify parts of the core OpenSceneGraph, making it both
easier to lean and maintain.  Potentially even OpenThreads could be
removed as dependency and then from the core OpenSceneGraph and made
it's own separate project once again.

The cons of adopting C++ would be restrictions on just how old the
compilers can be to be used with OpenSceneGraph-4.x, so could limit
one aspect to backwards compatibility.

I would suggest that OpenSceneGraph-3.x series remain compilable
without needing C++11.  So 3.6.x for instance we'll make bug fixes etc
but never change the compiler requirements.


More information about the osg-users mailing list