Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Image and warning X3206: implicit truncation of vector type

    QML and Qt Quick
    2
    2
    3816
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      portoist last edited by

      Hello,
      I am porting my app from QtQuick 1.1 to 2.0 and I have following code:
      @
      Item {
      id: container
      width: 61
      height: 59
      property url bgImage: "qrc:/images/buttons/button1.png"

      Image {
          id: __bgImage
          source: container.bgImage
          anchors.top: parent.top; anchors.left: parent.left;
          anchors.topMargin: 4; anchors.leftMargin: -4
          visible: container.state==''
          opacity: container.enabled ? 1.0 : 0.6
      }
      

      }
      @
      Image is displayed fine but I am getting following warning in application output:
      @QOpenGLShader::link: "(35,18): warning X3206: implicit truncation of vector type"@
      If I comment the source property in the __bgImage, then the warning is gone.
      I am running Qt 5.0.1 with Mingw32 on Windows 7. Can anyone tell me what this warning actually means and how to get rid off it? Thanks!

      1 Reply Last reply Reply Quote 0
      • C
        chrisadams last edited by

        I don't know much about why this warning is emitted, but it happens when the (in this case, default) GLSL shader (and in this case, I assume it's a fragment shader) is compiled. We're getting well out of my area of competence, but I think that there's probably an issue with ANGLE regarding how the GLSL shader is converted to HLSL, which causes an assignment (most likely of a uniform) to a different type, causing an implicit truncation.

        Build your Qt with desktop openGL configuration instead of ANGLE, and you should see this go away.

        Cheers,
        Chris.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post