Discussion:
[osg-users] Moving from 3.4.1 to 3.5.7 breaks my "hardware instancing"
Andrew Cunningham
2018-10-01 16:09:58 UTC
Permalink
Hi,
I upgraded from 3.4.1 to 3.5.7 and my code that uses "hardware instancing" (to render a large number of simple geometry) renders nothing now.

I had no need to make any source code changes when I updated, and other parts of the code that uses vertex/fragment shaders works fine. I am wondering what could have changed to break this code?

The outline is that I have a class that inherits from Drawable and overrides drawImplementation/computeBoundingBox/supports/accept
I am adding a VertexAttribDivisor to the Program

OSG_NOTIFY_LEVEL=DEBUG shows nothing interesting.

Any ideas where I should start looking?

Andrew

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75000#75000
Julien Valentin
2018-10-01 20:35:46 UTC
Permalink
Hi
is osgdrawinstanced example working as expected?
What's your configuration specificities (gpu driver, plateform...)?
cheers
Post by Andrew Cunningham
Hi,
I upgraded from 3.4.1 to 3.5.7 and my code that uses "hardware instancing" (to render a large number of simple geometry) renders nothing now.
I had no need to make any source code changes when I updated, and other parts of the code that uses vertex/fragment shaders works fine. I am wondering what could have changed to break this code?
The outline is that I have a class that inherits from Drawable and overrides drawImplementation/computeBoundingBox/supports/accept
I am adding a VertexAttribDivisor to the Program
OSG_NOTIFY_LEVEL=DEBUG shows nothing interesting.
Any ideas where I should start looking?
Andrew
------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75004#75004
Robert Osfield
2018-10-02 07:42:44 UTC
Permalink
Hi Andrew,
Post by Andrew Cunningham
I upgraded from 3.4.1 to 3.5.7 and my code that uses "hardware instancing" (to render a large number of simple geometry) renders nothing now.
3.5.7 is a developer release and is unsupported, I wouldn't recommend
using an old developer release when later stable releases are
available. Please upgrade to 3.6.3 then see if the problem persists -
we have spent a lot of time testing and debugging in the 3.6.x stable
release cycle so should be a good base to work from.

If a problem persist with 3.6.3 then creating a small test program
that illustrates the program would be helpful, if there is an issue
with your usage we can spot it, if there is a bug in the OSG we can
use it as a unit test for reproducing the regressions and confirming
that it's fixed once the bug is found.

Cheers,
Robert.
Andrew Cunningham
2018-10-02 15:01:34 UTC
Permalink
Hi Robert,
Not sure where the 3.5.7 came from - another dev must have grabbed it from GIT a while ago.
I'll update to 3.6.3 and see what happens.
Thanks

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75020#75020
Andrew Cunningham
2018-10-03 15:34:57 UTC
Permalink
Hi Robert,

Updating to 3.6.3 fixed the problem!

I did find a possible subtle issue with 3.6.3 when OSG_NOTIFY_LEVEL=DEBUG.
No issues at other OSG_NOTIFY_LEVELs.

I am getting a crash at program exit at this line, called from GraphicsObjectManager::~GraphicsObjectManager


std::ostream& osg::notify(const osg::NotifySeverity severity)
{
if (osg::isNotifyEnabled(severity))
{
getNotifySingleton()._notifyStream.setCurrentSeverity(severity);
return getNotifySingleton()._notifyStream; <---crash here
}
return getNotifySingleton()._nullStream;
}

GraphicsObjectManager::~GraphicsObjectManager()
{
OSG_INFO<<_name<<"::~"<<_name<<"()"<<this<<std::endl;
}


My suspicion is that some "singletons" are getting destroyed in such an order that the "NotifySingleton" is destroyed before , say, the osg::ContextData is destroyed.


osg158-osgd.dll!osg::notify(const osg::NotifySeverity severity) Line 231 C++
osg158-osgd.dll!osg::GraphicsObjectManager::~GraphicsObjectManager() Line 70 C++
osg158-osgd.dll!osg::GLObjectManager::~GLObjectManager() Line 85 C++
[External Code]
osg158-osgd.dll!osg::Referenced::signalObserversAndDelete(bool signalDelete, bool doDelete) Line 292 C++
osg158-osgd.dll!osg::Referenced::unref() Line 194 C++
osg158-osgd.dll!osg::ref_ptr<osg::Referenced>::~ref_ptr<osg::Referenced>() Line 41 C++
[External Code]
osg158-osgd.dll!osg::ContextData::~ContextData() Line 35 C++
[External Code]
osg158-osgd.dll!osg::Referenced::signalObserversAndDelete(bool signalDelete, bool doDelete) Line 292 C++
osg158-osgd.dll!osg::Referenced::unref() Line 194 C++
osg158-osgd.dll!osg::ref_ptr<osg::ContextData>::~ref_ptr<osg::ContextData>() Line 41 C++
Anyway, it's a minor issue and does not affect release code.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75029#75029

Continue reading on narkive:
Loading...