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

PySide2 : QOpenGLFunction

XMLWordPrintable

    • Windows

      The attached sample code tries to achieve Scene Graph - OpenGL under QML (https://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html) in Python and QML. However, the implementation fails due to QOpneGLFunction's misbehavior.  The problem seems to arise from QAbstractOpenGLFunctions class implementation. 

      For example, the following code fails

       

      class TestRender(QObject,QOpenGLFunctions):
          def __init__( self ):
              super().__init__()
              self.profile = QOpenGLVersionProfile()
              self.gl = None
              self.viewportSize = QSize()
              self.t = 0.0
              self.program = None
              self.window = None
              self.initialize()
      
          def setT( self, t ):
              self.t = t
      
          ....
      
          def initialize( self ):
              if self.program == None:
                  initializeOpenGLFunctions()   #ERROR: The application hangs. 
              
      

      also 

          def paint( self ):
              if self.program == None:
                  self.initialize()
      
              ... 
              glDisable(GL_DEPTH_TEST)       #ERROR: The application hangs.
      

       

        1. pyside989.png
          pyside989.png
          86 kB
        2. pyside989.zip
          4 kB
        3. PySide-989-Sample.zip
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kleint Friedemann Kleint
            nagrohn Nahomi Gröhn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes