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

bindTexure() doesn't work for QGraphicsWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.6.2
    • GUI: OpenGL
    • None

    Description

      I set QGraphicsView viewport with a QGLWidget, and try to use bindTexture(QPixmap, GL_TEXTURE_2D); the texture doesn't take effect during drawing. details see below:

      Based on qt simpleanchorlayout example ($qt_src/examples/graphicsview/simpleanchorlayout), I set the GraphicsView viewport with a GLWidget, and drew a triangle in a QGraphicsWidget. It works ok.
      When I try to map a texture to the triangle based on bindTexure(QPixmap, ...), the texture can't be mapped. See Screenshot-Simple Anchor Layout.png
      While if I use bindTexture(QImage, ...), the texture will be shown. See Screenshot-Simple Anchor Layout-QImage.png
      However QPixmap is what we needed for the 'texture from pixmap' extension, then I could render Pixmap video frame in qt-moblility.

      The entire project in in simpleanchorlayout.tgz, and my changes is in bindTexture.patch.
      If I use bindTexture(QPixmap, ...) in a class derived from QGLWidget (in qt texture example), it will also be ok. It is still not our case. See Screenshot-Textures-with-triangle.png

      Attachments

        1. bindTexture-player.tgz
          7 kB
        2. qt-mobility-bindTexture.diff.txt
          2 kB
        3. texture-in-qgraphicswidget-3.png
          texture-in-qgraphicswidget-3.png
          124 kB
        4. texture-in-qgraphicswidget-1.png
          texture-in-qgraphicswidget-1.png
          120 kB
        5. texture-in-qgraphicswidget-2.png
          texture-in-qgraphicswidget-2.png
          120 kB
        6. texture-in-player-3.png
          texture-in-player-3.png
          131 kB
        7. texture-in-player-1.png
          texture-in-player-1.png
          26 kB
        8. texture-in-player-2.png
          texture-in-player-2.png
          39 kB
        9. bindTexture-0624.tgz
          7 kB
        10. bindTextuer-2.patch
          2 kB
        11. Screenshot-Simple Anchor Layout-QImage.png
          Screenshot-Simple Anchor Layout-QImage.png
          14 kB
        12. Screenshot-Textures-with-triangle.png
          Screenshot-Textures-with-triangle.png
          43 kB
        13. Screenshot-Simple Anchor Layout.png
          Screenshot-Simple Anchor Layout.png
          9 kB
        14. bindTexture.patch
          2 kB
        15. simpleanchorlayout.tgz
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kjernase Trond Kjernåsen (Inactive)
            halley Zhao, Halley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes