Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.11.2, 5.12.0 Beta 3
-
None
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);