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

Add support for getProcAddress in QOpenGLContext

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • P2: Important
    • 6.5.0
    • 5.12.1
    • PySide
    • None
    • This problem impact all versions of PySide2 and all plateform.

    • All
    • 58a706660 (dev)

    Description

      Hi,

      Currently, the PySide2 implementation of QOpenGLContext lacks the function getProcAddress ( see: https://doc.qt.io/qt-5/qopenglcontext.html#getProcAddress ).

      This function is critical for everyone who wants to plug their own engine to the Qt's OpenGL window&context instead of using the QOpenGLFunctions.

      As an example, my current 3D engine is programmed in Rust, and i call it via python (using ffi). The engine only has to handle sending the OpenGL commands. All the window and context creation is handle by external library ( in this case here, Qt, but this architecture allow to change the window/context management without impacting the rendering aspect ). But, to be able to use the OpenGL functions, the engine need to be able to load the function pointer from the context.

      To do this in C++ Qt, we can pass the getProcAddress function to the engine. But this function is not accessible in PySide2 (nor PyQT5 also) making it impossible to use the Qt OpenGL context outside of Qt's specific OpenGL functions.

      Attachments

        1. pyside971_pyqt.py
          0.6 kB
        2. pyside971.py
          0.6 kB
        3. qtquick_mpv_getprocadress.diff
          4 kB
        For Gerrit Dashboard: PYSIDE-971
        # Subject Branch Project Status CR V

        Activity

          People

            kleint Friedemann Kleint
            maeln Maƫl NT
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes