Syntaxerror 'varying' in GLSL
问题 I'm using GLFW 3 and OpenGL 4 + GLSL 4 on a MacBook Pro. I get the following syntax error, when starting my program: ERROR: 0:5: 'varying' : syntax error syntax error The shader code: #version 410 varying vec3 vertex; void main() { } Why am I not allowed to use varying variables? 回答1: Why am I not allowed to use varying variables? Because they have been replaced by the more generic in / out variable concept since GLSL 1.30. That became necessary because with GL3, the geometry shader was