cocos2d-x  3.0alpha1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GLProgram Class Reference

GLProgram Class that implements a glProgram. More...

#include <CCGLProgram.h>

Inheritance diagram for GLProgram:
Object

Public Types

enum  { VERTEX_ATTRIB_POSITION, VERTEX_ATTRIB_COLOR, VERTEX_ATTRIB_TEX_COORDS, VERTEX_ATTRIB_MAX }
 
enum  {
  UNIFORM_P_MATRIX, UNIFORM_MV_MATRIX, UNIFORM_MVP_MATRIX, UNIFORM_TIME,
  UNIFORM_SIN_TIME, UNIFORM_COS_TIME, UNIFORM_RANDOM01, UNIFORM_SAMPLER,
  UNIFORM_MAX
}
 

Public Member Functions

 GLProgram ()
virtual ~GLProgram ()
bool initWithVertexShaderByteArray (const GLchar *vShaderByteArray, const GLchar *fShaderByteArray)
 Initializes the GLProgram with a vertex and fragment with bytes array. More...
 
var initWithString ( var vShaderByteArray, var fShaderByteArray)
 Initializes the GLProgram with a vertex and fragment with bytes array. More...
 
local initWithString ( local vShaderByteArray, local fShaderByteArray)
 Initializes the GLProgram with a vertex and fragment with bytes array. More...
 
bool initWithVertexShaderFilename (const char *vShaderFilename, const char *fShaderFilename)
 Initializes the GLProgram with a vertex and fragment with contents of filenames. More...
 
local init ( local vShaderFilename, local fShaderFilename)
 Initializes the GLProgram with a vertex and fragment with contents of filenames. More...
 
void addAttribute (const char *attributeName, GLuint index)
 It will add a new attribute to the shader. More...
 
bool link ()
 links the glProgram More...
 
void use ()
 it will call glUseProgram() More...
 
var use ()
 it will call glUseProgram() More...
 
local use ()
 it will call glUseProgram() More...
 
void updateUniforms ()
 It will create 4 uniforms: More...
 
var updateUniforms ()
 It will create 4 uniforms: More...
 
local updateUniforms ()
 It will create 4 uniforms: More...
 
GLint getUniformLocationForName (const char *name) const
 calls retrieves the named uniform location for this shader program. More...
 
var getUniformLocationForName ( var name)
 calls retrieves the named uniform location for this shader program. More...
 
local getUniformLocationForName ( local name)
 calls retrieves the named uniform location for this shader program. More...
 
void setUniformLocationWith1i (GLint location, GLint i1)
 calls glUniform1i only if the values are different than the previous call for this same shader program. More...
 
var setUniformLocationI32 ( var location, var i1)
 calls glUniform1i only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationI32 ( local location, local i1)
 calls glUniform1i only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith2i (GLint location, GLint i1, GLint i2)
 calls glUniform2i only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith3i (GLint location, GLint i1, GLint i2, GLint i3)
 calls glUniform3i only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith4i (GLint location, GLint i1, GLint i2, GLint i3, GLint i4)
 calls glUniform4i only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith2iv (GLint location, GLint *ints, unsigned int numberOfArrays)
 calls glUniform2iv only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith3iv (GLint location, GLint *ints, unsigned int numberOfArrays)
 calls glUniform3iv only if the values are different than the previous call for this same shader program. More...
 
var setUniformLocationWith3iv ( var location, var ints, var numberOfArrays)
 calls glUniform3iv only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWith3iv ( local location, local ints, local numberOfArrays)
 calls glUniform3iv only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith4iv (GLint location, GLint *ints, unsigned int numberOfArrays)
 calls glUniform4iv only if the values are different than the previous call for this same shader program. More...
 
