1.版本介绍
(1)QT版本:QT5.12 +QT Creator 4.8
(2)编译器版本:windows msvc2017 32bit / 64bit
2.问题描述
QOpenGLShaderProgram::uniformLocation(model): shader program is not linked
QOpenGLShaderProgram::uniformLocation(view): shader program is not linked
QOpenGLShaderProgram::uniformLocation(projection): shader program is not linked
QOpenGLShaderProgram::uniformLocation(lightPos): shader program is not linked
QOpenGLShaderProgram::uniformLocation(lightAmbient): shader program is not linked
QOpenGLShaderProgram::uniformLocation(lightDiffuse): shader program is not linked
QOpenGLShaderProgram::uniformLocation(matAmbient): shader program is not linked
QOpenGLShaderProgram::uniformLocation(matDiffuse): shader program is not linked
QOpenGLShader:: link: The shader uses varying xxxx, but previous shader does not write to it.
Out of resource error.
3.解决方案
顶点着色器文件中的Out变量必须和片段着色器文件中的In变量一致!