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

EGL extension string not parsed correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 4.6.1
    • 4.6.0
    • GUI: OpenGL
    • None
    • 108ab335537d20bc74aa9115d46cf91243223c4e

    Description

      The method QEglContext::hasExtension() does not parse the EGL extensions string correctly. The extension names are separated by spaces and may be substrings of one another, so that a simple substring search could yield a false positive depending on the platform and graphics driver.

      This is essentially the same fix as the second patch attached to Qt bug #5732. This problem with parsing the extensions string is well-known and even prompted a change to the OpenGL API in OpenGL 3.0:

      http://www.opengl.org/wiki/GlGetString#glGetString.28GL_EXTENSIONS.29

      It would be better to share the utility function parse_extensions_string() among Qt components, but for know the patch is self-contained. Please forgive the use of C library functions instead of QString methods – I simply could not find a way to put the QString methods to reasonable use here without recreating nearly the same string scanning logic as with the C library functions.

      Attachments

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

        Activity

          People

            rweather Rhys Weatherley (closed Nokia identity) (Inactive)
            danielk Daniel Elstner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes