diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2014-01-31 17:04:08 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-31 18:57:43 +0100 |
commit | c5ee652278d3412b146e54589f3073c3a5dd032c (patch) | |
tree | b824ef867e680d365037386ae2b0a596595015b6 /src/gui/opengl/qopengltexture.h | |
parent | b18779b61fc9ce0f9ac420d44575f4322c95993b (diff) |
QOpenGLTexture: Introduce const void * image upload methods
An API oversight caused the image upload methods to take a "void *",
which is not necessary at all. The underlying texture uploading calls
(i.e. the gl(Compressed)Tex(Sub)Image<N>D family) all take a "const void *".
The methods taking a "void *" get deprecated.
Change-Id: Idfda58d4d7d0af1f335e5cbad7d700f4ccad652c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/gui/opengl/qopengltexture.h')
-rw-r--r-- | src/gui/opengl/qopengltexture.h | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/src/gui/opengl/qopengltexture.h b/src/gui/opengl/qopengltexture.h index 5c0f8101a6..bb632454ad 100644 --- a/src/gui/opengl/qopengltexture.h +++ b/src/gui/opengl/qopengltexture.h @@ -337,28 +337,53 @@ public: }; // Pixel transfer + // ### Qt 6: remove the non-const void * overloads + QT_DEPRECATED void setData(int mipLevel, int layer, CubeMapFace cubeFace, + PixelFormat sourceFormat, PixelType sourceType, + void *data, const QOpenGLPixelTransferOptions * const options = 0); + QT_DEPRECATED void setData(int mipLevel, int layer, + PixelFormat sourceFormat, PixelType sourceType, + void *data, const QOpenGLPixelTransferOptions * const options = 0); + QT_DEPRECATED void setData(int mipLevel, + PixelFormat sourceFormat, PixelType sourceType, + void *data, const QOpenGLPixelTransferOptions * const options = 0); + QT_DEPRECATED void setData(PixelFormat sourceFormat, PixelType sourceType, + void *data, const QOpenGLPixelTransferOptions * const options = 0); + void setData(int mipLevel, int layer, CubeMapFace cubeFace, PixelFormat sourceFormat, PixelType sourceType, - void *data, const QOpenGLPixelTransferOptions * const options = 0); + const void *data, const QOpenGLPixelTransferOptions * const options = 0); void setData(int mipLevel, int layer, PixelFormat sourceFormat, PixelType sourceType, - void *data, const QOpenGLPixelTransferOptions * const options = 0); + const void *data, const QOpenGLPixelTransferOptions * const options = 0); void setData(int mipLevel, PixelFormat sourceFormat, PixelType sourceType, - void *data, const QOpenGLPixelTransferOptions * const options = 0); + const void *data, const QOpenGLPixelTransferOptions * const options = 0); void setData(PixelFormat sourceFormat, PixelType sourceType, - void *data, const QOpenGLPixelTransferOptions * const options = 0); + const void *data, const QOpenGLPixelTransferOptions * const options = 0); // Compressed data upload + // ### Qt 6: remove the non-const void * overloads + QT_DEPRECATED void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace, + int dataSize, void *data, + const QOpenGLPixelTransferOptions * const options = 0); + QT_DEPRECATED void setCompressedData(int mipLevel, int layer, + int dataSize, void *data, + const QOpenGLPixelTransferOptions * const options = 0); + QT_DEPRECATED void setCompressedData(int mipLevel, int dataSize, void *data, + const QOpenGLPixelTransferOptions * const options = 0); + QT_DEPRECATED void setCompressedData(int dataSize, void *data, + const QOpenGLPixelTransferOptions * const options = 0); + void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace, - int dataSize, void *data, + int dataSize, const void *data, const QOpenGLPixelTransferOptions * const options = 0); void setCompressedData(int mipLevel, int layer, - int dataSize, void *data, + int dataSize, const void *data, const QOpenGLPixelTransferOptions * const options = 0); - void setCompressedData(int mipLevel, int dataSize, void *data, + void setCompressedData(int mipLevel, int dataSize, const void *data, const QOpenGLPixelTransferOptions * const options = 0); - void setCompressedData(int dataSize, void *data, + void setCompressedData(int dataSize, const void *data, const QOpenGLPixelTransferOptions * const options = 0); // Helpful overloads for setData |