Jump to content
  • Advertisement
Sign in to follow this  
Raeldor

Resource Cache and Editable Textures

This topic is 4693 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have my resource cache working which loads frequently used textures into memory from disk. I now want to make some of the textures editable (long story), so should I create a seperate texture class and forget using the resource cache, or can a resource cache also be used for editable textures (maybe using temporary files?). Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Couldn't you simply create a resource lock in the cache? When the texture becomse editable, set a flag that tells your caching system to remove it from the cache if it's in the cache, and if it's going to load it, not to.

That way, you still have the benefits of caching, you still have editable textures, and everything works nicely. Two member functions, and an array should be all you need.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!