cocos2d-x  2.2.3-gd2.113-rev1ec524e
Loading...
Searching...
No Matches
ccGLStateCache.h File Reference
#include "CCGL.h"
#include "platform/CCPlatformMacros.h"
Include dependency graph for ccGLStateCache.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  cocos2d
 

Enumerations

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 ccGLInvalidateStateCache (void)
 Invalidates the GL state cache. More...
 
void CC_DLL ccGLUseProgram (GLuint program)
 Uses the GL program in case program is different than the current one. More...
 
void CC_DLL ccGLDeleteProgram (GLuint program)
 Deletes the GL program. More...
 
void CC_DLL ccGLBlendFunc (GLenum sfactor, GLenum dfactor)
 Uses a blending function in case it not already used. More...
 
void CC_DLL ccGLBlendResetToCache (void)
 Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation(). More...
 
void CC_DLL ccSetProjectionMatrixDirty (void)
 sets the projection matrix as dirty More...
 
void CC_DLL ccGLEnableVertexAttribs (unsigned int flags)
 Will enable the vertex attribs that are passed as flags. More...
 
void CC_DLL ccGLBindTexture2D (GLuint textureId)
 If the texture is not already bound to texture unit 0, it binds it. More...
 
void CC_DLL ccGLBindTexture2DN (GLuint textureUnit, GLuint textureId)
 If the texture is not already bound to a given unit, it binds it. More...
 
void CC_DLL ccGLDeleteTexture (GLuint textureId)
 It will delete a given texture. More...
 
void CC_DLL ccGLDeleteTextureN (GLuint textureUnit, GLuint textureId)
 It will delete a given texture. More...
 
void CC_DLL ccGLBindVAO (GLuint vaoId)
 If the vertex array is not already bound, it binds it. More...
 
void CC_DLL ccGLEnable (ccGLServerState flags)
 It will enable / disable the server side GL states. More...