So, I have been thinking a little more about the resource cache. It seems like it is more of a disk cache, ie to keep the files in memory so the disk is accessed less. This is fine, but isn't there another side to resource management?
What about if you have loaded a texture and created a texture object and then that texture is used again by another model. Your solution means that the texture would not need to be read from disk again which is great, but don't you need some way of sharing the actual texture object that was created too. Otherwise you will have two seperate texture objects when only one could be shared by both models.
Does this mean you need a resource cache, and also some kind of texture manager (or mesh manager too), to be able to re-use and not duplicate already created objects and associated buffers?
Couldn't you take this resource cache further and make the resource cache the actual created objects rather than just the file itself? Is there a pitfall to this scheme?
Thanks again for any insight.
What about if you have loaded a texture and created a texture object and then that texture is used again by another model. Your solution means that the texture would not need to be read from disk again which is great, but don't you need some way of sharing the actual texture object that was created too. Otherwise you will have two seperate texture objects when only one could be shared by both models.
Does this mean you need a resource cache, and also some kind of texture manager (or mesh manager too), to be able to re-use and not duplicate already created objects and associated buffers?
Couldn't you take this resource cache further and make the resource cache the actual created objects rather than just the file itself? Is there a pitfall to this scheme?
Thanks again for any insight.
The post was edited 2 times, last by Raeldor ().