Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1716

Porting OpenGLunderQML example to PySide fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • None
    • 5.15.2
    • PySide
    • None
    • Linux/X11
    • e062c9d70b5560beccb696aa13d8d44e5a2332f8 (pyside/pyside-setup/dev) f9f80d765f44da153034e8c254e8842498511aa5 (pyside/pyside-setup/6.2)

    Description

      I came across a number of issues while porting https://code.qt.io/cgit/qt/qtdeclarative.git/tree/examples/quick/scenegraph/openglunderqml?h=5.15 to PySide2.

      The port is trying to be as close as possible to the original (even comments have be transferred). Right now, the output is glitchy (see attached png) but it's actually rendering through OpenGL. The main.py file can be executed directly with python main.py to reproduce.

      The two main.py and main.qml files contains various FIXME. Here is a summary:

      1. window.rendererInterface() leads to 'PySide2.QtQuick.QQuickView' object has no attribute 'rendererInterface'
      2. initializeOpenGLFunctions() crashes
      3. program.setUniformValue("t", float(self._t)) is not recognized as a valid prototype
      4. the output is glitchy (maybe messed up something in the OpenGL calls but I don't see it)
      5. in the QML, the SequentialAnimation on t can not be made

      Any hint/directions? I'm trying to build a PySide2+QML application that use an external engine with different backends (OpenGL, Vulkan, etc), and this example would be a good first step in that direction.

      Attachments

        1. 2021-11-19-234506-fie4Thuo.png
          2021-11-19-234506-fie4Thuo.png
          50 kB
        2. main.py
          5 kB
        3. main.qml
          1 kB

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              ux U X
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes