问题
My shaders have in/out keywords. But I've got GLSL compile error: 'out' qualifier only valid for function parameters in GLSL 1.10. Shaders have #version 330 directive. Calling glGetString(GL_SHADING_LANGUAGE_VERSION) returns 3.30.
Here is my project: github.com/wlad031/ssu-coursework-2016. Input folder contains shaders. Main source files are src/ShaderProgramControl.cpp and src/Shader.cpp. Where is my mistake?
回答1:
In your src/FileReader.cpp you have :
if (first != '#') {
res.push_back(line);
}
And this strips out the #version 330 ...
来源:https://stackoverflow.com/questions/37590152/glsl-error-out-qualifier-only-valid-for-function-parameters-in-glsl-1-10