ShaderCache Singleton that stores manages GL shaders. More...
#include <CCShaderCache.h>
Public Member Functions | |
| ShaderCache () | |
| virtual | ~ShaderCache () |
| void | loadDefaultShaders () |
| loads the default shaders More... | |
| void | reloadDefaultShaders () |
| reload the default shaders More... | |
| GLProgram * | getProgram (const std::string &key) |
| returns a GL program for a given key More... | |
| CC_DEPRECATED_ATTRIBUTE GLProgram * | programForKey (const std::string &key) |
| void | addProgram (GLProgram *program, const std::string &key) |
| adds a GLProgram to the cache for a given name More... | |
Public Member Functions inherited from Object | |
| Object () | |
| Constructor. More... | |
| virtual | ~Object () |
| void | release () |
| Release the ownership immediately. More... | |
| void | retain () |
| Retains the ownership. More... | |
| Object * | autorelease () |
| Release the ownership sometime soon automatically. More... | |
| bool | isSingleReference () const |
| Returns a boolean value that indicates whether there is only one reference to the object. More... | |
| unsigned int | retainCount () const |
| Returns the object's current reference count. More... | |
| virtual bool | isEqual (const Object *object) |
| Returns a boolean value that indicates whether this object and a given object are equal. More... | |
| virtual void | acceptVisitor (DataVisitor &visitor) |
| virtual void | update (float dt) |
Static Public Member Functions | |
| static ShaderCache * | getInstance () |
| returns the shared instance More... | |
| local | getInstance () |
| returns the shared instance More... | |
| static void | destroyInstance () |
| purges the cache. More... | |
| static CC_DEPRECATED_ATTRIBUTE ShaderCache * | sharedShaderCache () |
| local | sharedShaderCache () |
| static CC_DEPRECATED_ATTRIBUTE void | purgeSharedShaderCache () |
| local | purgeSharedShaderCache () |
Additional Inherited Members | |
Public Attributes inherited from Object | |
| unsigned int | _ID |
| object id, ScriptSupport need public _ID More... | |
| int | _luaID |
| Lua reference id. More... | |
Protected Attributes inherited from Object | |
| unsigned int | _reference |
| count of references More... | |
| var | _reference |
| count of references More... | |
| local | _reference |
| count of references More... | |
| unsigned int | _autoReleaseCount |
| count of autorelease More... | |
| var | _autoReleaseCount |
| count of autorelease More... | |
| local | _autoReleaseCount |
| count of autorelease More... | |
ShaderCache Singleton that stores manages GL shaders.
| ShaderCache | ( | ) |
| var ctor | ( | ) |
| local ShaderCache | ( | ) |
|
virtual |
| void addProgram | ( | GLProgram * | program, |
| const std::string & | key | ||
| ) |
adds a GLProgram to the cache for a given name
| var addProgram | ( | var | program, |
| var | key | ||
| ) |
adds a GLProgram to the cache for a given name
| local addProgram | ( | local | program, |
| local | key | ||
| ) |
adds a GLProgram to the cache for a given name
|
static |
purges the cache.
It releases the retained instance.
|
static |
purges the cache.
It releases the retained instance.
|
static |
purges the cache.
It releases the retained instance.
|
static |
returns the shared instance
|
static |
returns the shared instance
|
static |
returns the shared instance
| var getProgram | ( | var | key) |
returns a GL program for a given key
| local getProgram | ( | local | key) |
returns a GL program for a given key
| void loadDefaultShaders | ( | ) |
loads the default shaders
| var loadDefaultShaders | ( | ) |
loads the default shaders
| local loadDefaultShaders | ( | ) |
loads the default shaders
|
inline |
|
static |
|
static |
|
static |
| void reloadDefaultShaders | ( | ) |
reload the default shaders
| var reloadDefaultShaders | ( | ) |
reload the default shaders
| local reloadDefaultShaders | ( | ) |
reload the default shaders
|
static |
|
static |
|
static |