Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GLPaint Save Function (Save current screen with background image)

Tags:

ios5

opengl-es

Currently i am working with a drawing application based on GLpaint. Saving the current screen becomes a hectic pain for me . I have a ViewController, On the top of the view controller i have loaded my UIIMageView and UIView (PaintingView). Now its seems like i am drawing on the top of the UIImageView.

I have managed to get my current drawing with this question GLPaint save image. When i try to capture my current drawing i get my drawing but with a black screen . What i desired is my drawing with the background image (UIImageView) . Should i overlay the UIView with UIImageView ?

like image 950
BigAppleBump Avatar asked Nov 05 '22 03:11

BigAppleBump


1 Answers

You should load your image by using OpenGL, not UIKit (as UIImageView). Otherwise, you only will be able to capture the OpenGLView as an individual image, as well as the UIKit View as a different image.

To do this, you have to render your image in a Texture in the PaintingView class provided in GLpaint example and then load it by drawing a quad over your drawing view.

like image 89
Oriol Avatar answered Jan 01 '23 20:01

Oriol