Can we use Android SurfaceTexture as the input for on-screen rendering?
Hello, filament supports on-screen rendering and off-screen rendering now. When we used on-screen rendering, we can use a NativeWindow as the input to createSwapChain, or we can use off-screen rendering without any real windows.
problem
The problem is that when we use rendering, we can't get the texture from filament directly. Therefore, we need readPixels from filament, and then, load pixel buffer to gpu texture, which takes a lot of time.
idea
Okey, I have a idea about on-screen rendering, I want to do some optimization. Can we use android SurfaceTexture as the input for on-screen rendering? If so, I can get the rendered texture just from SurfaceTexture outside directly.
OS and backend
os: android platform, backend: opengl.
You can use the SurfaceTexture as a Filament texture to render it on screen. You could also get the SurfaceTexture from a TextureView and render into + send it to the video encoder. You could also use a virtual display.
You can use the SurfaceTexture as a Filament texture to render it on screen. You could also get the SurfaceTexture from a TextureView and render into + send it to the video encoder. You could also use a virtual display.
Is there any samples about surfacetexture input? I've tried it half year ago, but unfortunately, I failed.
You can use the SurfaceTexture as a Filament texture to render it on screen. You could also get the SurfaceTexture from a TextureView and render into + send it to the video encoder. You could also use a virtual display.
I wanna use surfacetexture instead of any real window, because it is well separated from the upper UI layer.