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

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 More...
 
var loadDefaultShaders ()
 loads the default shaders More...
 
local loadDefaultShaders ()
 loads the default shaders More...
 
void reloadDefaultShaders ()
 reload the default shaders More...
 
var reloadDefaultShaders ()
 reload the default shaders More...
 
local reloadDefaultShaders ()
 reload the default shaders More...
 
CCGLProgramprogramForKey (const char *key)
 returns a GL program for a given key More...
 
var getProgram ( var key)
 returns a GL program for a given key More...
 
local programForKey ( local key)
 returns a GL program for a given key More...
 
void addProgram (CCGLProgram *program, const char *key)
 adds a CCGLProgram to the cache for a given name More...
 
var addProgram ( var program, var key)
 adds a CCGLProgram to the cache for a given name More...
 
local addProgram ( local program, local key)
 adds a CCGLProgram to the cache for a given name More...
 
- Public Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (void)
bool isSingleReference (void) const
unsigned int retainCount (void) const
virtual bool isEqual (const CCObject *pObject)
virtual void acceptVisitor (CCDataVisitor &visitor)
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 More...
 
var getInstance ()
 returns the shared instance More...
 
local sharedShaderCache ()
 returns the shared instance More...
 
static void purgeSharedShaderCache ()
 purges the cache. More...
 
local purgeSharedShaderCache ()
 purges the cache. More...
 

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

var ctor ( )
local CCShaderCache ( )
virtual ~CCShaderCache ( )
virtual

Member Function Documentation

void addProgram ( CCGLProgram program,
const char *  key 
)

adds a CCGLProgram to the cache for a given name

var addProgram ( var  program,
var  key 
)

adds a CCGLProgram to the cache for a given name

local addProgram ( local  program,
local  key 
)

adds a CCGLProgram to the cache for a given name

void loadDefaultShaders ( )

loads the default shaders

var loadDefaultShaders ( )

loads the default shaders

local loadDefaultShaders ( )

loads the default shaders

CCGLProgram* programForKey ( const char *  key)

returns a GL program for a given key

var getProgram ( var  key)

returns a GL program for a given key

local programForKey ( local  key)

returns a GL program for a given key

static void purgeSharedShaderCache ( )
static

purges the cache.

It releases the retained instance.

var purgeSharedShaderCache ( )
static

purges the cache.

It releases the retained instance.

local purgeSharedShaderCache ( )
static

purges the cache.

It releases the retained instance.

void reloadDefaultShaders ( )

reload the default shaders

var reloadDefaultShaders ( )

reload the default shaders

local reloadDefaultShaders ( )

reload the default shaders

static CCShaderCache*
sharedShaderCache
( )
static

returns the shared instance

var getInstance ( )
static

returns the shared instance

local sharedShaderCache ( )
static

returns the shared instance


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