var setUniformLocationWith4iv ( var location, var ints, var numberOfArrays)
 calls glUniform4iv only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWith4iv ( local location, local ints, local numberOfArrays)
 calls glUniform4iv only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith1f (GLint location, GLfloat f1)
 calls glUniform1f only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWith1f ( local location, local f1)
 calls glUniform1f only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith2f (GLint location, GLfloat f1, GLfloat f2)
 calls glUniform2f only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWith2f ( local location, local f1, local f2)
 calls glUniform2f only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith3f (GLint location, GLfloat f1, GLfloat f2, GLfloat f3)
 calls glUniform3f only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWith3f ( local location, local f1, local f2, local f3)
 calls glUniform3f only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith4f (GLint location, GLfloat f1, GLfloat f2, GLfloat f3, GLfloat f4)
 calls glUniform4f only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith2fv (GLint location, GLfloat *floats, unsigned int numberOfArrays)
 calls glUniform2fv only if the values are different than the previous call for this same shader program. More...
 
var setUniformLocationWith2fv ( var location, var floats, var numberOfArrays)
 calls glUniform2fv only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWith2fv ( local location, local floats, local numberOfArrays)
 calls glUniform2fv only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith3fv (GLint location, GLfloat *floats, unsigned int numberOfArrays)
 calls glUniform3fv only if the values are different than the previous call for this same shader program. More...
 
var setUniformLocationWith3fv ( var location, var floats, var numberOfArrays)
 calls glUniform3fv only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWith3fv ( local location, local floats, local numberOfArrays)
 calls glUniform3fv only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWith4fv (GLint location, GLfloat *floats, unsigned int numberOfArrays)
 calls glUniform4fv only if the values are different than the previous call for this same shader program. More...
 
var setUniformLocationWith4fv ( var location, var floats, var numberOfArrays)
 calls glUniform4fv only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWith4fv ( local location, local floats, local numberOfArrays)
 calls glUniform4fv only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWithMatrix2fv (GLint location, GLfloat *matrixArray, unsigned int numberOfMatrices)
 calls glUniformMatrix2fv only if the values are different than the previous call for this same shader program. More...
 
var setUniformLocationWithMatrix2fv ( var location, var matrixArray, var numberOfMatrices)
 calls glUniformMatrix2fv only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWithMatrix2fv ( local location, local matrixArray, local numberOfMatrices)
 calls glUniformMatrix2fv only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWithMatrix3fv (GLint location, GLfloat *matrixArray, unsigned int numberOfMatrices)
 calls glUniformMatrix3fv only if the values are different than the previous call for this same shader program. More...
 
local setUniformLocationWithMatrix3fv ( local location, local matrixArray, local numberOfMatrices)
 calls glUniformMatrix3fv only if the values are different than the previous call for this same shader program. More...
 
void setUniformLocationWithMatrix4fv (GLint location, GLfloat *matrixArray, unsigned int numberOfMatrices)
 calls glUniformMatrix4fv only if the values are different than the previous call for this same shader program. More...
 
void setUniformsForBuiltins ()
 will update the builtin uniforms if they are different than the previous call for this same shader program. More...
 
var setUniformsForBuiltins ()
 will update the builtin uniforms if they are different than the previous call for this same shader program. More...
 
local setUniformsForBuiltins ()
 will update the builtin uniforms if they are different than the previous call for this same shader program. More...
 
const char * getVertexShaderLog () const
 returns the vertexShader error log More...
 
var getVertexShaderLog ()
 returns the vertexShader error log More...
 
local getVertexShaderLog ()
 returns the vertexShader error log More...
 
CC_DEPRECATED_ATTRIBUTE const
char * 
vertexShaderLog () const
const char * getFragmentShaderLog () const
 returns the fragmentShader error log More...
 
CC_DEPRECATED_ATTRIBUTE const
char * 
fragmentShaderLog () const
const char * getProgramLog () const
 returns the program error log More...
 
var getProgramLog ()
 returns the program error log More...
 
local getProgramLog ()
 returns the program error log More...
 
CC_DEPRECATED_ATTRIBUTE const
char * 
programLog () const
void reset ()
var reset ()
local reset ()
const GLuint getProgram () const
local getProgram ()
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)

Static Public Attributes

