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

[REG 5.6.2->5.7] MacOS: QOpenGLFunctions uses glClearDepthf instead of glClearDepth in legacy contexts (GL 2.1)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.9.0 Alpha
    • 5.7.0, 5.7.1, 5.8.0 Alpha
    • GUI: OpenGL
    • None
    • Tested on:
      - macOS 12.1 in VMware, Apple Software Renderer
      - macOS 12.1 on MacBook 2016 Core m7 1.3, Intel HD Graphics 515
    • macOS

      When used with a legacy OpenGL 2.1 context on MacOS, QOpenGLFunctions::glClearDepthf seems to use glClearDepthf(GLfloat) even though it is not defined in this version, causing an GL_INVALID_OPERATION OpenGL error when called. Versions prior to Qt 5.7 correctly use glClearDepth(GLdouble) as fallback instead.

      On Windows/Linux this seems to work correctly, but I get a 4.1 compatibility context there when I ask for 2.1, so I am not 100% sure it is not an issue there.

      Example program attached.

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

            sletta Gunnar Sletta
            fschauk Florian Schaukowitsch
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes