Flypei 2017-09-29 07:38 采纳率: 0%
浏览 2602

qt opengl 渲染 yuv 在arm上显示时,出现如下错误,怎么回事,有大神解答一下吗

OpenGLShader::compile(Fragment): 0:2(24): error: attribute' variables may not be declared in the fragment shader
0:2(24): error: illegal type for a varying variable
0:2(50): error:
attribute' variables may not be declared in the fragment shader
0:2(50): error: illegal type for a varying variable
0:2(107): error: `gl_Position' undeclared
0:2(117): error: type mismatch
0:2(141): error: type mismatch

*** Problematic Fragment shader source code ***
#define lowp
#define mediump
#define highp
#line 1
attribute vec4 vertexIn; attribute vec2 textureIn; varying vec2 textureOut; void main(void) { gl_Position = vertexIn; textureOut = textureIn; }


QOpenGLShader::compile(Vertex): 0:2(334): error: `gl_FragColor' undeclared
0:2(334): error: value of type vec4 cannot be assigned to variable of type error

*** Problematic Vertex shader source code ***
#define lowp
#define mediump
#define highp
#line 1
varying vec2 textureOut; uniform sampler2D tex_y; uniform sampler2D tex_uv; void main(void) { vec3 yuv; vec3 rgb; yuv.x = texture2D(tex_y, textureOut).r; yuv.y = texture2D(tex_uv, textureOut).r - 0.5; yuv.z = texture2D(tex_uv, textureOut).a - 0.5; rgb = mat3( 1, 1, 1, 0, -0.39465, 2.03211, 1.13983, -0.58060, 0) * yuv; gl_FragColor = vec4(rgb, 1); }


QOpenGLShader::link: "error: linking with uncompiled shadererror: linking with uncompiled shader"
QOpenGLShader::link: "error: linking with uncompiled shadererror: linking with uncompiled shader"
QOpenGLShaderProgram::uniformLocation( tex_y ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( tex_uv ): shader program is not linked

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-09-30 20:25
    关注
    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型