Game Development Reference
In-Depth Information
Loading and caching the textures is as easy as calling one method. In the preceding ex-
ample, the first two calls to
AssetManager::GetTexture()
load and cache the
new textures, but in the last call (
sprite3
), the manager only returns the cached texture,
saving us the time and memory involved to load it again.