Qt 5.6 incompatibility fixed

This commit is contained in:
Uwe Rathmann 2021-10-26 10:59:26 +02:00
parent bf1c45352c
commit 10519ffee0
1 changed files with 8 additions and 2 deletions

View File

@ -91,8 +91,14 @@ namespace
if ( state.isOpacityDirty() )
p->setUniformValue( m_opacityId, state.opacity() );
if ( oldMaterial == nullptr || newMaterial->compare( oldMaterial ) != 0
|| state.isCachedMaterialDataDirty( ))
bool updateMaterial = ( oldMaterial == nullptr )
|| newMaterial->compare( oldMaterial ) != 0;
#if QT_VERSION >= QT_VERSION_CHECK( 5, 12, 0 )
updateMaterial |= state.isCachedMaterialDataDirty();
#endif
if ( updateMaterial )
{
auto material = static_cast< const Material* >( newMaterial );