cocos2d-x  3.5
 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 ()
 Constructor. More...
 
 ~GLProgramCache ()
 Destructor. 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 ()
 Destructor. More...
 

Static Public Member Functions

static GLProgramCachegetInstance ()
 returns the shared instance More...
 
static void destroyInstance ()
 purges the cache. More...
 
static GLProgramCachesharedShaderCache ()
local sharedShaderCache ()
static void 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

Constructor.

var ctor ( )

Constructor.

local GLProgramCache ( )

Constructor.

Destructor.

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: