Files | |
file | ccGLStateCache.h |
Classes | |
class | CCGLProgram |
CCGLProgram Class that implements a glProgram. More... | |
class | CCShaderCache |
CCShaderCache Singleton that stores manages GL shaders. More... | |
Macros | |
#define | kCCShader_PositionTextureColor "ShaderPositionTextureColor" |
#define | kCCShader_PositionTextureColorAlphaTest "ShaderPositionTextureColorAlphaTest" |
#define | kCCShader_PositionColor "ShaderPositionColor" |
#define | kCCShader_PositionTexture "ShaderPositionTexture" |
#define | kCCShader_PositionTexture_uColor "ShaderPositionTexture_uColor" |
#define | kCCShader_PositionTextureA8Color "ShaderPositionTextureA8Color" |
#define | kCCShader_Position_uColor "ShaderPosition_uColor" |
#define | kCCShader_PositionLengthTexureColor "ShaderPositionLengthTextureColor" |
#define | kCCShader_ControlSwitch "Shader_ControlSwitch" |
#define | kCCUniformPMatrix_s "CC_PMatrix" |
#define | kCCUniformMVMatrix_s "CC_MVMatrix" |
#define | kCCUniformMVPMatrix_s "CC_MVPMatrix" |
#define | kCCUniformTime_s "CC_Time" |
#define | kCCUniformSinTime_s "CC_SinTime" |
#define | kCCUniformCosTime_s "CC_CosTime" |
#define | kCCUniformRandom01_s "CC_Random01" |
#define | kCCUniformSampler_s "CC_Texture0" |
#define | kCCUniformAlphaTestValue "CC_alpha_value" |
#define | kCCAttributeNameColor "a_color" |
#define | kCCAttributeNamePosition "a_position" |
#define | kCCAttributeNameTexCoord "a_texCoord" |
Typedefs | |
typedef void(* | GLInfoFunction )(GLuint program, GLenum pname, GLint *params) |
typedef void(* | GLLogFunction )(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog) |
Enumerations | |
enum | { kCCVertexAttrib_Position, kCCVertexAttrib_Color, kCCVertexAttrib_TexCoords, kCCVertexAttrib_MAX } |
enum | { kCCUniformPMatrix, kCCUniformMVMatrix, kCCUniformMVPMatrix, kCCUniformTime, kCCUniformSinTime, kCCUniformCosTime, kCCUniformRandom01, kCCUniformSampler, kCCUniform_MAX } |
enum | { kCCVertexAttribFlag_None = 0, kCCVertexAttribFlag_Position = 1 << 0, kCCVertexAttribFlag_Color = 1 << 1, kCCVertexAttribFlag_TexCoords = 1 << 2, kCCVertexAttribFlag_PosColorTex = ( kCCVertexAttribFlag_Position | kCCVertexAttribFlag_Color | kCCVertexAttribFlag_TexCoords ) } |
vertex attrib flags More... | |
enum | ccGLServerState { CC_GL_ALL = 0 } |
GL server side states. 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 | (ccGLServerState flags) |
It will enable / disable the server side GL states. More... | |
#define kCCAttributeNameColor "a_color" |
var kCCAttributeNameColor "a_color" |
local kCCAttributeNameColor "a_color" |
#define kCCAttributeNamePosition "a_position" |
var kCCAttributeNamePosition "a_position" |
local kCCAttributeNamePosition "a_position" |
#define kCCAttributeNameTexCoord "a_texCoord" |
var kCCAttributeNameTexCoord "a_texCoord" |
local kCCAttributeNameTexCoord "a_texCoord" |
#define kCCShader_ControlSwitch "Shader_ControlSwitch" |
var kCCShader_ControlSwitch "Shader_ControlSwitch" |
local kCCShader_ControlSwitch "Shader_ControlSwitch" |
#define kCCShader_Position_uColor "ShaderPosition_uColor" |
var kCCShader_Position_uColor "ShaderPosition_uColor" |
local kCCShader_Position_uColor "ShaderPosition_uColor" |
#define kCCShader_PositionColor "ShaderPositionColor" |
var kCCShader_PositionColor "ShaderPositionColor" |
local kCCShader_PositionColor "ShaderPositionColor" |
#define kCCShader_PositionLengthTexureColor "ShaderPositionLengthTextureColor" |
var kCCShader_PositionLengthTexureColor "ShaderPositionLengthTextureColor" |
local kCCShader_PositionLengthTexureColor "ShaderPositionLengthTextureColor" |
#define kCCShader_PositionTexture "ShaderPositionTexture" |
var kCCShader_PositionTexture "ShaderPositionTexture" |
local kCCShader_PositionTexture "ShaderPositionTexture" |
#define kCCShader_PositionTexture_uColor "ShaderPositionTexture_uColor" |
var kCCShader_PositionTexture_uColor "ShaderPositionTexture_uColor" |
local kCCShader_PositionTexture_uColor "ShaderPositionTexture_uColor" |
#define kCCShader_PositionTextureA8Color "ShaderPositionTextureA8Color" |
var kCCShader_PositionTextureA8Color "ShaderPositionTextureA8Color" |
local kCCShader_PositionTextureA8Color "ShaderPositionTextureA8Color" |
#define kCCShader_PositionTextureColor "ShaderPositionTextureColor" |
var kCCShader_PositionTextureColor "ShaderPositionTextureColor" |
#define kCCShader_PositionTextureColorAlphaTest "ShaderPositionTextureColorAlphaTest" |
var kCCShader_PositionTextureColorAlphaTest "ShaderPositionTextureColorAlphaTest" |
local kCCShader_PositionTextureColorAlphaTest "ShaderPositionTextureColorAlphaTest" |
#define kCCUniformAlphaTestValue "CC_alpha_value" |
var kCCUniformAlphaTestValue "CC_alpha_value" |
local kCCUniformAlphaTestValue "CC_alpha_value" |
#define kCCUniformCosTime_s "CC_CosTime" |
var kCCUniformCosTime_s "CC_CosTime" |
local kCCUniformCosTime_s "CC_CosTime" |
#define kCCUniformMVMatrix_s "CC_MVMatrix" |
var kCCUniformMVMatrix_s "CC_MVMatrix" |
local kCCUniformMVMatrix_s "CC_MVMatrix" |
#define kCCUniformMVPMatrix_s "CC_MVPMatrix" |
var kCCUniformMVPMatrix_s "CC_MVPMatrix" |
local kCCUniformMVPMatrix_s "CC_MVPMatrix" |
#define kCCUniformPMatrix_s "CC_PMatrix" |
var kCCUniformPMatrix_s "CC_PMatrix" |
local kCCUniformPMatrix_s "CC_PMatrix" |
#define kCCUniformRandom01_s "CC_Random01" |
var kCCUniformRandom01_s "CC_Random01" |
local kCCUniformRandom01_s "CC_Random01" |
#define kCCUniformSampler_s "CC_Texture0" |
var kCCUniformSampler_s "CC_Texture0" |
local kCCUniformSampler_s "CC_Texture0" |
#define kCCUniformSinTime_s "CC_SinTime" |
var kCCUniformSinTime_s "CC_SinTime" |
local kCCUniformSinTime_s "CC_SinTime" |
#define kCCUniformTime_s "CC_Time" |
var kCCUniformTime_s "CC_Time" |
local kCCUniformTime_s "CC_Time" |
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 |
anonymous enum |
var enum |
local enum |
anonymous enum |
var enum |
local enum |
void CC_DLL cocos2d::ccGLInvalidateStateCache |
( | void | ) |
Invalidates the GL state cache.
If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.
var ccGLInvalidateStateCache | ( | ) |
Invalidates the GL state cache.
If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.
local ccGLInvalidateStateCache | ( | ) |
Invalidates the GL state cache.
If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.
void CC_DLL cocos2d::ccGLUseProgram | ( | 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 ccGLUseProgram | ( | 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 ccGLUseProgram | ( | 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::ccGLBlendFunc | ( | 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 ccGLBlendFunc | ( | 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 ccGLBlendFunc | ( | 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::ccGLEnableVertexAttribs |
( | unsigned int | flags) |
Will enable the vertex attribs that are passed as flags.
Possible flags:
kCCVertexAttribFlag_Position kCCVertexAttribFlag_Color kCCVertexAttribFlag_TexCoords
These flags can be ORed. The flags that are not present, will be disabled.
var ccGLEnableVertexAttribs | ( | var | flags) |
Will enable the vertex attribs that are passed as flags.
Possible flags:
kCCVertexAttribFlag_Position kCCVertexAttribFlag_Color kCCVertexAttribFlag_TexCoords
These flags can be ORed. The flags that are not present, will be disabled.
local ccGLEnableVertexAttribs | ( | local | flags) |
Will enable the vertex attribs that are passed as flags.
Possible flags:
kCCVertexAttribFlag_Position kCCVertexAttribFlag_Color kCCVertexAttribFlag_TexCoords
These flags can be ORed. The flags that are not present, will be disabled.
void CC_DLL cocos2d::ccGLBindTexture2DN |
( | 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 ccGLBindTexture2DN | ( | 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 ccGLBindTexture2DN | ( | 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::ccGLEnable | ( | ccGLServerState | flags) |
It will enable / disable the server side GL states.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glEnable() directly.
var ccGLEnable | ( | var | flags) |
It will enable / disable the server side GL states.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glEnable() directly.
local ccGLEnable | ( | local | flags) |
It will enable / disable the server side GL states.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glEnable() directly.
var ccExSwitchMask_frag |
local ccExSwitchMask_frag |
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_vert |
local ccPositionTextureColor_vert |
var ccPositionTextureColorAlphaTest_frag |
local ccPositionTextureColorAlphaTest_frag |