This GLSL code compile and run warningless in ATI's OpenGL:
void main()
{
vec4 tmp = gl_ModelViewMatrix * gl_Vertex;
tmp.xyz = tmp.xyz / (1 - tmp.w);
tmp.w = 1;
gl_Position = gl_ProjectionMatrix * tmp;
gl_FrontColor = gl_Color;
}
Why does it fail with mesa? How to decrypt that error message and make it Mesa's implementation compliant?
Compilation log:
0:1(88): error: Could not implicitly convert operands to arithmetic operator
0:1(89): error: Operands to arithmetic operators must be numeric
0:1(97): error: type mismatch
Try changing your
1
s to1.0
s.