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

QOpenGLWidget: error: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.6.2
    • Qt RHI
    • None
    • GNOME 45
      Wayland
      Gentoo Linux
    • Linux/Wayland

    Description

      Qt 6.6.2 is causing a GL error when QOpenGLWidget is used, complicating application debugging.

      Python example program (also seen with C++), glerror:

      import sys
      
      from PyQt6.QtOpenGLWidgets import *
      from PyQt6.QtWidgets import *
      
      class Dialog(QDialog):
      
          def __init__(self, parent=None):
              super().__init__(parent)
              self.setGeometry(0, 0, 100, 100)
              glwidget = QOpenGLWidget()
              layout = QVBoxLayout()
              layout.addWidget(glwidget)
              self.setLayout(layout)
      
      app = QApplication(sys.argv)
      dialog = Dialog()
      dialog.show()
      app.exec()
      
      $ MESA_DEBUG=1 ./glerror 
      Mesa: error: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
      

      This is independent of Mesa driver, with the software driver:

      $ LIBGL_ALWAYS_SOFTWARE=1 QSG_INFO=1 MESA_DEBUG=1 ./glerror
      qt.rhi.general: Created OpenGL context QSurfaceFormat(version 4.5, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 0, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 0, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QColorSpace(), profile  QSurfaceFormat::CompatibilityProfile)
      qt.rhi.general: OpenGL VENDOR: Mesa RENDERER: llvmpipe (LLVM 17.0.6, 256 bits) VERSION: 4.5 (Compatibility Profile) Mesa 24.0.1
      Mesa: error: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
      

      The only place in QtBase I can find GL_BACK_LEFT is:
      https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/rhi/qrhigles2.cpp?h=6.6.2#n3168

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            cjm Chris Mayo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes