GLTexture: do not set layers when target is Texture3D

Because Texture3D doesn't support layers and that results in a warning
being added to the console.

Change-Id: I54d34ccccc2bc1f022814689b97aaaf624026249
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
Paul Lemire 2018-10-26 11:18:34 +02:00
parent 3314694004
commit fd9f66d17d
1 changed files with 0 additions and 1 deletions

View File

@ -405,7 +405,6 @@ QOpenGLTexture *GLTexture::buildGLTexture()
// Set layers count if texture array
if (m_actualTarget == QAbstractTexture::Target1DArray ||
m_actualTarget == QAbstractTexture::Target2DArray ||
m_actualTarget == QAbstractTexture::Target3D ||
m_actualTarget == QAbstractTexture::Target2DMultisampleArray ||
m_actualTarget == QAbstractTexture::TargetCubeMapArray) {
glTex->setLayers(m_properties.layers);