18 #ifndef ION_GFX_RESOURCEBASE_H_
19 #define ION_GFX_RESOURCEBASE_H_
64 virtual void OnChanged(
const int bit) = 0;
83 #endif // ION_GFX_RESOURCEBASE_H_
const ResourceHolder * GetHolder() const
Retrieve the holder for which this resource was created.
virtual size_t GetGpuMemoryUsed() const =0
Returns the amount of GPU memory in bytes that this resource uses.
ResourceKey GetKey() const
Retrieve a key that disambiguates between multiple resources created for the same holder by the same ...
virtual void OnDestroyed()=0
Each derived class must define these to acquire and release its resource.
intptr_t ResourceKey
Type of identifiers used to disambiguate between multiple resources created for the same Ion object b...
ResourceBase is an internal abstract base class for managed resources.
virtual void OnChanged(const int bit)=0
Informs the resource that something has changed and that it needs to update itself.
ResourceBase(const ResourceHolder *holder, ResourceKey key)
The constructor accepts a holder parameter to simplify control flow during construction.
ResourceHolder is an internal base class for objects that hold resources managed by an outside entity...