I'm using GLKViewController with a GLKView, on ios5 works fine, after io6 update glReadPixels stopped to work, and return only black pixels.
I read something about preserveBackBuffer, but o success yet
My setup of GLKView:
_context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
if (!_context) {
DLog(@"Failed to create ES context");
}
GLKView *view = (GLKView *)self.view;
view.context = _context;
Possible path to solution? (I try that here but still don't works)
CAEAGLLayer * eaglLayer = (CAEAGLLayer*) view.layer;
eaglLayer.drawableProperties = @{kEAGLDrawablePropertyRetainedBacking : @(YES)};
I'm using glReadPixels on to record a camera after shader proccess
- (void)captureOutput:(AVCaptureOutput *)captureOutput
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
fromConnection:(AVCaptureConnection *)connection
All help be accepted, Thanks,