QOpenGLTexture: Fix a comment

The right function to call is allocateStorage(), not allocate().

Change-Id: Ia26817dbec710d49e511cab2ae3ca5c1fda20722
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
Giuseppe D'Angelo 2014-11-13 17:07:14 +01:00 committed by Sean Harmer
parent c0b4e9076b
commit ef693dcb41

View File

@ -2751,7 +2751,7 @@ void QOpenGLTexture::setData(int mipLevel, int layer, CubeMapFace cubeFace,
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
"To do so call allocate() before this function");
"To do so call allocateStorage() before this function");
return;
}
d->setData(mipLevel, layer, cubeFace, sourceFormat, sourceType, data, options);
@ -2809,7 +2809,7 @@ void QOpenGLTexture::setData(int mipLevel, int layer, CubeMapFace cubeFace,
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
"To do so call allocate() before this function");
"To do so call allocateStorage() before this function");
return;
}
d->setData(mipLevel, layer, cubeFace, sourceFormat, sourceType, data, options);
@ -2901,7 +2901,7 @@ void QOpenGLTexture::setCompressedData(int mipLevel, int layer, CubeMapFace cube
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
"To do so call allocate() before this function");
"To do so call allocateStorage() before this function");
return;
}
d->setCompressedData(mipLevel, layer, cubeFace, dataSize, data, options);
@ -2952,7 +2952,7 @@ void QOpenGLTexture::setCompressedData(int mipLevel, int layer, CubeMapFace cube
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
"To do so call allocate() before this function");
"To do so call allocateStorage() before this function");
return;
}
d->setCompressedData(mipLevel, layer, cubeFace, dataSize, data, options);