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

QGraphicsView with OpenGL viewport calls illegal GLX pixmap functions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.7.0
    • 4.6.2
    • GUI: OpenGL
    • None
    • 254f093dff864f574e05540e771e1fa6d6c4f7c5

      (Running Qt 4.6 on a Laptop with Intel Corporation Mobile 915GM/GMS/910GML Express graphics chipset. Operating system is Arch Linux, graphics driver is xf86-video-intel-2.9.1-1. Output of glxinfo says "direct rendering: Yes", "GLX version: 1.2" and "OpenGL version string: 1.4 Mesa 7.7".)

      Look at the stripped-down example attached below:

      Without the setCacheMode line (no pixmap drawing!!), the program runs without error messages and the rectangle appears inside the QGraphicsView.

      With the setCacheMode line, the rectangle doesn't appear and instead the following is shown at the command line where the program was started:

      ######[commandline output]######
      WARNING: Application calling GLX 1.3 function "glXCreatePixmap" when GLX 1.3 is not supported! This is an application bug!
      WARNING: Application calling GLX 1.3 function "glXDestroyPixmap" when GLX 1.3 is not supported! This is an application bug!
      ################################

      Here's the source code for the example:

      ######[main.cpp]################
      #include <QApplication>
      #include <QtGui>
      #include <QGLFormat>

      int main(int argc, char **argv)
      {
      QApplication app(argc, argv);

      QGraphicsScene scene;
      QGraphicsItem *item = scene.addRect(0, 0, 100, 100);
      item->setCacheMode(QGraphicsItem::DeviceCoordinateCache);

      QGraphicsView view(&scene);
      view.setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
      view.show();

      return app.exec();
      }
      ################################

      ######[bug.pro]#################
      TEMPLATE = app
      QT += opengl
      SOURCES += main.cpp
      ################################

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

            tcooksey Tom Cooksey
            uetsah uetsah
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes