cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GLProgramCache Class Reference

GLProgramCache Singleton that stores manages GLProgram objects (shaders) More...

#include <CCGLProgramCache.h>

Inheritance diagram for GLProgramCache:
Ref

Public Member Functions

 GLProgramCache ()
 ctor More...
 
 ~GLProgramCache ()
 NA NA More...
 
void loadDefaultGLPrograms ()
 loads the default shaders More...
 
void loadDefaultShaders ()
 
void reloadDefaultGLPrograms ()
 reload the default shaders More...
 
void reloadDefaultShaders ()
 
GLProgramgetGLProgram (const std::string &key)
 returns a GL program for a given key More...
 
GLProgramgetProgram (const std::string &key)
 
GLProgramprogramForKey (const std::string &key)
 
void addGLProgram (GLProgram *program, const std::string &key)
 adds a GLProgram to the cache for a given name More...
 
void addProgram (GLProgram *program, const std::string &key)
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 NA NA More...
 

Static Public Member Functions

static GLProgramCachegetInstance ()
 returns the shared instance More...
 
static void destroyInstance ()
 purges the cache. More...
 
static GLProgramCachesharedShaderCache ()
 
static void purgeSharedShaderCache ()
 

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Detailed Description

GLProgramCache Singleton that stores manages GLProgram objects (shaders)

Since
v2.0

Constructor & Destructor Documentation

ctor

NA NA

Member Function Documentation

void addGLProgram ( GLProgram program,
const std::string &  key 
)

adds a GLProgram to the cache for a given name

void addProgram ( GLProgram program,
const std::string &  key 
)
inline
static void destroyInstance ( )
static

purges the cache.

It releases the retained instance.

GLProgram* getGLProgram ( const std::string &  key)

returns a GL program for a given key

static GLProgramCache* getInstance ( )
static

returns the shared instance

GLProgram* getProgram ( const std::string &  key)
inline
void loadDefaultGLPrograms ( )

loads the default shaders

void loadDefaultShaders ( )
inline
GLProgram* programForKey ( const std::string &  key)
inline
static void purgeSharedShaderCache ( )
static
void reloadDefaultGLPrograms ( )

reload the default shaders

void reloadDefaultShaders ( )
inline
static GLProgramCache* sharedShaderCache ( )
static

The documentation for this class was generated from the following file: