BradLarson / GPUImage

An open source iOS framework for GPU-based image and video processing
http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework
BSD 3-Clause "New" or "Revised" License
20.23k stars 4.61k forks source link

Capture UIView to video #2436

Closed ObelixSoftware closed 7 years ago

ObelixSoftware commented 7 years ago

I render some OpenGL content to my UIView together with the camera, how can i use GPUImage to capture this to a video like recording the screen ?

zuodd commented 7 years ago

have you resolved this? i setup an OpenGL view and rendered some content (triangles lots of...), but how can i render the content to gpuimage? i don't know if the OpenGL view is conflict to the GPUimage.

ruinfire commented 7 years ago

@ObelixSoftware you can use GPUImageUIElement class. but this class is too slow for draw every frame.

BradLarson commented 7 years ago

What you'll want to do is render your OpenGL content to a texture-backed framebuffer and then take that texture and feed it into GPUImage. The CubeExample sample application does just this.

One thing you'll need to make sure of is that your OpenGL context and GPUImage's internal context are on the same sharegroup. Again, I show how to do this in the CubeExample application.