summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2023-03-15 12:02:36 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-03-16 12:26:18 +0000
commitb19cf820b7b025d3c098fa5e592b434dfcd70e61 (patch)
tree794ff8036856c5a51b38732115bf13e3538dc225
parent9126d9e5d3a984d7880bed0ab6af44da9b94a6e6 (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. Fixes: QTBUG-105364 Change-Id: Ia6a8930bcee8bd3cdbef016083599bd435b37a09 Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit cac1abb0126d50dc9bbb4467e00df7b31a685a2b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/opengl/qopengltexture.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/opengl/qopengltexture.cpp b/src/opengl/qopengltexture.cpp
index 1cccb70772..18a34aacf3 100644
--- a/src/opengl/qopengltexture.cpp
+++ b/src/opengl/qopengltexture.cpp
@@ -2497,6 +2497,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)
@@ -3651,6 +3654,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)