static const char * SHADER_NAME_POSITION_TEXTURE_COLOR
static const char * SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST
static const char * SHADER_NAME_POSITION_COLOR
var SHADER_NAME_POSITION_COLOR
local SHADER_NAME_POSITION_COLOR
static const char * SHADER_NAME_POSITION_TEXTURE
var SHADER_NAME_POSITION_TEXTURE
local SHADER_NAME_POSITION_TEXTURE
static const char * SHADER_NAME_POSITION_TEXTURE_U_COLOR
var SHADER_NAME_POSITION_TEXTURE_U_COLOR
local SHADER_NAME_POSITION_TEXTURE_U_COLOR
static const char * SHADER_NAME_POSITION_TEXTURE_A8_COLOR
var SHADER_NAME_POSITION_TEXTURE_A8_COLOR
local SHADER_NAME_POSITION_TEXTURE_A8_COLOR
static const char * SHADER_NAME_POSITION_U_COLOR
var SHADER_NAME_POSITION_U_COLOR
local SHADER_NAME_POSITION_U_COLOR
static const char * SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR
var SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR
local SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR
static const char * UNIFORM_NAME_P_MATRIX
var UNIFORM_NAME_P_MATRIX
local UNIFORM_NAME_P_MATRIX
static const char * UNIFORM_NAME_MV_MATRIX
var UNIFORM_NAME_MV_MATRIX
local UNIFORM_NAME_MV_MATRIX
static const char * UNIFORM_NAME_MVP_MATRIX
var UNIFORM_NAME_MVP_MATRIX
local UNIFORM_NAME_MVP_MATRIX
static const char * UNIFORM_NAME_TIME
var UNIFORM_NAME_TIME
local UNIFORM_NAME_TIME
static const char * UNIFORM_NAME_SIN_TIME
var UNIFORM_NAME_SIN_TIME
local UNIFORM_NAME_SIN_TIME
static const char * UNIFORM_NAME_COS_TIME
var UNIFORM_NAME_COS_TIME
local UNIFORM_NAME_COS_TIME
static const char * UNIFORM_NAME_RANDOM01
var UNIFORM_NAME_RANDOM01
local UNIFORM_NAME_RANDOM01
static const char * UNIFORM_NAME_SAMPLER
var UNIFORM_NAME_SAMPLER
local UNIFORM_NAME_SAMPLER
static const char * UNIFORM_NAME_ALPHA_TEST_VALUE
var UNIFORM_NAME_ALPHA_TEST_VALUE
local UNIFORM_NAME_ALPHA_TEST_VALUE
static const char * ATTRIBUTE_NAME_COLOR
var ATTRIBUTE_NAME_COLOR
local ATTRIBUTE_NAME_COLOR
static const char * ATTRIBUTE_NAME_POSITION
var ATTRIBUTE_NAME_POSITION
local ATTRIBUTE_NAME_POSITION
static const char * ATTRIBUTE_NAME_TEX_COORD
var ATTRIBUTE_NAME_TEX_COORD
local ATTRIBUTE_NAME_TEX_COORD

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 

Detailed Description

GLProgram Class that implements a glProgram.

Since
v2.0.0

Member Enumeration Documentation

anonymous enum
Enumerator
VERTEX_ATTRIB_POSITION 
VERTEX_ATTRIB_COLOR 
VERTEX_ATTRIB_TEX_COORDS 
VERTEX_ATTRIB_MAX 
var enum
Enumerator
VERTEX_ATTRIB_POSITION 
VERTEX_ATTRIB_COLOR 
VERTEX_ATTRIB_TEX_COORDS 
VERTEX_ATTRIB_MAX 
local enum
Enumerator
VERTEX_ATTRIB_POSITION 
VERTEX_ATTRIB_COLOR 
VERTEX_ATTRIB_TEX_COORDS 
VERTEX_ATTRIB_MAX 
anonymous enum
Enumerator
UNIFORM_P_MATRIX 
UNIFORM_MV_MATRIX 
UNIFORM_MVP_MATRIX 
UNIFORM_TIME 
UNIFORM_SIN_TIME 
UNIFORM_COS_TIME 
UNIFORM_RANDOM01 
UNIFORM_SAMPLER 
UNIFORM_MAX 
var enum
Enumerator
UNIFORM_P_MATRIX 
UNIFORM_MV_MATRIX 
UNIFORM_MVP_MATRIX 
UNIFORM_TIME 
UNIFORM_SIN_TIME 
UNIFORM_COS_TIME 
UNIFORM_RANDOM01 
UNIFORM_SAMPLER 
UNIFORM_MAX 
local enum
Enumerator
UNIFORM_P_MATRIX 
UNIFORM_MV_MATRIX 
UNIFORM_MVP_MATRIX 
UNIFORM_TIME 
UNIFORM_SIN_TIME 
UNIFORM_COS_TIME 
UNIFORM_RANDOM01 
UNIFORM_SAMPLER 
UNIFORM_MAX 

