void YourLayer::visit()
{
glEnable(GL_SCISSOR_TEST);
float floatScale = CC_CONTENT_SCALE_FACTOR();
glScissor(x * floatScale,y * floatScale,width * floatScale,height * floatScale);
CCLayer::visit();
glDisable(GL_SCISSOR_TEST);
}
{
glEnable(GL_SCISSOR_TEST);
float floatScale = CC_CONTENT_SCALE_FACTOR();
glScissor(x * floatScale,y * floatScale,width * floatScale,height * floatScale);
CCLayer::visit();
glDisable(GL_SCISSOR_TEST);
}