diff options
Diffstat (limited to 'src/render/texture/texture.cpp')
-rw-r--r-- | src/render/texture/texture.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/render/texture/texture.cpp b/src/render/texture/texture.cpp index a1f0d0f98..21f29d0b6 100644 --- a/src/render/texture/texture.cpp +++ b/src/render/texture/texture.cpp @@ -254,6 +254,16 @@ void Texture::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) BackendNode::sceneChangeEvent(e); } +bool Texture::isValid() const +{ + for (const auto handle : m_textureImages) { + TextureImage *img = m_textureImageManager->data(handle); + if (img == nullptr) + return false; + } + return true; +} + void Texture::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change) { const auto typedChange = qSharedPointerCast<Qt3DCore::QNodeCreatedChange<QAbstractTextureData>>(change); |