diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-03-12 21:24:26 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-13 16:39:34 +0100 |
commit | fb1c775e2e92ae13d10f88318c47ff92f5951812 (patch) | |
tree | 17967dc6c67ebd042734b37a79ddaa0a8d159975 /src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h | |
parent | f3a917644253347bcb7041fd9fc3b1570184b5f4 (diff) |
Fix rendering issue with material changes from opaque <-> alpha
When I introduced the invalidation of z ranges, I forgot that we need
to rebuild render lists when nodes move from opaque to alpha batches
or vice versa as that sorting happens in buildRenderLists(). To remedy
this, make Batch::isMaterialCompatible report blending changes
separately and trigger a full rebuild in this case.
Task-number: QTBUG-37422
Change-Id: I020813cb531ed58353f8340fcad58dec8d7856dd
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h index 7c06de774a..3972a98d8b 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h @@ -231,11 +231,18 @@ struct DrawSet int indexCount; }; +enum BatchCompatibility +{ + BatchBreaksOnBlending, + BatchBreaksOnCompare, + BatchIsCompatible +}; + struct Batch { Batch() : drawSets(1) {} bool geometryWasChanged(QSGGeometryNode *gn); - bool isMaterialCompatible(Element *e) const; + BatchCompatibility isMaterialCompatible(Element *e) const; void invalidate(); void cleanupRemovedElements(); |