Handles Resource management, including loading and unloading Resource instances.
More...
#include <ResourceMgr.h>
|
void | update () |
| Do the tasks for this frame. Must be called each frame.
|
|
Resource * | getResource (const std::string &name) |
| Returns a resource by name. Will return a null pointer if the resource doesn't exists.
|
|
void | loadResource (Resource *resource, bool inBackground=true) |
| Starts loading a Resource. More...
|
|
void | unload (const std::string &resourceName) |
| Free memory allocated by a given Resource by name.
|
|
void | reload () |
| On context lost.
|
|
void | dumpResources (const std::string &extension="*") |
| Display the Resource instances currently loaded in memory.
|
|
int | numPendingResources () |
| Number of Resource instances waiting to be loaded.
|
|
void | clean () |
| Cleans all Resources with no users.
|
|
|
int | memoryWarnings |
| For iOS, the number of memory warnings given by the OS.
|
|
Handles Resource management, including loading and unloading Resource instances.
void ResourceMgr::loadResource |
( |
Resource * |
resource, |
|
|
bool |
inBackground = true |
|
) |
| |
Starts loading a Resource.
The Resource can be loaded synchronous or asynchronously.
- Parameters
-
inBackground | If true the Resource will be loaded in a background thread. |
The documentation for this class was generated from the following files:
- D:/prj/rag/include/rag/ResourceMgr.h
- D:/prj/rag/include/rag/ResourceMgr.cpp