Skip to content

Instantly share code, notes, and snippets.

@takatoshi
Created November 7, 2012 13:27
Show Gist options
  • Save takatoshi/4031578 to your computer and use it in GitHub Desktop.
Save takatoshi/4031578 to your computer and use it in GitHub Desktop.
- (void)visit {
float x = 0;
float y = 150;
float width = 320;
float height = 180;
glEnable(GL_SCISSOR_TEST);
if([[CCDirector sharedDirector] enableRetinaDisplay:YES]) {
glScissor(2 * x, 2 * y, 2 * width, 2 * height);
} else {
glScissor(x, y, width, height);
}
[super visit];
glDisable(GL_SCISSOR_TEST);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment