cocos2d-x  3.3rc0
 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 ()
 GLProgramCache ()
 ~GLProgramCache ()
void loadDefaultGLPrograms ()
 loads the default shaders More...
 
var loadDefaultGLPrograms ()
 loads the default shaders More...
 
local loadDefaultGLPrograms ()
 loads the default shaders More...
 
void loadDefaultShaders ()
local loadDefaultShaders ()
void reloadDefaultGLPrograms ()
 reload the default shaders More...
 
var reloadDefaultGLPrograms ()
 reload the default shaders More...
 
local reloadDefaultGLPrograms ()
 reload the default shaders More...
 
void reloadDefaultShaders ()
GLProgramgetGLProgram (const std::string &key)
 returns a GL program for a given key More...
 
var getGLProgram ( var key)
 returns a GL program for a given key More...
 
local getGLProgram ( local key)
 returns a GL program for a given key More...
 
GLProgramgetProgram (const std::string &key)
local getProgram ( local key)
GLProgramprogramForKey (const std::string &key)
local programForKey ( local key)
void addGLProgram (GLProgram *program, const std::string &key)
 adds a GLProgram to the cache for a given name More...
 
var addGLProgram ( var program, var key)
 adds a GLProgram to the cache for a given name More...
 
local addGLProgram ( local program, local key)
 adds a GLProgram to the cache for a given name More...
 
void addProgram (GLProgram *program, const std::string &key)
local addProgram ( local program, local 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...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Static Public Member Functions

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

Additional Inherited Members

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

Detailed Description

GLProgramCache Singleton that stores manages GLProgram objects (shaders)

Since
v2.0

Constructor & Destructor Documentation

var ctor ( )
local GLProgramCache ( )

Member Function Documentation

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

adds a GLProgram to the cache for a given name

var addGLProgram ( var  program,
var  key 
)

adds a GLProgram to the cache for a given name

local addGLProgram ( local  program,
local  key 
)

adds a GLProgram to the cache for a given name

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

purges the cache.

It releases the retained instance.

var destroyInstance ( )
static

purges the cache.

It releases the retained instance.

local destroyInstance ( )
static

purges the cache.

It releases the retained instance.

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

returns a GL program for a given key

var getGLProgram ( var  key)

returns a GL program for a given key

local getGLProgram ( local  key)

returns a GL program for a given key

static GLProgramCache* getInstance ( )
static

returns the shared instance

var getInstance ( )
static

returns the shared instance

local getInstance ( )
static

returns the shared instance

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

loads the default shaders

var loadDefaultGLPrograms ( )

loads the default shaders

local loadDefaultGLPrograms ( )

loads the default shaders

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

reload the default shaders

var reloadDefaultGLPrograms ( )

reload the default shaders

local reloadDefaultGLPrograms ( )

reload the default shaders

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

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