cocos2d-x  2.1.1

CCShaderCache Singleton that stores manages GL shaders. More...

#include <CCShaderCache.h>

Inheritance diagram for CCShaderCache:
CCObject CCCopying

Public Member Functions

 CCShaderCache ()
 
virtual ~CCShaderCache ()
 
void loadDefaultShaders ()
 loads the default shaders
 
void reloadDefaultShaders ()
 reload the default shaders
 
CCGLProgramprogramForKey (const char *key)
 returns a GL program for a given key
 
void addProgram (CCGLProgram *program, const char *key)
 adds a CCGLProgram to the cache for a given name
 
- Public Member Functions inherited from CCObject
 CCObject (void)
 
virtual ~CCObject (void)
 
void release (void)
 
void retain (void)
 
CCObjectautorelease (void)
 
CCObjectcopy (void)
 
bool isSingleReference (void)
 
unsigned int retainCount (void)
 
virtual bool isEqual (const CCObject *pObject)
 
virtual void update (float dt)
 
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)
 

Static Public Member Functions

static CCShaderCachesharedShaderCache ()
 returns the shared instance
 
static void purgeSharedShaderCache ()
 purges the cache.
 

Additional Inherited Members

- Public Attributes inherited from CCObject
unsigned int m_uID
 
int m_nLuaID
 
- Protected Attributes inherited from CCObject
unsigned int m_uReference
 
unsigned int m_uAutoReleaseCount
 

Detailed Description

CCShaderCache Singleton that stores manages GL shaders.

Since
v2.0

Constructor & Destructor Documentation

virtual ~CCShaderCache ( )
virtual

Member Function Documentation

void addProgram ( CCGLProgram program,
const char *  key 
)

adds a CCGLProgram to the cache for a given name

void loadDefaultShaders ( )

loads the default shaders

CCGLProgram* programForKey ( const char *  key)

returns a GL program for a given key

static void purgeSharedShaderCache ( )
static

purges the cache.

It releases the retained instance.

void reloadDefaultShaders ( )

reload the default shaders

static CCShaderCache* sharedShaderCache ( )
static

returns the shared instance


The documentation for this class was generated from the following file:
  • /Users/zhangkoumyou/SourceCode/cocos2d-x/cocos2dx/shaders/CCShaderCache.h