Cocos2d-x  v3.17
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Renderer

Namespaces

 cocos2d
 Copyright 2013 BlackBerry Inc.
 

Classes

class  BatchCommand
 Command used to draw batches in one TextureAtlas. More...
 
class  CustomCommand
 Custom command is used for call custom openGL command which can not be done by other commands, such as stencil function, depth functions etc. More...
 
struct  VertexAttrib
 VertexAttrib is a structure to encapsulate data got from glGetActiveAttrib. More...
 
struct  Uniform
 Uniform is a structure to encapsulate data got from glGetActiveUniform and glGetUniformLocation. More...
 
class  GLProgram
 GLProgram Class that implements a glProgram. More...
 
struct  GLProgram::UniformFlags
 Flags used by the uniforms. More...
 
class  GLProgramCache
 GLProgramCache Singleton that stores manages GLProgram objects (shaders) More...
 
class  UniformValue
 Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX. More...
 
class  VertexAttribValue
 Vertex Attribute Value, which is an abstraction of VertexAttribute and data pointer. More...
 
class  GLProgramState
 GLProgramState holds the 'state' (uniforms and attributes) of the GLProgram. More...
 
class  GLProgramState::AutoBindingResolver
 An abstract base class that can be extended to support custom material auto bindings. More...
 
class  GLProgramStateCache
 Some GLprogram state could be shared. More...
 
class  GroupCommand
 GroupCommand is used to group several command together, and more, it can be nested. More...
 
class  Primitive
 Primitive can support sending points, lines and triangles to glpipeline, which is an abstraction of primitive data. More...
 
class  PrimitiveCommand
 Command used to render primitive, similar to QuadCommand. More...
 
class  QuadCommand
 Command used to render one or more Quads, similar to TrianglesCommand. More...
 
class  RenderCommand
 Base class of the RenderCommand hierarchy. More...
 
class  RenderQueue
 Class that knows how to sort RenderCommand objects. More...
 
class  TrianglesCommand
 Command used to render one or more Triangles, which is similar to QuadCommand. More...
 
struct  TrianglesCommand::Triangles
 The structure of Triangles. More...
 
class  VertexBuffer
 VertexBuffer is an abstraction of low level openGL Vertex Buffer Object. More...
 
class  IndexBuffer
 IndexBuffer is an abstraction of low level openGL Buffer Object. More...
 
struct  VertexStreamAttribute
 VertexStreamAttribute is used to specify the vertex attribute for drawing, which is correspondent to glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr). More...
 
class  VertexData
 VertexData is a class used for specify input streams for GPU rendering pipeline, a VertexData will be composed by several streams, every stream will contain a VertexStreamAttribute and the binding VertexBuffer. More...
 

Enumerations

enum  {
  VERTEX_ATTRIB_POSITION, VERTEX_ATTRIB_COLOR, VERTEX_ATTRIB_TEX_COORD, VERTEX_ATTRIB_TEX_COORD1,
  VERTEX_ATTRIB_TEX_COORD2, VERTEX_ATTRIB_TEX_COORD3, VERTEX_ATTRIB_NORMAL, VERTEX_ATTRIB_BLEND_WEIGHT,
  VERTEX_ATTRIB_BLEND_INDEX, VERTEX_ATTRIB_TANGENT, VERTEX_ATTRIB_BINORMAL
}
 Enum the preallocated vertex attribute. More...
 
enum  {
  UNIFORM_AMBIENT_COLOR, UNIFORM_P_MATRIX, UNIFORM_MULTIVIEW_P_MATRIX, UNIFORM_MV_MATRIX,
  UNIFORM_MVP_MATRIX, UNIFORM_MULTIVIEW_MVP_MATRIX, UNIFORM_NORMAL_MATRIX, UNIFORM_TIME,
  UNIFORM_SIN_TIME, UNIFORM_COS_TIME, UNIFORM_RANDOM01, UNIFORM_SAMPLER0
}
 Preallocated uniform handle. More...
 
enum  
 Vertex attrib flags. More...
 