Constructor & Destructor Documentation

GLProgram ( )
var ctor ( )
local GLProgram ( )
virtual ~GLProgram ( )
virtual

Member Function Documentation

void addAttribute ( const char *  attributeName,
GLuint  index 
)

It will add a new attribute to the shader.

var addAttribute ( var  attributeName,
var  index 
)

It will add a new attribute to the shader.

local addAttribute ( local  attributeName,
local  index 
)

It will add a new attribute to the shader.

CC_DEPRECATED_ATTRIBUTE const
char* fragmentShaderLog
( ) const
inline
const char* getFragmentShaderLog ( ) const

returns the fragmentShader error log

var getFragmentShaderLog ( )

returns the fragmentShader error log

local getFragmentShaderLog ( )

returns the fragmentShader error log

const GLuint getProgram ( ) const
inline
var getProgram ( )
inline
local getProgram ( )
inline
const char* getProgramLog ( ) const

returns the program error log

var getProgramLog ( )

returns the program error log

local getProgramLog ( )

returns the program error log

GLint getUniformLocationForName ( const char *  name) const

calls retrieves the named uniform location for this shader program.

var getUniformLocationForName ( var  name)

calls retrieves the named uniform location for this shader program.

local getUniformLocationForName ( local  name)

calls retrieves the named uniform location for this shader program.

const char* getVertexShaderLog ( ) const

returns the vertexShader error log

var getVertexShaderLog ( )

returns the vertexShader error log

local getVertexShaderLog ( )

returns the vertexShader error log

bool initWithVertexShaderByteArray ( const GLchar vShaderByteArray,
const GLchar fShaderByteArray 
)

Initializes the GLProgram with a vertex and fragment with bytes array.

var initWithString ( var  vShaderByteArray,
var  fShaderByteArray 
)

Initializes the GLProgram with a vertex and fragment with bytes array.

local initWithString ( local  vShaderByteArray,
local  fShaderByteArray 
)

Initializes the GLProgram with a vertex and fragment with bytes array.

bool initWithVertexShaderFilename ( const char *  vShaderFilename,
const char *  fShaderFilename 
)

Initializes the GLProgram with a vertex and fragment with contents of filenames.

var init ( var  vShaderFilename,
var  fShaderFilename 
)

Initializes the GLProgram with a vertex and fragment with contents of filenames.

local init ( local  vShaderFilename,
local  fShaderFilename 
)

Initializes the GLProgram with a vertex and fragment with contents of filenames.

bool link ( )

links the glProgram

var link ( )

links the glProgram

local link ( )

links the glProgram

CC_DEPRECATED_ATTRIBUTE const
char* programLog
( ) const
inline
void reset ( )
var reset ( )
local reset ( )
void setUniformLocationWith1f ( GLint  location,
GLfloat  f1 
)

calls glUniform1f only if the values are different than the previous call for this same shader program.

In js or lua,please use setUniformLocationF32

local setUniformLocationWith1f ( local  location,
local  f1 
)

calls glUniform1f only if the values are different than the previous call for this same shader program.

In js or lua,please use setUniformLocationF32

void setUniformLocationWith1i ( GLint  location,
GLint  i1 
)

calls glUniform1i only if the values are different than the previous call for this same shader program.

var setUniformLocationI32 ( var  location,
var  i1 
)

calls glUniform1i only if the values are different than the previous call for this same shader program.

local setUniformLocationI32 ( local  location,
local  i1 
)

calls glUniform1i only if the values are different than the previous call for this same shader program.

void setUniformLocationWith2f ( GLint  location,
GLfloat  f1,
GLfloat  f2 
)

