Namespace cc.shaderCache
Singleton object that stores manages GL shaders
- Defined in: CCShaderCache.js
Method Summary
Field Detail
<constant>
TYPE_MAX
<constant>
TYPE_POSITION_COLOR
<constant>
TYPE_POSITION_LENGTH_TEXTURECOLOR
<constant>
TYPE_POSITION_TEXTURE
<constant>
TYPE_POSITION_TEXTURE_A8COLOR
<constant>
TYPE_POSITION_TEXTURE_UCOLOR
<constant>
TYPE_POSITION_TEXTURECOLOR
<constant>
TYPE_POSITION_TEXTURECOLOR_ALPHATEST
<constant>
TYPE_POSITION_UCOLOR
Method Detail
-
addProgram(program, key)adds a CCGLProgram to the cache for a given name
- Parameters:
- program
- key
-
getProgram(shaderName)returns a GL program for a shader name
- Parameters:
- {String} shaderName
- Returns:
- cc.GLProgram
-
loadDefaultShaders()loads the default shaders
-
programForKey(key)returns a GL program for a given key
- Parameters:
- key
-
reloadDefaultShaders()reload the default shaders