update issues fixed
This commit is contained in:
parent
f3ee4749b8
commit
583cf4e87f
|
@ -154,21 +154,24 @@ namespace
|
|||
texture->setTextureNode( textureNode );
|
||||
}
|
||||
|
||||
textureNode->setRect( rect );
|
||||
|
||||
auto texture = qobject_cast< QskSceneTexture* >( textureNode->texture() );
|
||||
Q_ASSERT( texture );
|
||||
|
||||
if ( texture->isDirty() )
|
||||
if ( texture->isDirty() || rect != textureNode->rect() )
|
||||
{
|
||||
texture->setFiltering(
|
||||
overlay->smooth() ? QSGTexture::Linear : QSGTexture::Nearest );
|
||||
|
||||
auto finalNode = const_cast< QSGTransformNode* >( qskItemNode( overlay ) );
|
||||
texture->render( rootNode, finalNode, overlay->geometry() );
|
||||
|
||||
texture->render( rootNode, finalNode,
|
||||
rect.translated( overlay->position() ) );
|
||||
|
||||
textureNode->markDirty( QSGNode::DirtyMaterial );
|
||||
}
|
||||
|
||||
textureNode->setRect( rect );
|
||||
|
||||
return textureNode;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -88,6 +88,11 @@ void TextureFilterNode::setRect( const QRectF& rect )
|
|||
}
|
||||
}
|
||||
|
||||
QRectF TextureFilterNode::rect() const
|
||||
{
|
||||
return d_func()->rect;
|
||||
}
|
||||
|
||||
void TextureFilterNode::setOwnsTexture( bool on )
|
||||
{
|
||||
d_func()->ownsTexture = on;
|
||||
|
|
|
@ -27,6 +27,7 @@ class TextureFilterNode : public QSGGeometryNode
|
|||
bool ownsTexture() const;
|
||||
|
||||
void setRect( const QRectF& );
|
||||
QRectF rect() const;
|
||||
|
||||
void setTextureMaterial( TextureFilterMaterial* );
|
||||
TextureFilterMaterial* textureMaterial() const;
|
||||
|
|
|
@ -151,6 +151,8 @@ namespace
|
|||
|
||||
void Renderer::render()
|
||||
{
|
||||
m_dirty = false;
|
||||
|
||||
qskTryBlockTrailingNodes( m_finalNode, rootNode(), true, false );
|
||||
|
||||
#if 0
|
||||
|
@ -160,8 +162,6 @@ namespace
|
|||
#endif
|
||||
Inherited::render();
|
||||
qskTryBlockTrailingNodes( m_finalNode, rootNode(), false, false );
|
||||
|
||||
m_dirty = false;
|
||||
}
|
||||
|
||||
void Renderer::nodeChanged( QSGNode* node, QSGNode::DirtyState state )
|
||||
|
|
Loading…
Reference in New Issue