Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.1, 5.3.0 Alpha
-
None
-
Windows 7, Ubuntu 12.04, Mac OS X
Description
Referring to the test application in attachment. It creates an QOpenGlContext in the OGLShareWindow class, makes it current and then initializes OpenGL and a simple shader program.
This context is converted to an QGLContext. This is used for creating a QGLWidget which is used as base for creating TriangleWidget that shows an OpenGL rendered triangle.
On execution it always displays the error "QGLShaderProgram::bind: program is not valid in the current context".
Note that everything works when subclassing from QWindow, as is the case with the TriangleWindow instance. The problem only occurs when converting/sharing the context to be used with QGLWidget for the TriangleWidget instance.
This reproduces both on PC and iMac. The PC has an Nvida Quadro K600, Nvidia driver 332.76 and Windows 7. The iMac has an AMD Radeon HD 6770M and runs OS X 10.7.5. Both configurations have the same problem. Also reproduces with Ubuntu 12.04 (ATI Radeon HD 6670/7670)