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 

My cow.osg just become different in a hello world pragram


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


Joined: 22 Sep 2016
Posts: 8

PostPosted: Mon Apr 24, 2017 12:02 pm    Post subject:
My cow.osg just become different in a hello world pragram
Reply with quote

Hi,
I'm a newbie.
I found that the osg cow I read from node file is different. The color of the cow become white, it seems like the texture is gone. The code is as simple as a helloworld pragram.

osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer;
osg::ref_ptr<osg::Group> gp = new osg::Group;
osg::ref_ptr<osg::Node> node = osgDB::readNodeFile("cow.osg");
gp->addChild(node);
viewer->setSceneData(gp);
hm->showMenu(0x01, false);
viewer->run();

Although it doesn't matter because my other model works fine, but I'm still confused with this problem because it once looked alright. And the cow.osg I read from the cmd.exe with osgViewer cow.osg is just like the osg cow.

Has anyone ever had this problem?

Thank you!

Cheers,
Jiechang
Back to top
View user's profile Send private message Send e-mail
Rambabu
Appreciator


Joined: 10 Nov 2016
Posts: 101

PostPosted: Mon Apr 24, 2017 1:16 pm    Post subject:
Reply with quote

Hi,Jiechang instead of cow.osg give the full path of osg model for cow.osg
I think problem will solve.

...

Thank you!

Cheers,
Rambabu
Back to top
View user's profile Send private message
Jiechang Guo
Newbie


Joined: 22 Sep 2016
Posts: 8

PostPosted: Tue Apr 25, 2017 10:43 am    Post subject:
Reply with quote

Thank you,Rambabu.
I made a misteak, after check my lib, I can't find osgdb_rgbd.dll, that's the problem.
The problem was solved~
Thank you,any way!

Cheers,
Jiechang
Back to top
View user's profile Send private message Send e-mail
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 Convert from screen space to world sp... NavyBas General 0 Thu Jun 22, 2017 6:14 pm View latest post
No new posts How to add hello world/additional pro... tipking General 3 Mon Jun 12, 2017 10:25 am View latest post
No new posts Geometry in world coordinates but wit... Roko General 11 Wed Jan 18, 2017 8:43 am View latest post
No new posts Mapping world cordinates to screen co... suraj General 1 Sun Sep 18, 2016 9:23 am View latest post
No new posts Getting world coordinates from screen... wernerM General 0 Wed Jul 22, 2015 8:40 am 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