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 | (GLuint program) |
Deletes the GL program. More... | |
void CC_DLL | (GLenum sfactor, GLenum dfactor) |
Uses a blending function in case it not already used. More... | |
void CC_DLL | (void) |
Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation(). More... | |
void CC_DLL | (void) |
sets the projection matrix as dirty More... | |
void CC_DLL | (unsigned int flags) |
Will enable the vertex attribs that are passed as flags. More... | |
void CC_DLL | (GLuint textureId) |
If the texture is not already bound to texture unit 0, it binds it. 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 | (GLuint textureId) |
It will delete a given texture. More... | |
void CC_DLL | (GLuint textureUnit, GLuint textureId) |
It will delete a given texture. 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... | |
void CC_DLL | (GLuint vaoId) |
If the vertex array is not already bound, it binds it. More... | |
void CC_DLL cocos2d::GL::deleteProgram |
( | GLuint | program) |
Deletes the GL program.
If it is the one that is being used, it invalidates it. If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glDeleteProgram() directly.
var deleteProgram | ( | var | program) |
Deletes the GL program.
If it is the one that is being used, it invalidates it. If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glDeleteProgram() directly.
local deleteProgram | ( | local | program) |
Deletes the GL program.
If it is the one that is being used, it invalidates it. If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glDeleteProgram() directly.
void CC_DLL cocos2d::GL::blendResetToCache |
( | void | ) |
Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation().
If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD.
var blendResetToCache | ( | ) |
Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation().
If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD.
local blendResetToCache | ( | ) |
Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation().
If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD.
void CC_DLL cocos2d::GL::setProjectionMatrixDirty |
( | void | ) |
sets the projection matrix as dirty
var setProjectionMatrixDirty | ( | ) |
sets the projection matrix as dirty
local setProjectionMatrixDirty | ( | ) |
sets the projection matrix as dirty
void CC_DLL cocos2d::GL::bindTexture2D |
( | GLuint | textureId) |
If the texture is not already bound to texture unit 0, it binds it.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
var bindTexture2D | ( | var | textureId) |
If the texture is not already bound to texture unit 0, it binds it.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
local bindTexture2D | ( | local | textureId) |
If the texture is not already bound to texture unit 0, it binds it.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
void CC_DLL cocos2d::GL::deleteTexture |
( | GLuint | textureId) |
It will delete a given texture.
If the texture was bound, it will invalidate the cached. If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
var deleteTexture | ( | var | textureId) |
It will delete a given texture.
If the texture was bound, it will invalidate the cached. If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
local deleteTexture | ( | local | textureId) |
It will delete a given texture.
If the texture was bound, it will invalidate the cached. If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
void CC_DLL cocos2d::GL::deleteTextureN |
( | GLuint | textureUnit, |
GLuint | textureId | ||
) |
It will delete a given texture.
If the texture was bound, it will invalidate the cached for the given texture unit. If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
var deleteTextureN | ( | var | textureUnit, |
var | textureId | ||
) |
It will delete a given texture.
If the texture was bound, it will invalidate the cached for the given texture unit. If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
local deleteTextureN | ( | local | textureUnit, |
local | textureId | ||
) |
It will delete a given texture.
If the texture was bound, it will invalidate the cached for the given texture unit. If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
void CC_DLL cocos2d::GL::bindVAO | ( | GLuint | vaoId) |
If the vertex array is not already bound, it binds it.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindVertexArray() directly.
var bindVAO | ( | var | vaoId) |
If the vertex array is not already bound, it binds it.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindVertexArray() directly.
local bindVAO | ( | local | vaoId) |
If the vertex array is not already bound, it binds it.
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindVertexArray() directly.