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 

Regarding Culling in osg


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


Joined: 10 Nov 2016
Posts: 101

PostPosted: Sat Apr 22, 2017 7:21 am    Post subject:
Regarding Culling in osg
Reply with quote

Hi,Can anyone tell me is there any example code (i.e .cpp file )for Backfaceculling,face culling and frustum culling in osg.

Any Help is appreciated.

...

Thank you!

Cheers,
Rambabu
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 297

PostPosted: Sat Apr 22, 2017 4:06 pm    Post subject:
Re: Regarding Culling in osg
Reply with quote

Hi,

Forum is plenty of information about osg culling
http://forum.openscenegraph.org/viewtopic.php?t=15959
http://forum.openscenegraph.org/viewtopic.php?t=16095

More generally, you can search the forum by yourself for the term "CullCallback" or "CullVisitor" or "CullFace"
And come back when your question is more precise

Cheers

Rambabu wrote:
Hi,Can anyone tell me is there any example code (i.e .cpp file )for Backfaceculling,face culling and frustum culling in osg.

Any Help is appreciated.

...

Thank you!

Cheers,
Rambabu
Back to top
View user's profile Send private message
Rambabu
Appreciator


Joined: 10 Nov 2016
Posts: 101

PostPosted: Mon Apr 24, 2017 5:57 am    Post subject:
Reply with quote

Hi,Julien Thanks for the reply and Iam having another doubt in CullCallback.cpp which iam mentioning below

He is reading from command line what is the exact meaning of --test,test1,test2...... etc means and what i have to give in the command line to execute this code?
if (arguments.read("--test"))
{
osg::ref_ptr<osg::Group> root = new osg::Group();
rootnode = root;

osg::Node *test1 = new osg::Node();
test1->setUpdateCallback(new TestNodeUpdateCallback("test1"));
root->addChild(test1);

osg::Drawable *test2 = new osg::Drawable();
test2->osg::Node::setUpdateCallback(new TestNodeUpdateCallback("test2"));
root->addChild(test2);

osg::Drawable *test3 = new osg::Drawable();
test3->setUpdateCallback(new TestDrawableUpdateCallback("test3"));
root->addChild(test3);

osg::Geode *test4 = new osg::Geode();
osg::Drawable *drawable1 = new osg::Drawable();
drawable1->osg::Node::setUpdateCallback(new TestNodeUpdateCallback("test4"));
test4->addDrawable(drawable1);
root->addChild(test4);

osg::Geode *test5 = new osg::Geode();
osg::Drawable *drawable2 = new osg::Drawable();
drawable2->setUpdateCallback(new TestDrawableUpdateCallback("test5"));
test5->addDrawable(drawable2);
root->addChild(test5);

osg::Geode *test6 = new osg::Geode();
osg::Drawable *drawable3 = new osg::Drawable();
drawable3->setUpdateCallback(new TestDrawableUpdateCallback("test6"));
test6->addChild(drawable3);
root->addChild(test6);

osg::Geode *test7 = new osg::Geode();
osg::Drawable *drawable4 = new osg::Drawable();
drawable4->osg::Node::setUpdateCallback(new TestNodeUpdateCallback("test7"));
test7->addChild(drawable4);
root->addChild(test7);

printf("Numchildren with updates %u\n", rootnode->getNumChildrenRequiringUpdateTraversal());

Any Help is appreciated.


...

Thank you!

Cheers,
Rambabu
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 camera far plane culling issues Trajce Nikolov NICK General 2 Sun Oct 16, 2016 10:33 pm View latest post
No new posts camera pre-render and culling order Trajce Nikolov NICK General 2 Sat Sep 10, 2016 10:49 am View latest post
No new posts Masked Occlusion Culling bbjorn General 0 Thu Jun 16, 2016 9:40 pm View latest post
No new posts Strange culling of Drawables in OSG 3... allcreater General 3 Wed Jan 27, 2016 9:27 am View latest post
No new posts How to draw everything (and disable f... hunter789 General 1 Thu Dec 17, 2015 6:17 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