Drawable Renderer (#1570), Fix stencil IDs on tiles passed to renderTileClippingMasks more than once during a frame
This commit is contained in:
committed by
Bart Louwers
parent
d482de1f54
commit
bffa77f98c
@@ -149,8 +149,15 @@ void PaintParameters::renderTileClippingMasks(TIter beg, TIter end, GetTileIDFun
|
||||
for (auto i = beg; i != end; ++i) {
|
||||
const auto& tileID = f(*i);
|
||||
|
||||
const int32_t stencilID = nextStencilID++;
|
||||
tileClippingMaskIDs.emplace(tileID, stencilID);
|
||||
const int32_t stencilID = nextStencilID + 1;
|
||||
const auto result = tileClippingMaskIDs.insert(std::make_pair(tileID, stencilID));
|
||||
if (result.second) {
|
||||
// inserted
|
||||
nextStencilID++;
|
||||
} else {
|
||||
// already present
|
||||
continue;
|
||||
}
|
||||
|
||||
program->draw(context,
|
||||
*renderPass,
|
||||
|
||||
Reference in New Issue
Block a user