Quote:
Originally Posted by Johanovski
I'm wondering if it's possible to take a screen image and then use it in OpenGL.
|
I use something like this to capture the EAGLview screenshot and stuff it into a texture:
UIGraphicsBeginImageContext(myView.bounds.size);
[myView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Texture2D *tex = [[Texture2D alloc] initWithImage:viewImage];
--yarri