This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(BOOL) setupFetchedResultsControllerForEntity:(NSString *)argEntityName withSortKey:(NSString *)argSortKey | |
{ | |
// Uncomment the following line to display an Edit button in the navigation bar for this view controller. | |
// self.navigationItem.rightBarButtonItem = self.editButtonItem; | |
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; | |
// Configure the request's entity, and optionally its predicate. | |
NSEntityDescription *entityDescription = [NSEntityDescription entityForName:argEntityName inManagedObjectContext:self.managedObjectContext]; | |
[fetchRequest setEntity:entityDescription]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIImage*)snapshot:(UIView*)eaglview | |
{ | |
// Get the size of the backing CAEAGLLayer | |
GLint backingWidth, backingHeight; | |
glBindRenderbufferOES(GL_RENDERBUFFER_OES, _colorRenderbuffer); | |
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); | |
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); | |
NSInteger x = 0, y = 0, width = backingWidth, height = backingHeight; | |
NSInteger dataLength = width * height * 4; |
NewerOlder