找回密码
 注册
关于网站域名变更的通知
查看: 891|回复: 1
打印 上一主题 下一主题

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

[复制链接]
  • TA的每日心情

    2019-11-19 15:29
  • 签到天数: 1 天

    [LV.1]初来乍到

    跳转到指定楼层
    1#
    发表于 2019-7-1 16:28 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

    EDA365欢迎您登录!

    您需要 登录 才可以下载或查看,没有帐号?注册

    x

    OpenGLShader::compile(Fragment): 0:2(24): error: attribute' variables may not be declared in the fragment shader6 O& e1 o1 S1 f
    0:2(24): error: illegal type for a varying variable. \! X* ~4 K- n
    0:2(50): error:attribute' variables may not be declared in the fragment shader3 P& y; n" k) m/ G
    0:2(50): error: illegal type for a varying variable% n% J- U+ z5 k8 w
    0:2(107): error: `gl_Position' undeclared& g4 O3 O% E6 S3 C) n6 ?5 n
    0:2(117): error: type mismatch2 e$ F% H  w" ^$ h7 g2 a3 N
    0:2(141): error: type mismatch

    *** Problematic Fragment shader source code ***' x: c! o. H. a1 U& ]
    #define lowp
    # Q- M0 ?3 d0 V/ ]#define mediump: F1 A5 g; e( d4 O) W% q. x
    #define highp& A+ G" j* N5 v$ |
    #line 1
    # e5 m% X  c4 }; j1 q. mattribute 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
    4 Y1 h- q9 E5 c" e# I0:2(334): error: value of type vec4 cannot be assigned to variable of type error

    *** Problematic Vertex shader source code ***
    9 A4 m) e, G% i* K- [#define lowp5 r2 M2 E3 f$ ?+ y* [$ D# N
    #define mediump% W) {: M6 `; j7 g5 r
    #define highp
    : J! F5 \4 L$ s+ H#line 1
    & I# T% J; H7 [. Y( |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"
    * J/ `8 }9 c" {/ `; aQOpenGLShader::link: "error: linking with uncompiled shadererror: linking with uncompiled shader") \, D% N4 ^* e) b5 a8 M# e3 ^
    QOpenGLShaderProgram::uniformLocation( tex_y ): shader program is not linked/ r6 u* c7 Y# [' v
    QOpenGLShaderProgram::uniformLocation( tex_uv ): shader program is not linked

    4 J) a! A1 \& X7 A
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    关闭

    推荐内容上一条 /1 下一条

    EDA365公众号

    关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

    GMT+8, 2025-11-24 17:33 , Processed in 0.156250 second(s), 23 queries , Gzip On.

    深圳市墨知创新科技有限公司

    地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

    快速回复 返回顶部 返回列表