Timeline for Texture caching in 2D XNA game
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 28, 2012 at 7:10 | comment | added | Roy T. | Damn I misread, it's indeed all data :/... | |
| Jul 28, 2012 at 6:13 | comment | added | Andrew Russell | ContentManager keeps a database of everything it has loaded. When asked to load something, it will check its database first (ie: it is a cache). The default behaviour of ContentManager is to unload the entire database when you call Unload() - you must inherit from ContentManager if you want more fine-grained control over what is unloaded. | |
| Jul 27, 2012 at 19:01 | comment | added | Roy T. | In that case he won't even need to make his own. He'll just have to remember what not to unload ever frame (I believe that the Unload method even removes it from the cache, doesn't it? The documentation don't mention the cache here anyway msdn.microsoft.com/en-us/library/…). | |
| Jul 27, 2012 at 12:32 | comment | added | Andrew Russell | XNA's ContentManager already acts as a cache. Generally it's better to modify its caching policy using inheritance, than creating a wrapper. Especially given that, unless you modify it anyway, your only option for unloading is to unload the entire content manager at once. | |
| Jul 27, 2012 at 10:37 | history | answered | Roy T. | CC BY-SA 3.0 |