cocos2d-x  3.1rc0
 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...
 
CC_DEPRECATED_ATTRIBUTE void loadDefaultShaders ()
local loadDefaultShaders ()
void reloadDefaultGLPrograms ()
 reload the default shaders More...
 
local reloadDefaultGLPrograms ()
 reload the default shaders More...
 
CC_DEPRECATED_ATTRIBUTE void reloadDefaultShaders ()
local reloadDefaultShaders ()
GLProgramgetGLProgram (const std::string &key)
 returns a GL program for a given key More...
 
CC_DEPRECATED_ATTRIBUTE GLProgramgetProgram (const std::string &key)
local getProgram ( local key)
CC_DEPRECATED_ATTRIBUTE 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...
 
CC_DEPRECATED_ATTRIBUTE void addProgram (GLProgram *program, const std::string &key)
var addProgram ( var program, var 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...
 
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 CC_DEPRECATED_ATTRIBUTE
GLProgramCache
sharedShaderCache ()
local sharedShaderCache ()
static CC_DEPRECATED_ATTRIBUTE void purgeSharedShaderCache ()
local 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

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

CC_DEPRECATED_ATTRIBUTE 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

CC_DEPRECATED_ATTRIBUTE
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

CC_DEPRECATED_ATTRIBUTE void
loadDefaultShaders
( )
inline
var loadDefaultShaders ( )
inline
local loadDefaultShaders ( )
inline
CC_DEPRECATED_ATTRIBUTE
GLProgram* programForKey
( const std::string &  key)
inline
var programForKey ( var  key)
inline
local programForKey ( local  key)
inline
static CC_DEPRECATED_ATTRIBUTE
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

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

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