mirror of https://github.com/axmolengine/axmol.git
Merge pull request #19721 from Mee-gu/feature/ClippingNode
fix scissor rectangle setting
This commit is contained in:
commit
65fda3df81
|
@ -76,10 +76,11 @@ void ClippingRectangleNode::onBeforeVisitScissor()
|
||||||
}
|
}
|
||||||
|
|
||||||
const Point pos = convertToWorldSpace(Point(_clippingRegion.origin.x, _clippingRegion.origin.y));
|
const Point pos = convertToWorldSpace(Point(_clippingRegion.origin.x, _clippingRegion.origin.y));
|
||||||
renderer->setScissorRect(pos.x,
|
GLView* glView = Director::getInstance()->getOpenGLView();
|
||||||
pos.y,
|
glView->setScissorInPoints(pos.x,
|
||||||
_clippingRegion.size.width * scaleX,
|
pos.y,
|
||||||
_clippingRegion.size.height * scaleY);
|
_clippingRegion.size.width * scaleX,
|
||||||
|
_clippingRegion.size.height * scaleY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue