Record frames displayed on TextureView to mp4

后端 未结 1 1689
醉梦人生
醉梦人生 2021-01-15 17:32

I managed to write a demo displaying a 3D model on TextureView and the model can move according to the sensors of the phone. The 3D engine is wrote by C++ and what I need to

相关标签:
1条回答
  • 2021-01-15 18:02

    Grafika's "record GL app" has three different modes of operation:

    1. Draw everything twice.
    2. Render to an offscreen pbuffer, then blit that twice.
    3. Draw once, then copy between framebuffers (requires GLES 3).

    If you can configure the EGL surface that is rendered to, approaches 2 and 3 will work. For approach #3, bear in mind that the pixels don't go to the Surface (that's the Android Surface, not the EGL surface) until you call eglSwapBuffers().

    If the engine code is managing the EGL surface and calling eglSwapBuffers() for you, then things are a bit more annoying. The SurfaceTexture attach/detach calls will let you access the GLES texture with the output from a different EGL context, but the render thread needs that when rendering the View UI. I'm not entirely sure how that's going to work out.

    0 讨论(0)
提交回复
热议问题