diff options
Diffstat (limited to 'src/scenegraph/convenience/texturematerial.cpp')
-rw-r--r-- | src/scenegraph/convenience/texturematerial.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/scenegraph/convenience/texturematerial.cpp b/src/scenegraph/convenience/texturematerial.cpp index 021d4b1..8e03884 100644 --- a/src/scenegraph/convenience/texturematerial.cpp +++ b/src/scenegraph/convenience/texturematerial.cpp @@ -118,7 +118,7 @@ void TextureMaterialData::updateEffectState(Renderer *renderer, AbstractEffect * TextureMaterial *tx = static_cast<TextureMaterial *>(newEffect); TextureMaterial *oldTx = static_cast<TextureMaterial *>(oldEffect); - if (oldEffect == 0 || tx->texture() != oldTx->texture()) { + if (oldEffect == 0 || tx->texture().texture() != oldTx->texture().texture()) { renderer->setTexture(0, tx->texture()); oldEffect = 0; // Force filtering update. } @@ -131,7 +131,7 @@ void TextureMaterialData::updateEffectState(Renderer *renderer, AbstractEffect * } -void TextureMaterial::setTexture(const TextureReference *texture, bool opaque) +void TextureMaterial::setTexture(const QSGTextureRef &texture, bool opaque) { m_texture = texture; m_opaque = opaque; @@ -152,7 +152,7 @@ int TextureMaterial::compare(const AbstractEffect *o) const { Q_ASSERT(o && type() == o->type()); const TextureMaterial *other = static_cast<const TextureMaterial *>(o); - if (int diff = m_texture - other->texture()) + if (int diff = m_texture->textureId() - other->texture()->textureId()) return diff; return int(m_linear_filtering) - int(other->m_linear_filtering); } @@ -205,14 +205,14 @@ int TextureMaterialWithOpacity::compare(const AbstractEffect *o) const { Q_ASSERT(o && type() == o->type()); const TextureMaterialWithOpacity *other = static_cast<const TextureMaterialWithOpacity *>(o); - if (int diff = m_texture - other->texture()) + if (int diff = m_texture->textureId() - other->texture()->textureId()) return diff; if (int diff = int(m_linear_filtering) - int(other->m_linear_filtering)) return diff; return int(other->m_opacity < m_opacity) - int(m_opacity < other->m_opacity); } -void TextureMaterialWithOpacity::setTexture(const TextureReference *texture, bool opaque) +void TextureMaterialWithOpacity::setTexture(const QSGTextureRef &texture, bool opaque) { m_texture = texture; m_opaque = opaque; @@ -230,7 +230,7 @@ void TextureMaterialWithOpacityData::updateEffectState(Renderer *renderer, Abstr TextureMaterialWithOpacity *tx = static_cast<TextureMaterialWithOpacity *>(newEffect); TextureMaterialWithOpacity *oldTx = static_cast<TextureMaterialWithOpacity *>(oldEffect); - if (oldEffect == 0 || tx->texture() != oldTx->texture()) { + if (oldEffect == 0 || tx->texture().texture() != oldTx->texture().texture()) { renderer->setTexture(0, tx->texture()); oldEffect = 0; // Force filtering update. } |