mirror of https://github.com/qt/qt3d.git
Texture property update: notify frontend only when properties have changed
Change-Id: Ic69b25c92ff45f349715a47b19c3f3c1c40eabea Reviewed-by: Mike Krus <mike.krus@kdab.com>
This commit is contained in:
parent
a488e8e371
commit
411c2e9f78
|
|
@ -1271,7 +1271,8 @@ void Renderer::updateGLResources()
|
||||||
// Gather these information and store them to be distributed by a change next frame
|
// Gather these information and store them to be distributed by a change next frame
|
||||||
const QNodeIdVector referenceTextureIds = glTextureManager->referencedTextureIds(glTexture);
|
const QNodeIdVector referenceTextureIds = glTextureManager->referencedTextureIds(glTexture);
|
||||||
// Store properties and referenceTextureIds
|
// Store properties and referenceTextureIds
|
||||||
m_updatedTextureProperties.push_back({info.properties, referenceTextureIds});
|
if (info.wasUpdated)
|
||||||
|
m_updatedTextureProperties.push_back({info.properties, referenceTextureIds});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -211,6 +211,7 @@ GLTexture::TextureUpdateInfo GLTexture::createOrUpdateGLTexture()
|
||||||
if (testDirtyFlag(Properties)) {
|
if (testDirtyFlag(Properties)) {
|
||||||
delete m_gl;
|
delete m_gl;
|
||||||
m_gl = nullptr;
|
m_gl = nullptr;
|
||||||
|
textureInfo.wasUpdated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,7 @@ public:
|
||||||
struct TextureUpdateInfo
|
struct TextureUpdateInfo
|
||||||
{
|
{
|
||||||
QOpenGLTexture *texture = nullptr;
|
QOpenGLTexture *texture = nullptr;
|
||||||
|
bool wasUpdated = false;
|
||||||
TextureProperties properties;
|
TextureProperties properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue