Sign in to follow this  

Resource Cache and Editable Textures

This topic is 4353 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
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

This topic is 4353 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this