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

Invalid drawable with QGLWidget on OS X

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.2.0 RC1
    • Fix Version/s: 5.3.0 RC1
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Environment:
      OS X 10.9, Qt 5.2.0-rc1
    • Platform/s:
      macOS
    • Commits:
      2f76a30ee18b5a7938e0c7a7be0a816f139fbc7a

      Description

      The attached program that creates a simple QGLWidget and shows it indicates that there is a problem on OS X if we do not set an initial size for the widget.

      If we set a size all is fine and works and we get a valid current context in initializeGL() and friends.

      However, if we comment out the resize() line in main.cpp, then when we call show() on the widget we get an "Invalid drawable" error and the context fails to be made current. This results in no context available inside of initializeGL() and friends, rendering them useless.

      The work around is to ensure that we call resize() before show()ing the widget.

      I suspect that the cocoa QPA plugin is trying to create a native window surface with an invalid size in the problematic case.

        Attachments

          Issue Links

          Error rendering 'com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule'. Please contact your Jira administrators.

            Activity

              People

              • Assignee:
                sorvig Morten Sørvig
                Reporter:
                seanharmer Sean Harmer
              • Votes:
                3 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews Side Panel

                  Error rendering 'com.meetme.plugins.jira.gerrit-plugin:gerrit-reviews-side-panel'. Please contact your Jira administrators.