私は GLKView で GLKViewController を使用しています。ios5 では正常に動作し、io6 の更新後に glReadPixels が動作を停止し、黒いピクセルのみが返されます。
preserveBackBuffer について何か読みましたが、まだ成功していません
私のGLKViewのセットアップ:
_context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
if (!_context) {
DLog(@"Failed to create ES context");
}
GLKView *view = (GLKView *)self.view;
view.context = _context;
解決への道のりは?(私はここでそれを試みますが、まだ動作しません)
CAEAGLLayer * eaglLayer = (CAEAGLLayer*) view.layer;
eaglLayer.drawableProperties = @{kEAGLDrawablePropertyRetainedBacking : @(YES)};
シェーダー処理後にカメラを記録するために glReadPixels を使用しています
- (void)captureOutput:(AVCaptureOutput *)captureOutput
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
fromConnection:(AVCaptureConnection *)connection
すべてのヘルプが受け入れられます, ありがとう,