calls glUniform2f only if the values are different than the previous call for this same shader program.

In js or lua,please use setUniformLocationF32

local setUniformLocationWith2f ( local  location,
local  f1,
local  f2 
)

calls glUniform2f only if the values are different than the previous call for this same shader program.

In js or lua,please use setUniformLocationF32

void setUniformLocationWith2fv ( GLint  location,
GLfloat *  floats,
unsigned int  numberOfArrays 
)

calls glUniform2fv only if the values are different than the previous call for this same shader program.

var setUniformLocationWith2fv ( var  location,
var  floats,
var  numberOfArrays 
)

calls glUniform2fv only if the values are different than the previous call for this same shader program.

local setUniformLocationWith2fv ( local  location,
local  floats,
local  numberOfArrays 
)

calls glUniform2fv only if the values are different than the previous call for this same shader program.

void setUniformLocationWith2i ( GLint  location,
GLint  i1,
GLint  i2 
)

calls glUniform2i only if the values are different than the previous call for this same shader program.

var setUniformLocationWith2i ( var  location,
var  i1,
var  i2 
)

calls glUniform2i only if the values are different than the previous call for this same shader program.

local setUniformLocationWith2i ( local  location,
local  i1,
local  i2 
)

calls glUniform2i only if the values are different than the previous call for this same shader program.

void setUniformLocationWith2iv ( GLint  location,
GLint *  ints,
unsigned int  numberOfArrays 
)

calls glUniform2iv only if the values are different than the previous call for this same shader program.

var setUniformLocationWith2iv ( var  location,
var  ints,
var  numberOfArrays 
)

calls glUniform2iv only if the values are different than the previous call for this same shader program.

local setUniformLocationWith2iv ( local  location,
local  ints,
local  numberOfArrays 
)

calls glUniform2iv only if the values are different than the previous call for this same shader program.

void setUniformLocationWith3f ( GLint  location,
GLfloat  f1,
GLfloat  f2,
GLfloat  f3 
)

calls glUniform3f only if the values are different than the previous call for this same shader program.

In js or lua,please use setUniformLocationF32

local setUniformLocationWith3f ( local  location,
local  f1,
local  f2,
local  f3 
)

calls glUniform3f only if the values are different than the previous call for this same shader program.

In js or lua,please use setUniformLocationF32

void setUniformLocationWith3fv ( GLint  location,
GLfloat *  floats,
unsigned int  numberOfArrays 
)

calls glUniform3fv only if the values are different than the previous call for this same shader program.

var setUniformLocationWith3fv ( var  location,
var  floats,
var  numberOfArrays 
)

calls glUniform3fv only if the values are different than the previous call for this same shader program.

local setUniformLocationWith3fv ( local  location,
local  floats,
local  numberOfArrays 
)

calls glUniform3fv only if the values are different than the previous call for this same shader program.

void setUniformLocationWith3i ( GLint  location,
GLint  i1,
GLint  i2,
GLint  i3 
)

calls glUniform3i only if the values are different than the previous call for this same shader program.

var setUniformLocationWith3i ( var  location,
var  i1,
var  i2,
var  i3 
)

calls glUniform3i only if the values are different than the previous call for this same shader program.

local setUniformLocationWith3i ( local  location,
local  i1,
local  i2,
local  i3 
)

calls glUniform3i only if the values are different than the previous call for this same shader program.

void setUniformLocationWith3iv ( GLint  location,
GLint *  ints,
unsigned int  numberOfArrays 
)

calls glUniform3iv only if the values are different than the previous call for this same shader program.

var setUniformLocationWith3iv ( var  location,
var  ints,
var  numberOfArrays 
)

calls glUniform3iv only if the values are different than the previous call for this same shader program.

local setUniformLocationWith3iv ( local  location,
local  ints,
local  numberOfArrays 
)

calls glUniform3iv only if the values are different than the previous call for this same shader program.

void setUniformLocationWith4f ( GLint  location,
GLfloat  f1,
GLfloat  f2,
GLfloat  f3,
GLfloat  f4 
)

calls glUniform4f only if the values are different than the previous call for this same shader program.

In js or lua,please use setUniformLocationF32

local setUniformLocationWith4f ( local  location,
local  f1,
local  f2,
local  f3,
local  f4 
)

calls glUniform4f only if the values are different than the previous call for this same shader program.

In js or lua,please use setUniformLocationF32

void setUniformLocationWith4fv ( GLint  location,
GLfloat *  floats,
unsigned int  numberOfArrays 
)

calls glUniform4fv only if the values are different than the previous call for this same shader program.

var setUniformLocationWith4fv ( var  location,
var  floats,
var  numberOfArrays 
)

calls glUniform4fv only if the values are different than the previous call for this same shader program.

local setUniformLocationWith4fv ( local  location,
local  floats,
local  numberOfArrays 
)

calls glUniform4fv only if the values are different than the previous call for this same shader program.

void setUniformLocationWith4i ( GLint  location,
GLint  i1,
GLint  i2,
GLint  i3,
GLint  i4 
)

calls glUniform4i only if the values are different than the previous call for this same shader program.

var setUniformLocationWith4i ( var  location,
var  i1,
var  i2,
var  i3,
var  i4 
)

calls glUniform4i only if the values are different than the previous call for this same shader program.

local setUniformLocationWith4i ( local  location,
local  i1,
local  i2,
local  i3,
local  i4 
)

calls glUniform4i only if the values are different than the previous call for this same shader program.

void setUniformLocationWith4iv ( GLint  location,
GLint *  ints,
unsigned int  numberOfArrays 
)

calls glUniform4iv only if the values are different than the previous call for this same shader program.

var setUniformLocationWith4iv ( var  location,
var  ints,
var  numberOfArrays 
)

calls glUniform4iv only if the values are different than the previous call for this same shader program.

local setUniformLocationWith4iv ( local  location,
local  ints,
local  numberOfArrays 
)

calls glUniform4iv only if the values are different than the previous call for this same shader program.

void
setUniformLocationWithMatrix2fv
( GLint  location,
GLfloat *  matrixArray,
unsigned int  numberOfMatrices 
)

calls glUniformMatrix2fv only if the values are different than the previous call for this same shader program.

var setUniformLocationWithMatrix2fv ( var  location,
var  matrixArray,
var  numberOfMatrices 
)

calls glUniformMatrix2fv only if the values are different than the previous call for this same shader program.

local
setUniformLocationWithMatrix2fv
( local  location,
local  matrixArray,
local  numberOfMatrices 
)

calls glUniformMatrix2fv only if the values are different than the previous call for this same shader program.

void
setUniformLocationWithMatrix3fv
( GLint  location,
GLfloat *  matrixArray,
unsigned int  numberOfMatrices 
)

calls glUniformMatrix3fv only if the values are different than the previous call for this same shader program.

var setUniformLocationWithMatrix3fv ( var  location,
var  matrixArray,
var  numberOfMatrices 
)

calls glUniformMatrix3fv only if the values are different than the previous call for this same shader program.

local
setUniformLocationWithMatrix3fv
( local  location,
local  matrixArray,
local  numberOfMatrices 
)

calls glUniformMatrix3fv only if the values are different than the previous call for this same shader program.

void
setUniformLocationWithMatrix4fv
( GLint  location,
GLfloat *  matrixArray,
unsigned int  numberOfMatrices 
)

calls glUniformMatrix4fv only if the values are different than the previous call for this same shader program.

var setUniformLocationWithMatrix4fv ( var  location,
var  matrixArray,
var  numberOfMatrices 
)

calls glUniformMatrix4fv only if the values are different than the previous call for this same shader program.

local
setUniformLocationWithMatrix4fv
( local  location,
local  matrixArray,
local  numberOfMatrices 
)

calls glUniformMatrix4fv only if the values are different than the previous call for this same shader program.

void setUniformsForBuiltins ( )

will update the builtin uniforms if they are different than the previous call for this same shader program.

var setUniformsForBuiltins ( )

will update the builtin uniforms if they are different than the previous call for this same shader program.

local setUniformsForBuiltins ( )

will update the builtin uniforms if they are different than the previous call for this same shader program.

void updateUniforms ( )

It will create 4 uniforms:

