For fullscreen snap shots, you can use GLKView's snapshot method:
http://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKView_ClassReference/Reference/Reference.html#//apple_ref/occ/instm/GLKView/snapshot
UIImage *snapShotImage = [(GLKView *)Sparrow.currentController.view snapshot];
If you want to screenshot a specific area, you can splice the SPImage created from GLKView's snapshot.
You could also use one of a few libraries floating around this forum that can screenshot a specific display object, such as mine: http://wiki.sparrow-framework.org/users/shilo/extensions/spdisplayobject_image2
(the above extension is not perfect)
If you want to create your own class for this job, here is a sample code:
glReadPixels(0, (Sparrow.stage.height*contentScaleFactor)-height, width, height, GL_RGBA, GL_UNSIGNED_BYTE, &buffer);
CGDataProviderRef dataProviderRef = CGDataProviderCreateWithData(NULL, &buffer, bufferLength, NULL);
CGImageRef imageRef = CGImageCreate(width, height, 8, 32, width*4, CGColorSpaceCreateDeviceRGB(), kCGBitmapByteOrderDefault, dataProviderRef, NULL, true, kCGRenderingIntentDefault);
if (!fullSize) {
width /= contentScaleFactor;
height /= contentScaleFactor;
}
uint32_t *pixels = (uint32_t *)malloc(bufferLength);
CGContextRef context = CGBitmapContextCreate(pixels, width, height, 8, width*4, CGImageGetColorSpace(imageRef), kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Big);
CGContextTranslateCTM(context, 0, height);
CGContextScaleCTM(context, 1.0, -1.0);
CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef);
CGImageRelease(imageRef);
imageRef = CGBitmapContextCreateImage(context);
UIImage *image = [UIImage imageWithCGImage:imageRef];
CGContextRelease(context);
free(pixels);
CGImageRelease(imageRef);
CGDataProviderRelease(dataProviderRef);
I believe you need to read the pixels right after the first (or next) render call, which could be why you are getting a black screen.