What does the term "genType" mean in OpenGL/GLSL?
glsl, graphics, opengl
Solution
It's a catch-all for multiple types. From the specification section 8
When the built-in functions are specified below, where the input arguments (and corresponding output) can be float , vec2 , vec3 , or vec4 , genType is used as the argument. Where the input arguments (and corresponding output) can be int , ivec2 , ivec3 , or ivec4 , genIType is used as the argument.
For reference, all the "generic" types:
- genType: floats
- genDType: double floats
- genIType: signed integers
- genUType: unsigned integers
- genBType: booleans
- mat: float matrices
- dmat: double matrices
Problem
In GLSL documentation, the term `genType` is used often as the type of parameters. For example, the function `dot` is documented as follows: ``` float dot(genType x, genType y); double dot(genDType x, genDType y); ``` What does the term `genType` mean? What does it abbreviate? Is it used elsewhere than OpenGL?