Cache and reuse program object. More...
Inherits Ref.
Public Member Functions | |
| backend::Program * | getBuiltinProgram (ProgramType type) const |
| get built-in program | |
| void | removeProgram (backend::Program *program) |
| Remove a program object from cache. More... | |
| void | removeUnusedProgram () |
| Remove all unused program objects from cache. | |
| void | removeAllPrograms () |
| Remove all program objects from cache. | |
Public Member Functions inherited from Ref | |
| void | retain () |
| Retains the ownership. More... | |
| void | release () |
| Releases the ownership immediately. More... | |
| Ref * | autorelease () |
| Releases the ownership sometime soon automatically. More... | |
| unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count. More... | |
| virtual | ~Ref () |
| Destructor. More... | |
Static Public Member Functions | |
| static ProgramCache * | getInstance () |
| returns the shared instance | |
| static void | destroyInstance () |
| purges the cache. More... | |
Additional Inherited Members | |
Public Attributes inherited from Ref | |
| unsigned int | _ID |
| object id, ScriptSupport need public _ID | |
| int | _luaID |
| Lua reference id. | |
| void * | _scriptObject |
| scriptObject, support for swift | |
| bool | _rooted |
| When true, it means that the object was already rooted. | |
Cache and reuse program object.
|
static |
purges the cache.
It releases the retained instance.
| void removeProgram | ( | backend::Program * | program | ) |
Remove a program object from cache.
| program | Specifies the program object to move. |