Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-10510

QGraphicsView OpenGL view port error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.3
    • 4.7.0
    • GUI: OpenGL
    • None
    • 7f1b5ae80535f7be95002ef947744828ad70be89

    Description

      I have problem running a QGraphicsView in a QGLWidget view port.
      Trying to solve the problem, I made a test modifying the Animated Tiles demo adding a OpenGL view port and a QGraphicsDropShadowEffect to tile items. Attached you'll find the modified example main.cpp. The error description follow:

      .
      .
      .
      'animatedtiles.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll'
      'animatedtiles.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll'
      QGLShader::link: "Fragment shader(s) linked, vertex shader(s) linked.
      "
      QGLShader::link: "Fragment shader(s) linked, vertex shader(s) linked.
      "
      QGLShader::link: "Fragment shader(s) linked, vertex shader(s) linked.
      "
      First-chance exception at 0x69863ba9 in animatedtiles.exe: 0xC0000005: Access violation reading location 0xabababbf.
      First-chance exception at 0x69863ba9 in animatedtiles.exe: 0xC0000005: Access violation reading location 0xabababbf.
      QGLShader::link: "Fragment shader(s) failed to link, vertex shader(s) failed to link.
      unexpected error.
      unexpected error.
      "
      "Shader program failed to link,
      Shaders Used:
      Vertex shader: main=MainWithTexCoordsVertexShader, position=PositionOnlyVertexShader:
      #define lowp
      #define mediump
      #define highp

      attribute highp vec2 textureCoordArray;
      varying highp vec2 textureCoords;
      void setPosition();
      void main(void)

      { setPosition(); textureCoords = textureCoordArray; }

      attribute highp vec2 vertexCoordsArray;
      attribute highp vec3 pmvMatrix1;
      attribute highp vec3 pmvMatrix2;
      attribute highp vec3 pmvMatrix3;
      void setPosition(void)

      { highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3); vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0); gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z); }

      Fragment shader: main=MainFragmentShader, srcPixel=CustomImageSrcFragmentShader, composition=NoCompositionModeFragmentShader, mask=NoMaskFragmentShader:
      #define lowp
      #define mediump
      #define highp

      lowp vec4 srcPixel();
      void main()

      { gl_FragColor = srcPixel(); }

      varying highp vec2 textureCoords;
      uniform lowp sampler2D imageTexture;
      lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords);
      lowp vec4 srcPixel()

      { return customShader(imageTexture, textureCoords); }

      uniform lowp vec4 shadowColor;lowp vec4 customShader(lowp sampler2D src, highp vec2 srcCoords)

      { return shadowColor * texture2D(src, srcCoords.yx).a;}

      Error Log:
      Fragment shader(s) failed to link, vertex shader(s) failed to link.
      unexpected error.
      unexpected error.
      "
      First-chance exception at 0x630741b4 (QtOpenGLd4.dll) in animatedtiles.exe: 0xC0000005: Access violation reading location 0x00000024.
      Unhandled exception at 0x630741b4 (QtOpenGLd4.dll) in animatedtiles.exe: 0xC0000005: Access violation reading location 0x00000024.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kkalland Kim Motoyoshi Kalland (Inactive)
            sirjohn2024 Sergio Bassan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes