2
左右的截图,我知道如何采取截图与UIKit中:以一个iPhone应用程序混合的UIKit和OpenGL
UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
UIGraphicsBeginImageContext(window.bounds.size);
[window.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
而且我知道如何采取截图与OpenGL的
// Some preparation to read pixels into a buffer
glReadPixels(0,0,backingWidth, backingHeight, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
// Some code to massage the raw pixel data into an image
我的应用混合了OpenGL和UIKit,因此只使用一种方法拍摄的任何截图看起来都不对。
什么是要么 一)COMPOSIT两个图像融合在一起或 b)采取的截图,可以捕捉OpenGL和UIKit中的最佳方式一起