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 

Loading osgt from string / Compile resources into binary


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


Joined: 05 Oct 2017
Posts: 9

PostPosted: Mon Jan 21, 2019 11:02 am    Post subject:
Loading osgt from string / Compile resources into binary
Reply with quote

Hi guys,

is it possible to somehow compile resources like models/nodes into an executable?
How about putting the content of an osgt file as a string into my source code?
But as far as I've seen, there is no readNodeFromString method in osgDB.

Any ideas/suggestions?

Thank you!

Cheers,
Michael
Back to top
View user's profile Send private message
sbrkopac
User


Joined: 14 Jun 2018
Posts: 21

PostPosted: Mon Jan 21, 2019 5:11 pm    Post subject:
Loading osgt from string / Compile resources into binary
Reply with quote

Hi Michael,

The portable way is to define a byte array.


See this stackoverflow for more detail: https://stackoverflow.com/questions/7288279/how-to-embed-a-file-into-an-executable

Sent from my iPhone

On Jan 21, 2019, at 4:02 AM, Michael Maurus < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:


Quote:
Hi guys,

is it possible to somehow compile resources like models/nodes into an executable?
How about putting the content of an osgt file as a string into my source code?
But as far as I've seen, there is no readNodeFromString method in osgDB.

Any ideas/suggestions?

Thank you!

Cheers,
Michael

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





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12336

PostPosted: Wed Jan 23, 2019 8:45 am    Post subject:
Loading osgt from string / Compile resources into binary
Reply with quote

Hi Michael,

Quote:
is it possible to somehow compile resources like models/nodes into an executable?
How about putting the content of an osgt file as a string into my source code?
But as far as I've seen, there is no readNodeFromString method in osgDB.

You can pass a std::stringstream to the ReaderWriter that support
reading from istream. You'll need to get the osgDB::ReaderWriter from
the osgDB::Registry instance.

Robert.


------------------
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 Loading .fbx files causes triangulati... neonerd Plugins [osgPlugins] 2 Mon Aug 19, 2019 6:01 am View latest post
No new posts compile osgQt by osg3.6.3 fail sx341125 General [forum] 2 Sun Jul 28, 2019 2:01 pm View latest post
No new posts Loading .fbx files causes triangulati... neonerd Plugins [osgPlugins] 0 Tue Jun 18, 2019 3:14 am View latest post
No new posts Issue with osgt format on 3.6.x Riccardo Corsi General 1 Wed Apr 17, 2019 3:46 pm View latest post
No new posts How to properly compile osg with EGL ... Omar Álvarez General 25 Wed Jan 23, 2019 12:16 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