And it will bind "GLProgram::UNIFORM_SAMPLER" to 0

var updateUniforms ( )

It will create 4 uniforms:

And it will bind "GLProgram::UNIFORM_SAMPLER" to 0

local updateUniforms ( )

It will create 4 uniforms:

And it will bind "GLProgram::UNIFORM_SAMPLER" to 0

void use ( )

it will call glUseProgram()

var use ( )

it will call glUseProgram()

local use ( )

it will call glUseProgram()

CC_DEPRECATED_ATTRIBUTE const
char* vertexShaderLog
( ) const
inline

Member Data Documentation

const char* ATTRIBUTE_NAME_COLOR
static
var ATTRIBUTE_NAME_COLOR
static
local ATTRIBUTE_NAME_COLOR
static
const char* ATTRIBUTE_NAME_POSITION
static
var ATTRIBUTE_NAME_POSITION
static
local ATTRIBUTE_NAME_POSITION
static
const char*
ATTRIBUTE_NAME_TEX_COORD
static
var ATTRIBUTE_NAME_TEX_COORD
static
local ATTRIBUTE_NAME_TEX_COORD
static
const char*
SHADER_NAME_POSITION_COLOR
static
var SHADER_NAME_POSITION_COLOR
static
local SHADER_NAME_POSITION_COLOR
static
const char*
SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR
static
var
SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR
static
local
SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR
static
const char*
SHADER_NAME_POSITION_TEXTURE
static
var SHADER_NAME_POSITION_TEXTURE
static
local SHADER_NAME_POSITION_TEXTURE
static
const char*
SHADER_NAME_POSITION_TEXTURE_A8_COLOR
static
var
SHADER_NAME_POSITION_TEXTURE_A8_COLOR
static
local
SHADER_NAME_POSITION_TEXTURE_A8_COLOR
static
const char*
SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST
static
var
SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST
static
local
SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST
static
const char*
SHADER_NAME_POSITION_TEXTURE_COLOR
static
var
SHADER_NAME_POSITION_TEXTURE_COLOR
static
local
SHADER_NAME_POSITION_TEXTURE_COLOR
static
const char*
SHADER_NAME_POSITION_TEXTURE_U_COLOR
static
var
SHADER_NAME_POSITION_TEXTURE_U_COLOR
static
local
SHADER_NAME_POSITION_TEXTURE_U_COLOR
static
const char*
SHADER_NAME_POSITION_U_COLOR
static
var SHADER_NAME_POSITION_U_COLOR
static
local SHADER_NAME_POSITION_U_COLOR
static
const char*
UNIFORM_NAME_ALPHA_TEST_VALUE
static
var UNIFORM_NAME_ALPHA_TEST_VALUE
static
local UNIFORM_NAME_ALPHA_TEST_VALUE
static
const char* UNIFORM_NAME_COS_TIME
static
var UNIFORM_NAME_COS_TIME
static
local UNIFORM_NAME_COS_TIME
static
const char* UNIFORM_NAME_MV_MATRIX
static
var UNIFORM_NAME_MV_MATRIX
static
local UNIFORM_NAME_MV_MATRIX
static
const char* UNIFORM_NAME_MVP_MATRIX
static
var UNIFORM_NAME_MVP_MATRIX
static
local UNIFORM_NAME_MVP_MATRIX
static
const char* UNIFORM_NAME_P_MATRIX
static
var UNIFORM_NAME_P_MATRIX
static
local UNIFORM_NAME_P_MATRIX
static
const char* UNIFORM_NAME_RANDOM01
static
var UNIFORM_NAME_RANDOM01
static
local UNIFORM_NAME_RANDOM01
static
const char* UNIFORM_NAME_SAMPLER
static
var UNIFORM_NAME_SAMPLER
static
local UNIFORM_NAME_SAMPLER
static
const char* UNIFORM_NAME_SIN_TIME
static
var UNIFORM_NAME_SIN_TIME
static
local UNIFORM_NAME_SIN_TIME
static
const char* UNIFORM_NAME_TIME
static
var UNIFORM_NAME_TIME
static
local UNIFORM_NAME_TIME
static

The documentation for this class was generated from the following file: