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

No OpenGL stereo support on Mac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.3.0 Beta1
    • 5.1.1
    • GUI: OpenGL
    • None
    • Mac OS 10.8.5. Effects all Mac OS systems.
    • macOS
    • 8212e0cfad754d65146a21c95f38deaac8ffe8e1

      Creating a QGLWidget using a QGLFormat with setStereo(true) does not even try to create a stereo OpenGL on Mac OS. And the widget then reports that it does support stereo (w.format().stereo() -> true).

      The broken code is

      qtbase/src/platformsupport/cglconvenience/cglconvenience.mm

      where the routine that chooses the Mac OpenGL pixel format qcgl_createNSOpenGLPixelFormat() simply ignores the stereo setting. The code which records the QGLFormat properties of the actual OpenGL context obtained qtbase/src/plugins/platforms/cocoa/qcocoaglcontext.mm, routine QCocoaGLContext::QCocoaGLContext() also ignores the OpenGL context and simply says the format exactly matches the requested format.

      I've provided a patch that fixes the problem. It tries to get a stereo OpenGL context when the QGLFormat requests one, and if stereo is not supported provides a mono OpenGL context. Also the patch code will report the actual properties of the OpenGL context that was obtained.

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

            sorvig Morten Sørvig
            tgoddard Tom Goddard
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes