diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2019-02-20 09:54:07 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2019-02-27 13:41:05 +0000 |
commit | d15b02ff291e3124d9bb8ac3b06b704c292f52ab (patch) | |
tree | 3c30d87103656682cecd9dd5b1577f7127bb7b60 /src/gui/opengl/qopengltexture_p.h | |
parent | c6fc2bc3e205e3710d1f9bdca984c3309cc2eb06 (diff) |
QOpenGLTexture::setData add overloads to allow specifying sub images
All current setData implementation only allow to specify a full size
sub image for a given mip level. In some cases, we might only want
to update a small region on an image, in which cases being able to
specify the x, y, z offsets as well as the dimensions is required.
Change-Id: I880cfcc67a814733e8ab880aa8766c87b7bc7e45
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/gui/opengl/qopengltexture_p.h')
-rw-r--r-- | src/gui/opengl/qopengltexture_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/opengl/qopengltexture_p.h b/src/gui/opengl/qopengltexture_p.h index f7694f77bc..9f3457ad0a 100644 --- a/src/gui/opengl/qopengltexture_p.h +++ b/src/gui/opengl/qopengltexture_p.h @@ -101,6 +101,10 @@ public: void setData(int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void *data, const QOpenGLPixelTransferOptions * const options); + void setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, + int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, + QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, + const void *data, const QOpenGLPixelTransferOptions * const options); void setCompressedData(int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, int dataSize, const void *data, const QOpenGLPixelTransferOptions * const options); |