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 

update node in view using cullcallback


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


Joined: 15 Aug 2018
Posts: 6

PostPosted: Wed Aug 29, 2018 11:40 pm    Post subject:
update node in view using cullcallback
Reply with quote

Hi,

I am recently working on a big scene simulation project. To optimize the performance, we consider to only update elements (material color, position, rotation etc.) in frustum or are not culled. The most straightforward method is using cullcallback to do the update. I implemented it and it works. However, after come across some online articles, most of them are not suggested to use cullcallback. Could I ask is there any drawbacks to do so?

Thank you!

Cheers,
Cong
Back to top
View user's profile Send private message
sirian_ye
Newbie


Joined: 15 Aug 2018
Posts: 6

PostPosted: Thu Aug 30, 2018 5:58 am    Post subject:
Re: update node in view using cullcallback
Reply with quote

One following question is how can I do the same for drawable and attribute callback?

sirian_ye wrote:
Hi,

I am recently working on a big scene simulation project. To optimize the performance, we consider to only update elements (material color, position, rotation etc.) in frustum or are not culled. The most straightforward method is using cullcallback to do the update. I implemented it and it works. However, after come across some online articles, most of them are not suggested to use cullcallback. Could I ask is there any drawbacks to do so?

Thank you!

Cheers,
Cong
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12127

PostPosted: Thu Aug 30, 2018 6:51 am    Post subject:
update node in view using cullcallback
Reply with quote

Hi Cong,

Whether it's safe to do or not will depend the threading you are using
in your viewer. If you viewer is running single threaded then it
should be fine to use cull callbacks. However, if you have multiple
cull traversals threads happening in parallel then you'll end up with
a potential race condition unless you mutex your callbacks.

Robert.

On Thu, 30 Aug 2018 at 00:39, Cong Ye <> wrote:
Quote:

Hi,

I am recently working on a big scene simulation project. To optimize the performance, we consider to only update elements (material color, position, rotation etc.) in frustum or not culled. The most straightforward method come to me is using cullcallback to do the update. I implemented it and it works. However, after come across some online articles, most of them are not suggested to use cullcallback. Could I ask is there any drawbacks to do so?

Thank you!

Cheers,
Cong

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








------------------
Post generated by Mail2Forum
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 CompositeViewer with multiple view, a... Angel General 3 Tue Aug 28, 2018 1:15 pm View latest post
No new posts Leaking memory on node removal Tini General 1 Fri May 25, 2018 6:48 pm View latest post
No new posts Leaking memory on node removal Tini General 0 Fri May 25, 2018 6:39 pm View latest post
No new posts Leaking memory on node removal Tini General 0 Fri May 25, 2018 6:30 pm View latest post
No new posts Leaking memory on node removal Tini General 0 Fri May 25, 2018 6:27 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