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));
|
||||
renderer->setScissorRect(pos.x,
|
||||
pos.y,
|
||||
_clippingRegion.size.width * scaleX,
|
||||
_clippingRegion.size.height * scaleY);
|
||||
GLView* glView = Director::getInstance()->getOpenGLView();
|
||||
glView->setScissorInPoints(pos.x,
|
||||
pos.y,
|
||||
_clippingRegion.size.width * scaleX,
|
||||
_clippingRegion.size.height * scaleY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue