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 <kristoffer.skau@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
parent
27ab0f012a
commit
cac1abb012
@ -2456,6 +2456,9 @@ QOpenGLTexture::QOpenGLTexture(Target target)
|
|||||||
This does create the underlying OpenGL texture object. Therefore,
|
This does create the underlying OpenGL texture object. Therefore,
|
||||||
construction using this constructor does require a valid current
|
construction using this constructor does require a valid current
|
||||||
OpenGL context.
|
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(const QImage& image, MipMapGeneration genMipMaps)
|
||||||
: QOpenGLTexture(QOpenGLTexture::Target2D)
|
: 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.
|
The pixel data is contained in \a image. Mipmaps are generated by default.
|
||||||
Set \a genMipMaps to \l DontGenerateMipMaps to turn off mipmap generation.
|
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
|
\overload
|
||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps)
|
void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps)
|
||||||
|
Loading…
Reference in New Issue
Block a user