enum  Type {
  UNKNOWN_COMMAND, QUAD_COMMAND, CUSTOM_COMMAND, BATCH_COMMAND,
  GROUP_COMMAND, MESH_COMMAND, PRIMITIVE_COMMAND, TRIANGLES_COMMAND
}
 Enum the type of render command. More...
 
enum  QUEUE_GROUP {
  GLOBALZ_NEG = 0, OPAQUE_3D = 1, TRANSPARENT_3D = 2, GLOBALZ_ZERO = 3,
  GLOBALZ_POS = 4
}
 RenderCommand will be divided into Queue Groups. More...
 
enum  IndexType { INDEX_TYPE_SHORT_16, INDEX_TYPE_UINT_32 }
 Enum for the type of index, short indices and int indices could be used. More...
 

Functions

void invalidateStateCache (void)
 Invalidates the GL state cache. More...
 
var invalidateStateCache ()
 Invalidates the GL state cache. More...
 
local invalidateStateCache ()
 Invalidates the GL state cache. More...
 
void useProgram (GLuint program)
 Uses the GL program in case program is different than the current one. More...
 
void deleteProgram (GLuint program)
 Deletes the GL program. More...
 
var deleteProgram ( var program)
 Deletes the GL program. More...
 
local deleteProgram ( local program)
 Deletes the GL program. More...
 
void blendFunc (GLenum sfactor, GLenum dfactor)
 Uses a blending function in case it not already used. More...
 
var blendFunc ( var sfactor, var dfactor)
 Uses a blending function in case it not already used. More...
 
local blendFunc ( local sfactor, local dfactor)
 Uses a blending function in case it not already used. More...
 
void blendResetToCache (void)
 Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation(). More...
 
void setProjectionMatrixDirty (void)
 Sets the projection matrix as dirty. More...
 
var setProjectionMatrixDirty ()
 Sets the projection matrix as dirty. More...
 
local setProjectionMatrixDirty ()
 Sets the projection matrix as dirty. More...
 
void enableVertexAttribs (uint32_t flags)
 Will enable the vertex attribs that are passed as flags. More...
 
var enableVertexAttribs ( var flags)
 Will enable the vertex attribs that are passed as flags. More...
 
local enableVertexAttribs ( local flags)
 Will enable the vertex attribs that are passed as flags. More...
 
void bindTexture2D (GLuint textureId)
 If the texture is not already bound to texture unit 0, it binds it. More...
 
void bindTexture2D (Texture2D *texture)
 If the texture is not already bound to texture unit 0, it binds it. More...
 
var bindTexture2D ( var texture)
 If the texture is not already bound to texture unit 0, it binds it. More...
 
local bindTexture2D ( local texture)
 If the texture is not already bound to texture unit 0, it binds it. More...
 
void bindTexture2DN (GLuint textureUnit, GLuint textureId)
 If the texture is not already bound to a given unit, it binds it. More...
 
void bindTextureN (GLuint textureUnit, GLuint textureId, GLuint textureType=GL_TEXTURE_2D)
 If the texture is not already bound to a given unit, it binds it. More...
 
void deleteTexture (GLuint textureId)
 It will delete a given texture. More...
 
void deleteTextureN (GLuint textureUnit, GLuint textureId)
 It will delete a given texture. More...
 
void activeTexture (GLenum texture)
 Select active texture unit. More...
 
void bindVAO (GLuint vaoId)
 If the vertex array is not already bound, it binds it. More...
 

Detailed Description

Enumeration Type Documentation

anonymous enum

Enum the preallocated vertex attribute.

Enumerator
VERTEX_ATTRIB_POSITION 

Index 0 will be used as Position.

VERTEX_ATTRIB_COLOR 

Index 1 will be used as Color.

VERTEX_ATTRIB_TEX_COORD 

Index 2 will be used as Tex coord unit 0.

VERTEX_ATTRIB_TEX_COORD1 

Index 3 will be used as Tex coord unit 1.

VERTEX_ATTRIB_TEX_COORD2 

Index 4 will be used as Tex coord unit 2.

VERTEX_ATTRIB_TEX_COORD3 

