|
Isle
|
Specialized LegoContainer handling LegoTextureInfo objects and their DirectDraw/Direct3D caching. More...
#include <legocontainer.h>


Public Member Functions | |
| ~LegoTextureContainer () override | |
| Destructor. More... | |
| LegoTextureInfo * | GetCached (LegoTextureInfo *p_textureInfo) |
| Attempt to find and return a cached LegoTextureInfo with the same properties as p_textureInfo, or create and cache a new one if not found. More... | |
| void | EraseCached (LegoTextureInfo *p_textureInfo) |
| Mark a cached texture as unused and release its Direct3D/DirectDraw resources if its reference count reaches zero. More... | |
Public Member Functions inherited from LegoContainer< LegoTextureInfo > | |
| LegoContainer () | |
| Default constructor, sets this container to own its elements. More... | |
| virtual | ~LegoContainer () |
| Destructor. More... | |
| void | Clear () |
| Remove and delete all mapped objects; preserves key strings. More... | |
| LegoTextureInfo * | Get (const char *p_name) |
| Retrieve the element mapped to the given name, or nullptr if missing. More... | |
| void | Add (const char *p_name, LegoTextureInfo *p_value) |
| Add an element mapped to the given name, replacing existing item if present. More... | |
| void | SetOwnership (LegoBool p_ownership) |
| Set whether this container owns/deletes its objects (and name strings) on removal/destruction. More... | |
Protected Attributes | |
| LegoCachedTextureList | m_cached |
| List of cached temporary texture objects, pairing texture info with a cache/in-use flag. [AI]. More... | |
Protected Attributes inherited from LegoContainer< LegoTextureInfo > | |
| LegoBool | m_ownership |
| If TRUE, container owns objects and keys; else no cleanup on destruction. [AI]. More... | |
| LegoContainerInfo< LegoTextureInfo > | m_map |
| Underlying map from name strings to objects. [AI]. More... | |
Specialized LegoContainer handling LegoTextureInfo objects and their DirectDraw/Direct3D caching.
[AI]
[AI] In addition to basic named texture management, supports tracking and sharing temporary DirectDraw/Direct3D textures, avoiding redundant texture loads and managing texture resources efficiently. [AI] @inherits LegoContainer<LegoTextureInfo> [AI]
Definition at line 169 of file legocontainer.h.
|
override |
Destructor.
Cleans up all cached textures as well as the standard container cleanup. [AI]
[AI] Ensures that texture resources in m_cached are released. [AI]
Definition at line 13 of file legocontainer.cpp.
| void LegoTextureContainer::EraseCached | ( | LegoTextureInfo * | p_textureInfo | ) |
Mark a cached texture as unused and release its Direct3D/DirectDraw resources if its reference count reaches zero.
[AI]
| p_textureInfo | The texture to erase from the cache. [AI] |
[AI] Sets the cached/freed flag to FALSE and erases the texture from cache if its ref count is now 0, cleaning up its resources. [AI]
Definition at line 115 of file legocontainer.cpp.
| LegoTextureInfo * LegoTextureContainer::GetCached | ( | LegoTextureInfo * | p_textureInfo | ) |
Attempt to find and return a cached LegoTextureInfo with the same properties as p_textureInfo, or create and cache a new one if not found.
[AI]
| p_textureInfo | The reference texture to match or duplicate. [AI] |
[AI] Tries to match any existing cached texture of the same name and size; if none, duplicates the DirectDraw surface and texture for sharing. [AI]
Definition at line 18 of file legocontainer.cpp.
|
protected |
List of cached temporary texture objects, pairing texture info with a cache/in-use flag. [AI].
Definition at line 193 of file legocontainer.h.