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

Invalid drawable with QGLWidget on OS X

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.0 RC1
    • 5.2.0 RC1
    • GUI: OpenGL
    • None
    • OS X 10.9, Qt 5.2.0-rc1
    • macOS
    • 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

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes