diff options
author | Laszlo Agocs <[email protected]> | 2023-03-15 12:02:36 +0100 |
---|---|---|
committer | Laszlo Agocs <[email protected]> | 2023-03-16 10:27:18 +0100 |
commit | cac1abb0126d50dc9bbb4467e00df7b31a685a2b (patch) | |
tree | 390bf77a019f0bf2374d91d53c48a6f84a034310 /src/opengl/qopengltexture.cpp | |
parent | 27ab0f012a1099267888ed0e8ab9700efffec0f4 (diff) |
QOpenGLTexture: Add a doc note about the unavoidable conversion
As requested by users. Explicitly stated in the docs that the QImage
is going to be converted, to avoid surprises.
Pick-to: 6.5 6.2 5.15
Fixes: QTBUG-105364
Change-Id: Ia6a8930bcee8bd3cdbef016083599bd435b37a09
Reviewed-by: Kristoffer Skau <[email protected]>
Reviewed-by: Andy Nichols <[email protected]>
Diffstat (limited to 'src/opengl/qopengltexture.cpp')
-rw-r--r-- | src/opengl/qopengltexture.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/opengl/qopengltexture.cpp b/src/opengl/qopengltexture.cpp index 6700f0e3835..f7053be6ddc 100644 --- a/src/opengl/qopengltexture.cpp +++ b/src/opengl/qopengltexture.cpp @@ -2456,6 +2456,9 @@ QOpenGLTexture::QOpenGLTexture(Target target) This does create the underlying OpenGL texture object. Therefore, construction using this constructor does require a valid current OpenGL context. + + \note \a image is automatically converted to QImage::Format_RGBA8888 which + may have performance implications for large images with a different format. */ QOpenGLTexture::QOpenGLTexture(const QImage& image, MipMapGeneration genMipMaps) : QOpenGLTexture(QOpenGLTexture::Target2D) @@ -3610,6 +3613,9 @@ void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, The pixel data is contained in \a image. Mipmaps are generated by default. Set \a genMipMaps to \l DontGenerateMipMaps to turn off mipmap generation. + \note \a image is automatically converted to QImage::Format_RGBA8888 which + may have performance implications for large images with a different format. + \overload */ void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps) |