|
bool | initWithByteArrays (const GLchar *vShaderByteArray, const GLchar *fShaderByteArray) |
|
bool | initWithFilenames (const std::string &vShaderFilename, const std::string &fShaderFilename) |
|
Uniform * | getUniform (const std::string &name) |
|
VertexAttrib * | getVertexAttrib (const std::string &name) |
|
void | bindAttribLocation (const std::string &attributeName, GLuint index) const |
| It will add a new attribute to the shader by calling glBindAttribLocation.
|
|
GLint | getAttribLocation (const std::string &attributeName) const |
| calls glGetAttribLocation
|
|
GLint | getUniformLocation (const std::string &attributeName) const |
| calls glGetUniformLocation()
|
|
bool | link () |
| links the glProgram
|
|
void | use () |
| it will call glUseProgram()
|
|
void | updateUniforms () |
| It will create 4 uniforms: More...
|
|
GLint | getUniformLocationForName (const char *name) const |
| 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...
|
|
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...
|
|
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...
|
|
void | setUniformLocationWith1f (GLint location, GLfloat 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...
|
|
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...
|
|
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, const GLfloat *floats, unsigned int numberOfArrays) |
| calls glUniform2fv only if the values are different than the previous call for this same shader program. More...
|
|
void | setUniformLocationWith3fv (GLint location, const GLfloat *floats, unsigned int numberOfArrays) |
| calls glUniform3fv only if the values are different than the previous call for this same shader program. More...
|
|
void | setUniformLocationWith4fv (GLint location, const GLfloat *floats, unsigned int numberOfArrays) |
| calls glUniform4fv only if the values are different than the previous call for this same shader program. More...
|
|
void | setUniformLocationWithMatrix2fv (GLint location, const GLfloat *matrixArray, unsigned int numberOfMatrices) |
| calls glUniformMatrix2fv only if the values are different than the previous call for this same shader program. More...
|
|
void | setUniformLocationWithMatrix3fv (GLint location, const GLfloat *matrixArray, unsigned int numberOfMatrices) |
| calls glUniformMatrix3fv only if the values are different than the previous call for this same shader program. More...
|
|
void | setUniformLocationWithMatrix4fv (GLint location, const GLfloat *matrixArray, unsigned int numberOfMatrices) |
| calls glUniformMatrix4fv only if the values are different than the previous call for this same shader program. More...
|
|
std::string | getVertexShaderLog () const |
| returns the vertexShader error log
|
|
std::string | getFragmentShaderLog () const |
| returns the fragmentShader error log
|
|
std::string | getProgramLog () const |
| returns the program error log
|
|
void | reset () |
|
const GLuint | getProgram () const |
|
bool | initWithVertexShaderByteArray (const GLchar *vertexByteArray, const GLchar *fragByteArray) |
|
bool | initWithVertexShaderFilename (const std::string &vertexFilename, const std::string &fragFilename) |
|
void | addAttribute (const std::string &attributeName, GLuint index) const |
|
void | addref () const |
| add reference count of the object. More...
|
|
bool | delref () const |
| decrease reference count of the object. More...
|
|
int | GetRefCount () const |
| get the reference count
|
|
virtual int | Release () |
|
CRefCounted * | AddToAutoReleasePool () |
| addref and releases the ownership sometime soon automatically (usually at the end of the current frame). More...
|
|
|
static const char * | SHADER_NAME_POSITION_TEXTURE_COLOR = "ShaderPositionTextureColor" |
|
static const char * | SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP = "ShaderPositionTextureColor_noMVP" |
|
static const char * | SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST = "ShaderPositionTextureColorAlphaTest" |
|
static const char * | SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST_NO_MV = "ShaderPositionTextureColorAlphaTest_NoMV" |
|
static const char * | SHADER_NAME_POSITION_COLOR = "ShaderPositionColor" |
|
static const char * | SHADER_NAME_POSITION_COLOR_NO_MVP = "ShaderPositionColor_noMVP" |
|
static const char * | SHADER_NAME_POSITION_TEXTURE = "ShaderPositionTexture" |
|
static const char * | SHADER_NAME_POSITION_TEXTURE_U_COLOR = "ShaderPositionTexture_uColor" |
|
static const char * | SHADER_NAME_POSITION_TEXTURE_A8_COLOR = "ShaderPositionTextureA8Color" |
|
static const char * | SHADER_NAME_POSITION_U_COLOR = "ShaderPosition_uColor" |
|
static const char * | SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR = "ShaderPositionLengthTextureColor" |
|
static const char * | SHADER_NAME_LABEL_NORMAL = "ShaderLabelNormal" |
|
static const char * | SHADER_NAME_LABEL_OUTLINE = "ShaderLabelOutline" |
|
static const char * | SHADER_NAME_LABEL_DISTANCEFIELD_NORMAL = "ShaderLabelDFNormal" |
|
static const char * | SHADER_NAME_LABEL_DISTANCEFIELD_GLOW = "ShaderLabelDFGlow" |
|
static const char * | SHADER_3D_POSITION = "Shader3DPosition" |
|
static const char * | SHADER_3D_POSITION_TEXTURE = "Shader3DPositionTexture" |
|
static const char * | SHADER_3D_SKINPOSITION_TEXTURE = "Shader3DSkinPositionTexture" |
|
static const char * | UNIFORM_NAME_P_MATRIX = "CC_PMatrix" |
|
static const char * | UNIFORM_NAME_MV_MATRIX = "CC_MVMatrix" |
|
static const char * | UNIFORM_NAME_MVP_MATRIX = "CC_MVPMatrix" |
|
static const char * | UNIFORM_NAME_TIME = "CC_Time" |
|
static const char * | UNIFORM_NAME_SIN_TIME = "CC_SinTime" |
|
static const char * | UNIFORM_NAME_COS_TIME = "CC_CosTime" |
|
static const char * | UNIFORM_NAME_RANDOM01 = "CC_Random01" |
|
static const char * | UNIFORM_NAME_SAMPLER0 = "CC_Texture0" |
|
static const char * | UNIFORM_NAME_SAMPLER1 = "CC_Texture1" |
|
static const char * | UNIFORM_NAME_SAMPLER2 = "CC_Texture2" |
|
static const char * | UNIFORM_NAME_SAMPLER3 = "CC_Texture3" |
|
static const char * | UNIFORM_NAME_ALPHA_TEST_VALUE = "CC_alpha_value" |
|
static const char * | ATTRIBUTE_NAME_COLOR = "a_color" |
|
static const char * | ATTRIBUTE_NAME_POSITION = "a_position" |
|
static const char * | ATTRIBUTE_NAME_TEX_COORD = "a_texCoord" |
|
static const char * | ATTRIBUTE_NAME_NORMAL = "a_normal" |
|
static const char * | ATTRIBUTE_NAME_BLEND_WEIGHT = "a_blendWeight" |
|
static const char * | ATTRIBUTE_NAME_BLEND_INDEX = "a_blendIndex" |
|
GLProgram Class that implements a glProgram.
- Since
- v2.0.0