|
| GLProgram () |
| Constructor. More...
|
|
virtual | ~GLProgram () |
| Destructor. More...
|
|
void | bindAttribLocation (const std::string &attributeName, GLuint index) const |
| It will add a new attribute to the shader by calling glBindAttribLocation. More...
|
|
GLint | getAttribLocation (const std::string &attributeName) const |
| Calls glGetAttribLocation. More...
|
|
GLint | getUniformLocation (const std::string &attributeName) const |
| Calls glGetUniformLocation(). More...
|
|
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 | setUniformLocationWith1fv (GLint location, const GLfloat *floats, unsigned int numberOfArrays) |
| calls glUniformfv 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...
|
|
void | setUniformsForBuiltins (const Mat4 &modelView) |
| Update the builtin uniforms if they are different than the previous call for this same shader program. More...
|
|
void | setUniformsForBuiltins () |
| Update the builtin uniforms if they are different than the previous call for this same shader program.
|
|
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 () |
| Reload all shaders, this function is designed for android when opengl context lost, so don't call it.
|
|
GLuint | getProgram () const |
| returns the OpenGL Program object
|
|
const UniformFlags & | getUniformFlags () const |
| returns the Uniform flags
|
|
|
Uniform * | getUniform (const std::string &name) |
|
void | retain () |
| Retains the ownership. More...
|
|
void | release () |
| Releases the ownership immediately. More...
|
|
Ref * | autorelease () |
| Releases the ownership sometime soon automatically. More...
|
|
unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count. More...
|
|
virtual | ~Ref () |
| Destructor. More...
|
|
|
static const char * | UNIFORM_NAME_ALPHA_TEST_VALUE |
| Alpha test value uniform. More...
|
|
static const char * | ATTRIBUTE_NAME_NORMAL |
| Attribute normal. More...
|
|
static const char * | ATTRIBUTE_NAME_BLEND_WEIGHT |
| Attribute blend weight. More...
|
|
static const char * | ATTRIBUTE_NAME_BLEND_INDEX |
| Attribute blend index. More...
|
|
static const char * | ATTRIBUTE_NAME_TANGENT |
| Attribute blend tangent. More...
|
|
static const char * | ATTRIBUTE_NAME_BINORMAL |
| Attribute blend binormal. More...
|
|
|
static const char * | SHADER_NAME_ETC1AS_POSITION_TEXTURE_COLOR |
| ETC1 ALPHA supports for 2d.
|
|
static const char * | SHADER_NAME_ETC1AS_POSITION_TEXTURE_COLOR_NO_MVP |
|
static const char * | SHADER_NAME_ETC1AS_POSITION_TEXTURE_GRAY |
|
static const char * | SHADER_NAME_ETC1AS_POSITION_TEXTURE_GRAY_NO_MVP |
|
static const char * | SHADER_NAME_POSITION_TEXTURE_COLOR |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_TEXTURE_ALPHA_TEST_NO_MV |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_COLOR |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_COLOR_TEXASPOINTSIZE |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_COLOR_NO_MVP |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_TEXTURE |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_TEXTURE_U_COLOR |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_TEXTURE_A8_COLOR |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_U_COLOR |
| Built in shader for 2d. More...
|
|
static const char * | SHADER_NAME_POSITION_LENGTH_TEXTURE_COLOR |
| Built in shader for draw a sector with 90 degrees with center at bottom left point. More...
|
|
static const char * | SHADER_NAME_POSITION_GRAYSCALE |
| Built in shader for ui effects.
|
|
static const char * | SHADER_NAME_LABEL_NORMAL |
|
static const char * | SHADER_NAME_LABEL_OUTLINE |
|
static const char * | SHADER_NAME_LABEL_DISTANCEFIELD_NORMAL |
|
static const char * | SHADER_NAME_LABEL_DISTANCEFIELD_GLOW |
|
static const char * | SHADER_3D_POSITION |
| Built in shader used for 3D, support Position vertex attribute, with color specified by a uniform. More...
|
|
static const char * | SHADER_3D_POSITION_TEXTURE |
| Built in shader used for 3D, support Position and Texture vertex attribute, with color specified by a uniform. More...
|
|
static const char * | SHADER_3D_SKINPOSITION_TEXTURE |
| Built in shader used for 3D, support Position (Skeletal animation by hardware skin) and Texture vertex attribute, with color specified by a uniform.
|
|
static const char * | SHADER_3D_POSITION_NORMAL |
| Built in shader used for 3D, support Position and Normal vertex attribute, used in lighting. More...
|
|
static const char * | SHADER_3D_POSITION_NORMAL_TEXTURE |
| Built in shader used for 3D, support Position, Normal, Texture vertex attribute, used in lighting. More...
|
|
static const char * | SHADER_3D_SKINPOSITION_NORMAL_TEXTURE |
| Built in shader used for 3D, support Position(skeletal animation by hardware skin), Normal, Texture vertex attribute, used in lighting. More...
|
|
static const char * | SHADER_3D_POSITION_BUMPEDNORMAL_TEXTURE |
| Built in shader used for 3D, support Position, Bumped Normal, Texture vertex attribute, used in lighting. More...
|
|
static const char * | SHADER_3D_SKINPOSITION_BUMPEDNORMAL_TEXTURE |
| Built in shader used for 3D, support Position(skeletal animation by hardware skin), Bumped Normal, Texture vertex attribute, used in lighting. More...
|
|
static const char * | SHADER_3D_PARTICLE_TEXTURE |
| Built in shader for particles, support Position and Texture, with a color specified by a uniform.
|
|
static const char * | SHADER_3D_PARTICLE_COLOR |
| Built in shader for particles, support Position, with a color specified by a uniform.
|
|
static const char * | SHADER_3D_SKYBOX |
| Built in shader for skybox.
|
|
static const char * | SHADER_3D_TERRAIN |
| Built in shader for terrain.
|
|
static const char * | SHADER_CAMERA_CLEAR |
| Built in shader for camera clear.
|
|
|
static const char * | UNIFORM_NAME_AMBIENT_COLOR |
| Ambient Color uniform. More...
|
|
static const char * | UNIFORM_NAME_P_MATRIX |
| Projection Matrix uniform. More...
|
|
static const char * | UNIFORM_NAME_MULTIVIEW_P_MATRIX |
| MultiView Projection Matrix uniform. More...
|
|
static const char * | UNIFORM_NAME_MV_MATRIX |
| Model view matrix uniform. More...
|
|
static const char * | UNIFORM_NAME_MVP_MATRIX |
| Model view projection uniform. More...
|
|
static const char * | UNIFORM_NAME_MULTIVIEW_MVP_MATRIX |
| MultiView Model view projection uniform. More...
|
|
static const char * | UNIFORM_NAME_NORMAL_MATRIX |
| Normal matrix uniform. More...
|
|
static const char * | UNIFORM_NAME_TIME |
| Time uniform. More...
|
|
static const char * | UNIFORM_NAME_SIN_TIME |
| Sin time uniform. More...
|
|
static const char * | UNIFORM_NAME_COS_TIME |
| Cos time uniform. More...
|
|
static const char * | UNIFORM_NAME_RANDOM01 |
| Random number uniform. More...
|
|
static const char * | UNIFORM_NAME_SAMPLER0 |
| Sampler uniform 0-3, used for textures.
|
|
static const char * | UNIFORM_NAME_SAMPLER1 |
|
static const char * | UNIFORM_NAME_SAMPLER2 |
|
static const char * | UNIFORM_NAME_SAMPLER3 |
|
|
static const char * | ATTRIBUTE_NAME_COLOR |
| Attribute color. More...
|
|
static const char * | ATTRIBUTE_NAME_POSITION |
| Attribute position. More...
|
|
static const char * | ATTRIBUTE_NAME_TEX_COORD |
|
static const char * | ATTRIBUTE_NAME_TEX_COORD1 |
|
static const char * | ATTRIBUTE_NAME_TEX_COORD2 |
|
static const char * | ATTRIBUTE_NAME_TEX_COORD3 |
|
static GLProgram * | createWithByteArrays (const GLchar *vShaderByteArray, const GLchar *fShaderByteArray) |
|
static GLProgram * | createWithByteArrays (const GLchar *vShaderByteArray, const GLchar *fShaderByteArray, const std::string &compileTimeHeaders, const std::string &compileTimeDefines) |
|
static GLProgram * | createWithFilenames (const std::string &vShaderFilename, const std::string &fShaderFilename) |
|
static GLProgram * | createWithFilenames (const std::string &vShaderFilename, const std::string &fShaderFilename, const std::string &compileTimeHeaders, const std::string &compileTimeDefines) |
|
GLProgram Class that implements a glProgram.
- Since
- v2.0.0