QtOnAndroid
OpenGL GLSL Shader Documentation
The GLSL shader language definition is available online at OpenGL.org:
The glVertex frame work provides easy access to GLSL as follows:
To compile a GLSL shader:
GLuint id = lglCompileGLSLProgram("#version 120\n ...");
To use a GLSL shader:
lglUseProgram(id);
Given a uniform float “v” in the GLSL shader, we pass a value to the variable in shader as follows:
lglUniformf("v", ...);
Given a uniform vec4 “v” in the GLSL shader, we pass a vector value to the variable in the shader as follows:
lglUniformfv("v", vec4(...));
More details and examples are available in the glVertex documentation.