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 

Clarification on CACHE_IMAGES and use of SharedStateManager


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
swanggt1 (Glen Swanger)
Newbie


Joined: 04 Apr 2011
Posts: 7

PostPosted: Wed Mar 01, 2017 4:05 pm    Post subject:
Clarification on CACHE_IMAGES and use of SharedStateManager
Reply with quote

Some Context,
I have several model files that use the same textures (e.g. electronics cabinets with very similar parts, but different layout and composition). I need to keep the models in separate files based on the mode our application is configured to run (e.g. load a single station model file, or load all station model files into a play area). In the play area mode I want to share textures between the model files to reduce CPU and GPU memory load. Although there are a fair number of parts in our model we aren’t draw call bound at this point, so I want to make sure I understand the process of setting up the osgDB Registry to create these shared texture resources.

I’d appreciate confirmation, corrections, or alternatives to the following steps:
<![if !supportLists]>1. <![endif]>Make sure model files are setup to use external file references for texture images.
<![if !supportLists]>2. <![endif]>Set the CacheHintOptions on the Registry to CACHE_IMAGES.
<![if !supportLists]>3. <![endif]>Set ShareMode on the Registry SharedStateManager to SHARE_TEXTURES.
<![if !supportLists]>4. <![endif]>Load model files that share texture image files.

Also, I know I can set the ShareMode to SHARE_STATE too, but the user needs to interact with a lot of the parts independently and the parts operational states are controlled by StateSet shader uniforms to control rendered result. I’m going to add an application option to turn this on and off because I’m not sure how it will affect the end rendered results?

If anyone has any other suggestions for minimizing CPU and GPU memory load in the context described above, I’d greatly appreciate it.
Thanks,
Glen

------------------
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 Clarification on plans for the osg::G... gwaldron General 1 Fri Oct 04, 2013 6:32 pm View latest post
No new posts SharedStateManager performance issues danoo General 2 Thu Sep 26, 2013 11:28 am View latest post
No new posts SharedStateManager Basics (2) NavyBas General 1 Wed Aug 01, 2012 4:18 pm View latest post
No new posts SharedStateManager Basics NavyBas General 6 Tue Jul 31, 2012 3:46 pm View latest post
No new posts A crash problem while using SharedSta... Wang Rui General 1 Fri Mar 23, 2012 3:01 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