mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
A new generation, open-source graphics plugin for N64 emulators.
4e415802fa
I change the currently used 'map' of textures to a queue (implemented as a list), and then remove from the end of the queue when textures need removing from the cache, and adding to the beginning of the queue. The other operation that is needed is moving the texture to the front of the list whenever it is used, so that frequently used textures are not deleted. In order to make that last operation effecient, I created a map of the locations of these textures, and keep that properly updated. This makes the accessing of a texture still O(1). Then, in order to have the iterators remain valid through insertions and deletions, I needed to implement the queue as a list. The map and queue implementation is a standard way to implement an LRU cache, just FYI. Not something I thought of all on my own. Fixes issue #744 |
||
---|---|---|
ini | ||
licenses | ||
projects | ||
src | ||
translations | ||
.gitignore | ||
LICENCE | ||
README.md |
GLideN64
A new generation, open-source graphics plugin for N64 emulators.