OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Moving from 3.4.1 to 3.5.7 breaks my "hardware instancing"


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
loopy
User


Joined: 11 Mar 2009
Posts: 81

PostPosted: Mon Oct 01, 2018 4:09 pm    Post subject:
Moving from 3.4.1 to 3.5.7 breaks my "hardware instancing"
Reply with quote

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
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 484
Location: France

PostPosted: Mon Oct 01, 2018 8:35 pm    Post subject:
Re: Moving from 3.4.1 to 3.5.7 breaks my "hardware instancing"
Reply with quote

Hi
is osgdrawinstanced example working as expected?
What's your configuration specificities (gpu driver, plateform...)?
cheers

loopy wrote:
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
Back to top
View user's profile Send private message Visit poster's website
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12145

PostPosted: Tue Oct 02, 2018 7:43 am    Post subject:
Moving from 3.4.1 to 3.5.7 breaks my "hardware instancing"
Reply with quote

Hi Andrew,

On Tue, 2 Oct 2018 at 03:45, Andrew Cunningham <> wrote:
Quote:
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.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
loopy
User


Joined: 11 Mar 2009
Posts: 81

PostPosted: Tue Oct 02, 2018 3:01 pm    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
loopy
User


Joined: 11 Mar 2009
Posts: 81

PostPosted: Wed Oct 03, 2018 3:34 pm    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts A question of "ShaderPipeline di... loening General 0 Tue Nov 13, 2018 5:31 pm View latest post
No new posts Fix hardware mipmap generation for cu... robertosfield Submission 3 Tue Oct 02, 2018 11:38 am View latest post
No new posts [HELP] Properly using osg::VertexAttr... ppsychrite General 3 Wed Aug 01, 2018 12:17 pm View latest post
No new posts [Crash issue] no error info even set ... pwang General 1 Sun Jul 29, 2018 1:20 pm View latest post
No new posts Fix hardware mipmap generation for cu... Farshid Lashkari Submission 0 Wed Jul 18, 2018 3:47 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP