glext.h header there is the group of functions with the prefix
glTangent. It has signatures similar to the
glNormal function groups (it contains functions for each type and
glTangentPointer). I guess it is an vertex attribute as the normal, the color, etc...
But what meaning does the tangent attribute have? And in which context is it used?
Edit: The term Tangent does make sense to me. But when the normal vector is already given, why also give the tangent vector?
My approach to answer my own question:
glTangent allows to add a tangent vector to a vertex. It has no special meaning in classic rendering and does not replace normals.
But it is used to implement bump maps. The shader brings the attribute into scope through the following GLSL declaration:
attribute vec4 glTangent4f;
The following sources only focus on the shader code and only mention, that the attribute is given by an engine. I guess that the engine itself calls one of the
The following code snipped I found sets up the shader variables. It names the tangent vector variable
GLTangent. It also sets up more common variables like
glBindAttribLocation(p, VETYPE_TANGENT, "GLTangent");
Then the variable is accessed through
attribute vec4 GLTangent;