QOpenGLTexture: Remove obsolete data upload overloads

Address ### Qt 6 comment

Change-Id: I2952175ec72c5c4c7b4e518754fb1bc6f88b21df
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Volker Hilsheimer 2020-09-09 17:24:18 +02:00
parent 55dda687fd
commit 43735342b5
2 changed files with 0 additions and 145 deletions

View File

@ -3646,66 +3646,6 @@ void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset,
sourceType, data, options);
}
#if QT_DEPRECATED_SINCE(5, 3)
/*!
\obsolete
\overload
\sa setCompressedData()
*/
void QOpenGLTexture::setData(int mipLevel, int layer, CubeMapFace cubeFace,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options)
{
Q_D(QOpenGLTexture);
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
"To do so call allocateStorage() before this function");
return;
}
d->setData(mipLevel, layer, 1, cubeFace, sourceFormat, sourceType, data, options);
}
/*!
\obsolete
\overload
*/
void QOpenGLTexture::setData(int mipLevel, int layer,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options)
{
Q_D(QOpenGLTexture);
Q_ASSERT(d->textureId);
d->setData(mipLevel, layer, 1, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);
}
/*!
\obsolete
\overload
*/
void QOpenGLTexture::setData(int mipLevel,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options)
{
Q_D(QOpenGLTexture);
Q_ASSERT(d->textureId);
d->setData(mipLevel, 0, 1, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);
}
/*!
\obsolete
\overload
*/
void QOpenGLTexture::setData(PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options)
{
Q_D(QOpenGLTexture);
Q_ASSERT(d->textureId);
d->setData(0, 0, 1, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);
}
#endif
/*!
This overload of setData() will allocate storage for you.
The pixel data is contained in \a image. Mipmaps are generated by default.
@ -3818,62 +3758,6 @@ void QOpenGLTexture::setCompressedData(int dataSize, const void *data,
d->setCompressedData(0, 0, 1, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);
}
#if QT_DEPRECATED_SINCE(5, 3)
/*!
\obsolete
\overload
*/
void QOpenGLTexture::setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace,
int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options)
{
Q_D(QOpenGLTexture);
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
"To do so call allocateStorage() before this function");
return;
}
d->setCompressedData(mipLevel, layer, 1, cubeFace, dataSize, data, options);
}
/*!
\obsolete
\overload
*/
void QOpenGLTexture::setCompressedData(int mipLevel, int layer, int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options)
{
Q_D(QOpenGLTexture);
Q_ASSERT(d->textureId);
d->setCompressedData(mipLevel, layer, 1, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);
}
/*!
\obsolete
\overload
*/
void QOpenGLTexture::setCompressedData(int mipLevel, int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options)
{
Q_D(QOpenGLTexture);
Q_ASSERT(d->textureId);
d->setCompressedData(mipLevel, 0, 1, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);
}
/*!
\obsolete
\overload
*/
void QOpenGLTexture::setCompressedData(int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options)
{
Q_D(QOpenGLTexture);
Q_ASSERT(d->textureId);
d->setCompressedData(0, 0, 1, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);
}
#endif
/*!
Returns \c true if your OpenGL implementation and version supports the texture
feature \a feature.

View File

@ -455,21 +455,6 @@ public:
bool isTextureView() const;
// Pixel transfer
// ### Qt 6: remove the non-const void * overloads
#if QT_DEPRECATED_SINCE(5, 3)
QT_DEPRECATED void setData(int mipLevel, int layer, CubeMapFace cubeFace,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = nullptr);
QT_DEPRECATED void setData(int mipLevel, int layer,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = nullptr);
QT_DEPRECATED void setData(int mipLevel,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = nullptr);
QT_DEPRECATED void setData(PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = nullptr);
#endif // QT_DEPRECATED_SINCE(5, 3)
void setData(int mipLevel, int layer, CubeMapFace cubeFace,
PixelFormat sourceFormat, PixelType sourceType,
const void *data, const QOpenGLPixelTransferOptions * const options = nullptr);
@ -512,20 +497,6 @@ public:
const void *data, const QOpenGLPixelTransferOptions * const options = nullptr);
// Compressed data upload
// ### Qt 6: remove the non-const void * overloads
#if QT_DEPRECATED_SINCE(5, 3)
QT_DEPRECATED void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace,
int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = nullptr);
QT_DEPRECATED void setCompressedData(int mipLevel, int layer,
int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = nullptr);
QT_DEPRECATED void setCompressedData(int mipLevel, int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = nullptr);
QT_DEPRECATED void setCompressedData(int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = nullptr);
#endif // QT_DEPRECATED_SINCE(5, 3)
void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace,
int dataSize, const void *data,
const QOpenGLPixelTransferOptions * const options = nullptr);