CCLayer的部分显示

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);
}

你可能感兴趣的:(显示)