Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
GLProgramCache Class Reference

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

Inherits Ref.

Public Member Functions

 GLProgramCache ()
 Constructor.
 
 ~GLProgramCache ()
 Destructor.
 
void loadDefaultGLPrograms ()
 loads the default shaders.
 
void reloadDefaultGLPrograms ()
 reload the default shaders.
 
GLProgramgetGLProgram (const std::string &key)
 returns a GL program for a given key. More...
 
local getGLProgram ( local key)
 returns a GL program for a given key. More...
 
void addGLProgram (GLProgram *program, const std::string &key)
 adds a GLProgram to the cache for a given name. More...
 
void reloadDefaultGLProgramsRelativeToLights ()
 Reload default programs these are relative to light.
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
local 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 ()
 Destructor.
 

Static Public Member Functions

static GLProgramCachegetInstance ()
 returns the shared instance
 
static void destroyInstance ()
 purges the cache. More...
 
static GLProgramCachesharedShaderCache ()
 Deprecated function, get the instance, Use getInstance() instead.
 
local sharedShaderCache ()
 Deprecated function, get the instance, Use getInstance() instead.
 
static void purgeSharedShaderCache ()
 Deprecated function, destroy the instance, Use destroyInstance() instead.
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
local _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
local _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
local _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
local _rooted
 When true, it means that the object was already rooted.
 
bool _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 
local _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 

Detailed Description

Singleton that stores manages GLProgram objects (shaders)

Member Function Documentation

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.

The name of GLProgram. The GLProgram.

var getGLProgram ( var  key)

returns a GL program for a given key.

The name of GLProgram. The GLProgram.

local getGLProgram ( local  key)

returns a GL program for a given key.

The name of GLProgram. The GLProgram.

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

adds a GLProgram to the cache for a given name.

The name of GLProgram. GLProgram.

var addGLProgram ( var  program,
var  key 
)

adds a GLProgram to the cache for a given name.

The name of GLProgram. GLProgram.

local addGLProgram ( local  program,
local  key 
)

adds a GLProgram to the cache for a given name.

The name of GLProgram. GLProgram.


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