Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-37893

Invalid OpenGL context when converting from QOpenGLContext to QGLContext.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.0
    • 5.2.1, 5.3.0 Alpha
    • GUI: OpenGL
    • 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)

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes