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

QOpenGLWidget using OpenGL 3.3 Core Profile on Mac generates OpenGL Error right before calling paintGL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.4.1
    • None
    • Mac OS X 10.9.5
      iMac mid 2011 (Intel Core i5 2.5 Ghz, 16GB RAM)
      AMD Radeon HD 6750M 512MB (Supports OpenGL 4.1)
    • macOS

    Description

      To reproduce (see included OpenGLWidgetTest.zip)

      • Create a QOpenGLWidget as a child for another QWidget.
      • Set its QSurfaceFormat to use OpenGL version 3.3 Core Profile.
      • Set everything up to draw a triangle.
      • Now no triangle shows up, and calling glGetError() first in paintGL() returns GL_INVALID_OPERATION.

      The included stack trace is generated using the Apple OpenGL profiler and points out that the error is generated by a glViewport call, called indirectly by QOpenGLContext::makeCurrent()

      Using a QWindow with manually setting the surface type to be an OpenGL surface does enable proper rendering using OpenGL 3.3 Core Profile.
      (The included QWindow example is from http://github.com/advancingu/Qt5OpenGL, adapted to work with OpenGL 3.3 Core on Mac).

      However I suppose QOpenGLWidget should work fine and using QWindow is not an option as our actual application that we're trying to build involves a far more complex UI than a simple OpenGL window.

      Attachments

        Issue Links

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

          Activity

            People

              lagocs Laszlo Agocs
              jorisn Joris Nijs
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes