Files | |
file | ccGLStateCache.h |
Namespaces | |
cocos2d::GL | |
Classes | |
class | GLProgram |
GLProgram Class that implements a glProgram. More... | |
class | ShaderCache |
ShaderCache Singleton that stores manages GL shaders. More... | |
Typedefs | |
typedef void(* | GLInfoFunction )(GLuint program, GLenum pname, GLint *params) |
typedef void(* | GLLogFunction )(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog) |
Enumerations | |
enum | { VERTEX_ATTRIB_FLAG_NONE = 0, VERTEX_ATTRIB_FLAG_POSITION = 1 << 0, VERTEX_ATTRIB_FLAG_COLOR = 1 << 1, VERTEX_ATTRIB_FLAG_TEX_COORDS = 1 << 2, VERTEX_ATTRIB_FLAG_POS_COLOR_TEX = (VERTEX_ATTRIB_FLAG_POSITION | VERTEX_ATTRIB_FLAG_COLOR | VERTEX_ATTRIB_FLAG_TEX_COORDS) } |
vertex attrib flags More... | |
Functions | |
void CC_DLL | (void) |
Invalidates the GL state cache. More... | |
void CC_DLL | (GLuint program) |
Uses the GL program in case program is different than the current one. More... | |
void CC_DLL | (GLenum sfactor, GLenum dfactor) |
Uses a blending function in case it not already used. More... | |
void CC_DLL | (unsigned int flags) |
Will enable the vertex attribs that are passed as flags. More... | |
void CC_DLL | (GLuint textureUnit, GLuint textureId) |
If the texture is not already bound to a given unit, it binds it. More... | |
void CC_DLL | (GLenum texture) |
Select active texture unit. More... | |
var | ( var texture) |
Select active texture unit. More... | |
local | ( local texture) |
Select active texture unit. More... | |
typedef void(* GLInfoFunction)(GLuint program, GLenum pname, GLint *params) |
typedef void(* GLInfoFunction)(GLuint program, GLenum pname, GLint *params) |
typedef void(* GLInfoFunction)(GLuint program, GLenum pname, GLint *params) |
typedef void(* GLLogFunction)(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog) |
typedef void(* GLLogFunction)(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog) |
typedef void(* GLLogFunction)(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog) |
anonymous enum |
var enum |
local enum |
void CC_DLL cocos2d::GL::invalidateStateCache |
( | void | ) |
var invalidateStateCache | ( | ) |
local invalidateStateCache | ( | ) |
void CC_DLL cocos2d::GL::useProgram | ( | GLuint | program) |
Uses the GL program in case program is different than the current one.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glUseProgram() directly.
var useProgram | ( | var | program) |
Uses the GL program in case program is different than the current one.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glUseProgram() directly.
local useProgram | ( | local | program) |
Uses the GL program in case program is different than the current one.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glUseProgram() directly.
void CC_DLL cocos2d::GL::blendFunc | ( | GLenum | sfactor, |
GLenum | dfactor | ||
) |
Uses a blending function in case it not already used.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glBlendFunc() directly.
var blendFunc | ( | var | sfactor, |
var | dfactor | ||
) |
Uses a blending function in case it not already used.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glBlendFunc() directly.
local blendFunc | ( | local | sfactor, |
local | dfactor | ||
) |
Uses a blending function in case it not already used.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glBlendFunc() directly.
void CC_DLL cocos2d::GL::enableVertexAttribs |
( | unsigned int | flags) |
Will enable the vertex attribs that are passed as flags.
Possible flags:
VERTEX_ATTRIB_FLAG_POSITION VERTEX_ATTRIB_FLAG_COLOR VERTEX_ATTRIB_FLAG_TEX_COORDS
These flags can be ORed. The flags that are not present, will be disabled.
var enableVertexAttribs | ( | var | flags) |
Will enable the vertex attribs that are passed as flags.
Possible flags:
VERTEX_ATTRIB_FLAG_POSITION VERTEX_ATTRIB_FLAG_COLOR VERTEX_ATTRIB_FLAG_TEX_COORDS
These flags can be ORed. The flags that are not present, will be disabled.
local enableVertexAttribs | ( | local | flags) |
Will enable the vertex attribs that are passed as flags.
Possible flags:
VERTEX_ATTRIB_FLAG_POSITION VERTEX_ATTRIB_FLAG_COLOR VERTEX_ATTRIB_FLAG_TEX_COORDS
These flags can be ORed. The flags that are not present, will be disabled.
void CC_DLL cocos2d::GL::bindTexture2DN |
( | GLuint | textureUnit, |
GLuint | textureId | ||
) |
If the texture is not already bound to a given unit, it binds it.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
var bindTexture2DN | ( | var | textureUnit, |
var | textureId | ||
) |
If the texture is not already bound to a given unit, it binds it.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
local bindTexture2DN | ( | local | textureUnit, |
local | textureId | ||
) |
If the texture is not already bound to a given unit, it binds it.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
void CC_DLL cocos2d::GL::activeTexture |
( | GLenum | texture) |
Select active texture unit.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.
var activeTexture | ( | var | texture) |
Select active texture unit.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.
local activeTexture | ( | local | texture) |
Select active texture unit.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.
var ccExSwitchMask_frag |
local ccExSwitchMask_frag |
var ccLabelDistanceFieldGlow_frag |
local ccLabelDistanceFieldGlow_frag |
var ccLabelDistanceFieldGlow_vert |
local ccLabelDistanceFieldGlow_vert |
var ccLabelDistanceFieldNormal_frag |
local ccLabelDistanceFieldNormal_frag |
var ccLabelDistanceFieldNormal_vert |
local ccLabelDistanceFieldNormal_vert |
var ccLabelOutline_frag |
local ccLabelOutline_frag |
var ccLabelOutline_vert |
local ccLabelOutline_vert |
var ccPosition_uColor_frag |
local ccPosition_uColor_frag |
var ccPosition_uColor_vert |
local ccPosition_uColor_vert |
var ccPositionColor_frag |
local ccPositionColor_frag |
var ccPositionColor_vert |
local ccPositionColor_vert |
var ccPositionColorLengthTexture_frag |
local ccPositionColorLengthTexture_frag |
var ccPositionColorLengthTexture_vert |
local ccPositionColorLengthTexture_vert |
var ccPositionTexture_frag |
local ccPositionTexture_frag |
var ccPositionTexture_uColor_frag |
local ccPositionTexture_uColor_frag |
var ccPositionTexture_uColor_vert |
local ccPositionTexture_uColor_vert |
var ccPositionTexture_vert |
local ccPositionTexture_vert |
var ccPositionTextureA8Color_frag |
local ccPositionTextureA8Color_frag |
var ccPositionTextureA8Color_vert |
local ccPositionTextureA8Color_vert |
var ccPositionTextureColor_frag |
local ccPositionTextureColor_frag |
var ccPositionTextureColor_noMVP_frag |
local ccPositionTextureColor_noMVP_frag |
var ccPositionTextureColor_noMVP_vert |
local ccPositionTextureColor_noMVP_vert |
var ccPositionTextureColor_vert |
local ccPositionTextureColor_vert |
var ccPositionTextureColorAlphaTest_frag |
local ccPositionTextureColorAlphaTest_frag |