Index 5 will be used as Tex coord unit 3.

VERTEX_ATTRIB_NORMAL 

Index 6 will be used as Normal.

VERTEX_ATTRIB_BLEND_WEIGHT 

Index 7 will be used as Blend weight for hardware skin.

VERTEX_ATTRIB_BLEND_INDEX 

Index 8 will be used as Blend index.

VERTEX_ATTRIB_TANGENT 

Index 9 will be used as tangent.

VERTEX_ATTRIB_BINORMAL 

Index 10 will be used as Binormal.

var enum

Enum the preallocated vertex attribute.

Enumerator
VERTEX_ATTRIB_POSITION 

Index 0 will be used as Position.

VERTEX_ATTRIB_COLOR 

Index 1 will be used as Color.

VERTEX_ATTRIB_TEX_COORD 

Index 2 will be used as Tex coord unit 0.

VERTEX_ATTRIB_TEX_COORD1 

Index 3 will be used as Tex coord unit 1.

VERTEX_ATTRIB_TEX_COORD2 

Index 4 will be used as Tex coord unit 2.

VERTEX_ATTRIB_TEX_COORD3 

Index 5 will be used as Tex coord unit 3.

VERTEX_ATTRIB_NORMAL 

Index 6 will be used as Normal.

VERTEX_ATTRIB_BLEND_WEIGHT 

Index 7 will be used as Blend weight for hardware skin.

VERTEX_ATTRIB_BLEND_INDEX 

Index 8 will be used as Blend index.

VERTEX_ATTRIB_TANGENT 

Index 9 will be used as tangent.

VERTEX_ATTRIB_BINORMAL 

Index 10 will be used as Binormal.

local enum

Enum the preallocated vertex attribute.

Enumerator
VERTEX_ATTRIB_POSITION 

Index 0 will be used as Position.

VERTEX_ATTRIB_COLOR 

Index 1 will be used as Color.

VERTEX_ATTRIB_TEX_COORD 

Index 2 will be used as Tex coord unit 0.

VERTEX_ATTRIB_TEX_COORD1 

Index 3 will be used as Tex coord unit 1.

VERTEX_ATTRIB_TEX_COORD2 

Index 4 will be used as Tex coord unit 2.

VERTEX_ATTRIB_TEX_COORD3 

Index 5 will be used as Tex coord unit 3.

VERTEX_ATTRIB_NORMAL 

Index 6 will be used as Normal.

VERTEX_ATTRIB_BLEND_WEIGHT 

Index 7 will be used as Blend weight for hardware skin.

VERTEX_ATTRIB_BLEND_INDEX 

Index 8 will be used as Blend index.

VERTEX_ATTRIB_TANGENT 

Index 9 will be used as tangent.

VERTEX_ATTRIB_BINORMAL 

Index 10 will be used as Binormal.

anonymous enum

Preallocated uniform handle.

Enumerator
UNIFORM_AMBIENT_COLOR 

Ambient color.

UNIFORM_P_MATRIX 

Projection matrix.

UNIFORM_MULTIVIEW_P_MATRIX 

MultiView Projection matrix.

UNIFORM_MV_MATRIX 

Model view matrix.

UNIFORM_MVP_MATRIX 

Model view projection matrix.

UNIFORM_MULTIVIEW_MVP_MATRIX 

MultiView Model view projection matrix.

UNIFORM_NORMAL_MATRIX 

Normal matrix.

UNIFORM_TIME 

Time.

UNIFORM_SIN_TIME 

sin(Time).

UNIFORM_COS_TIME 

cos(Time).

UNIFORM_RANDOM01 

Random number.

UNIFORM_SAMPLER0 

Sampler 0-3, used for texture.

var enum

Preallocated uniform handle.

Enumerator
UNIFORM_AMBIENT_COLOR 

Ambient color.

UNIFORM_P_MATRIX 

Projection matrix.

UNIFORM_MULTIVIEW_P_MATRIX 

MultiView Projection matrix.

UNIFORM_MV_MATRIX 

Model view matrix.

UNIFORM_MVP_MATRIX 

