Reputation: 9392
I'm trying port a GLSL 4.2 to 1.2 (Because I'm using a mac), however, I'm not sure how I can convert an out parameter to 1.2 (as it generates an error).
out vec3 vNormal;
out vec2 texcoord;
out vec3 vPosition;
The compiler error is as following.
Invalid qualifiers 'out' in global variable context
ERROR: 0:13: Invalid qualifiers 'out' in global variable context
ERROR: 0:14: Invalid qualifiers 'out' in global variable context
ERROR: 0:19: Use of undeclared identifier 'texcoord'
ERROR: 0:20: Use of undeclared identifier 'vNormal'
ERROR: 0:21: Use of undeclared identifier 'vPosition'
Upvotes: 1
Views: 2642
Reputation: 473437
The GLSL 1.30 and above out
qualifier represents a shader stage output. What that means for 1.20 and below depends on which shader stage you're talking about.
Since you're using identifiers like texcoord
and vNormal
, I'm guessing that you are writing a vertex shader. Then the keyword you should use is varying
. Your fragment shader inputs that correspond to these should also be varying
too.
Upvotes: 6