Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.12.0
Description
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.
Attachments
Issue Links
- duplicates
-
PYSIDE-955 PySide2.QtGui.QOpenGLContext.versionFunction(...) returns a QAbstractOpenGLFunctions
-
- Closed
-
- is duplicated by
-
PYSIDE-667 QOpenGLShaderProgram.setUniformValue doesn't work with 1 float
-
- Reported
-
- relates to
-
PYSIDE-1034 OpenGL under Qml: SequentialAnimation does not properly work
-
- Closed
-