Model view projection matrix.

UNIFORM_MULTIVIEW_MVP_MATRIX 

MultiView Model view projection matrix.

UNIFORM_NORMAL_MATRIX 

Normal matrix.

UNIFORM_TIME 

Time.

UNIFORM_SIN_TIME 

sin(Time).

UNIFORM_COS_TIME 

cos(Time).

UNIFORM_RANDOM01 

Random number.

UNIFORM_SAMPLER0 

Sampler 0-3, used for texture.

local enum

Preallocated uniform handle.

Enumerator
UNIFORM_AMBIENT_COLOR 

Ambient color.

UNIFORM_P_MATRIX 

Projection matrix.

UNIFORM_MULTIVIEW_P_MATRIX 

MultiView Projection matrix.

UNIFORM_MV_MATRIX 

Model view matrix.

UNIFORM_MVP_MATRIX 

Model view projection matrix.

UNIFORM_MULTIVIEW_MVP_MATRIX 

MultiView Model view projection matrix.

UNIFORM_NORMAL_MATRIX 

Normal matrix.

UNIFORM_TIME 

Time.

UNIFORM_SIN_TIME 

sin(Time).

UNIFORM_COS_TIME 

cos(Time).

UNIFORM_RANDOM01 

Random number.

UNIFORM_SAMPLER0 

Sampler 0-3, used for texture.

anonymous enum

Vertex attrib flags.

var enum

Vertex attrib flags.

local enum

Vertex attrib flags.

enum Type
strong

Enum the type of render command.

Enumerator
UNKNOWN_COMMAND 

Reserved type.

QUAD_COMMAND 

Quad command, used for draw quad.

CUSTOM_COMMAND 

Custom command, used for calling callback for rendering.

BATCH_COMMAND 

Batch command, used for draw batches in texture atlas.

GROUP_COMMAND 

Group command, which can group command in a tree hierarchy.

MESH_COMMAND 

Mesh command, used to draw 3D meshes.

PRIMITIVE_COMMAND 

Primitive command, used to draw primitives such as lines, points and triangles.

TRIANGLES_COMMAND 

Triangles command, used to draw triangles.

var Type
strong

Enum the type of render command.

Enumerator
UNKNOWN_COMMAND 

Reserved type.

QUAD_COMMAND 

Quad command, used for draw quad.

CUSTOM_COMMAND 

Custom command, used for calling callback for rendering.

BATCH_COMMAND 

Batch command, used for draw batches in texture atlas.

GROUP_COMMAND 

Group command, which can group command in a tree hierarchy.

MESH_COMMAND 

Mesh command, used to draw 3D meshes.

PRIMITIVE_COMMAND 

Primitive command, used to draw primitives such as lines, points and triangles.

TRIANGLES_COMMAND 

Triangles command, used to draw triangles.

local Type
strong

Enum the type of render command.

Enumerator
UNKNOWN_COMMAND 

Reserved type.

QUAD_COMMAND 

Quad command, used for draw quad.

CUSTOM_COMMAND 

Custom command, used for calling callback for rendering.

BATCH_COMMAND 

Batch command, used for draw batches in texture atlas.

GROUP_COMMAND 

Group command, which can group command in a tree hierarchy.

MESH_COMMAND 

Mesh command, used to draw 3D meshes.

PRIMITIVE_COMMAND 

Primitive command, used to draw primitives such as lines, points and triangles.

TRIANGLES_COMMAND 

Triangles command, used to draw triangles.

enum QUEUE_GROUP

RenderCommand will be divided into Queue Groups.

Enumerator
GLOBALZ_NEG 

Objects with globalZ smaller than 0.

OPAQUE_3D 

Opaque 3D objects with 0 globalZ.

TRANSPARENT_3D 

Transparent 3D objects with 0 globalZ.

GLOBALZ_ZERO 

2D objects with 0 globalZ.

GLOBALZ_POS 

Objects with globalZ bigger than 0.

var QUEUE_GROUP

RenderCommand will be divided into Queue Groups.

Enumerator
GLOBALZ_NEG 

Objects with globalZ smaller than 0.

OPAQUE_3D 

Opaque 3D objects with 0 globalZ.

TRANSPARENT_3D 

Transparent 3D objects with 0 globalZ.

GLOBALZ_ZERO 

2D objects with 0 globalZ.

GLOBALZ_POS 

Objects with globalZ bigger than 0.

local QUEUE_GROUP

RenderCommand will be divided into Queue Groups.

Enumerator
GLOBALZ_NEG 

Objects with globalZ smaller than 0.

OPAQUE_3D 

Opaque 3D objects with 0 globalZ.

TRANSPARENT_3D 

Transparent 3D objects with 0 globalZ.

GLOBALZ_ZERO 

2D objects with 0 globalZ.

GLOBALZ_POS 

Objects with globalZ bigger than 0.

enum IndexType
strong

Enum for the type of index, short indices and int indices could be used.

Enumerator
INDEX_TYPE_SHORT_16 

Short index will be used.

INDEX_TYPE_UINT_32 

Int index will be used.

Function Documentation

void
cocos2d::GL::invalidateStateCache
( void  )

Invalidates the GL state cache.

If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.

Since
v2.0.0
var invalidateStateCache (   )

Invalidates the GL state cache.

If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.

Since
v2.0.0
local invalidateStateCache (   )

Invalidates the GL state cache.

If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.

Since
v2.0.0
void 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.

Since
v2.0.0
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.

Since
v2.0.0
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.

Since
v2.0.0
void 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.

Since
v2.0.0
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.

Since
v2.0.0
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.

Since
v2.0.0
void 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.

Since
v2.0.0
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.

Since
v2.0.0
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.

Since
v2.0.0
void 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.

Since
v2.0.0
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.

Since
v2.0.0
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.

Since
v2.0.0
void
cocos2d::GL::setProjectionMatrixDirty
( void  )

Sets the projection matrix as dirty.

Since
v2.0.0
var setProjectionMatrixDirty (   )

Sets the projection matrix as dirty.

Since
v2.0.0
local setProjectionMatrixDirty (   )

Sets the projection matrix as dirty.

Since
v2.0.0
void
cocos2d::GL::enableVertexAttribs
( uint32_t  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.

Since
v2.0.0
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.

Since
v2.0.0
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.

Since
v2.0.0
void 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.

Since
v2.0.0
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.

Since
v2.0.0
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.

Since
v2.0.0
void cocos2d::GL::bindTexture2D ( Texture2D *  texture)

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.

Remarks
: It will bind alpha texture to support ETC1 alpha channel.
Since
v3.13
var bindTexture2D ( var  texture)

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.

Remarks
: It will bind alpha texture to support ETC1 alpha channel.
Since
v3.13
local bindTexture2D ( local  texture)

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.

Remarks
: It will bind alpha texture to support ETC1 alpha channel.
Since
v3.13
void 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.

Since
v2.1.0
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.

Since
v2.1.0
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.

Since
v2.1.0
void cocos2d::GL::bindTextureN ( GLuint  textureUnit,
GLuint  textureId,
GLuint  textureType = GL_TEXTURE_2D 
)

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.

Since
v3.6
var bindTextureN ( var  textureUnit,
var  textureId,
var  textureType = GL_TEXTURE_2D 
)

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.

Since
v3.6
local bindTextureN ( local  textureUnit,
local  textureId,
local  textureType = GL_TEXTURE_2D 
)

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.

Since
v3.6
void 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.

Since
v2.0.0
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.

Since
v2.0.0
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.

Since
v2.0.0
void 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.

Since
v2.1.0
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.

Since
v2.1.0
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.

Since
v2.1.0
void cocos2d::GL::activeTexture ( GLenum  texture)

Select active texture unit.

If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.

Since
v3.0
var activeTexture ( var  texture)

Select active texture unit.

If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.

Since
v3.0
local activeTexture ( local  texture)

Select active texture unit.

If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.

Since
v3.0
void 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.

Since
v2.0.0
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.

Since
v2.0.0
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.

Since
v2.0.0