Hi I am trying out drawing app and have a problem when it comes to saving the image that is drawn. Right now I\'m very early in learning this but I have added code from: How
The save method should be called within the scope of the OpenGL context. To solve this you can move your method within the same rendering .m file and call this function from outside.
Also you need to consider OpenGL clear color.
(detail explanation in comments, lol)
I found that changing the CGBitmapInfo into:
CGBitmapInfo bitmapInfo = kCGImageAlphaPremultipliedLast;
Results in a transparent background.
Ah, you have to do this at the beginning.
[EAGLContext setCurrentContext:drawContext];