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

Using glColor to set the color for QGLWidget::renderText() doesn't work well when registering a display list

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P4: Low P4: Low
    • Some future release
    • 4.4.3
    • GUI: OpenGL
    • None

      The documentation of QGLWidget::renderText() says that one should call glColor*() to set the text color before calling it. This works as expected during normal execution, but it doesn't work if the whole sequence is recorded into a display list.

      The problem is that qt_gl_draw_text() (in qgl.cpp) uses glGetFloatv() to read the current color and store it into the painter's pen. But glGetFloatv() cannot be compiled into the display list. So, while registering a display list, glGetFloatv() is not recorded but it is instead executed immediately, returning whatever color is currently set into the GL context..

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

            hhartz Henrik Hartz (closed Nokia identity) (Inactive)
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes