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:
parent
c0b4e9076b
commit
ef693dcb41
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user