Qt OpenGL遇到这个情况如何解决

QOpenGLShaderProgram::addShader: Program and shader are not associated with same context.
QOpenGLShaderProgram::addShader: Program and shader are not associated with same context.
QOpenGLShaderProgram::uniformLocation( tex_y ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( tex_u ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( tex_v ): shader program is not linked

2个回答

GL遇到这个情况如何解决
QOpenGLShaderProgram::addShader: Program and shader are not associated with same context.
QOpenGLShaderProgram::addShader: Program and shader are not associated with same context.
QOpenGLShaderProgram::uniformLocation( tex_y ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( tex_u ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( tex_v ): shader program is not linked

查一下初始化函数,确保“vshader.glsl”和“fshader.glsl”是否存在,且路径正确

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问