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

QOpenGLTexture::setData(QImage, ...) generates an OpenGL error when using OpenGL ES/Angle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.11.2, 5.12.0 Beta 3
    • GUI: OpenGL
    • None
    • Windows

    Description

      When using OpenGL ES/Angle on Windows, calls to

       

      QOpenGLTexture::QOpenGLTexture(const QImage& image, MipMapGeneration genMipMaps) 

      or

      QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps)

       

      generates an OpenGL error :  glGetError() returns 0x500 (GL_INVALID_ENUM).

      This is due to setting upload options when uploading the image data (line 3476):

       

      setData(0, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, glImage.constBits(), &uploadOptions);

       

      Problem is solved by changing it to:

      setData(0, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, glImage.constBits(), context->isOpenGLES()?nullptr:&uploadOptions);

       

       

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            divide Robin Lobel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes