GLSL 1.50: "in int" is not legal on OS X?
This chunk of code snippet compiles on Windows but throws an error on OS X (Mountain Lion using main context 3.2).
#version 150 core
in int vinstance_id;
uniform uint object_id[16];
out uint id_map;
void main() {
id_map = object_id[vinstance_id];
}
Mistake:
ERROR: 0:2: int can't be an in in the fragment shader
I don't think this is correct: the GLSL 1.50 spec in section 4.3.4 talks about fragment shaders:
Fragment inputs can only be signed and unsigned integers and integer vectors, float ...
Is this a driver bug?
+3
Justin
source
to share
1 answer
No, you haven't read the full spec.
Frame shader inputs that are signed or unsigned integer or integer vectors must be qualified with a flat interpolation qualifier .
(Around the middle of page 32 of the linked doc in case anyone wants to check)
+10
Bartek banachewicz
source
to share