You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How does OpenGLView render the image of two USB cameras? I have instantiated two CameraRender in MainRender, but only one has a screen and the other is black. I don't know how to render the texId of the first CameraRender in the second CameraRender. Can you provide some guidance?
The text was updated successfully, but these errors were encountered:
I'm not sure about your needs. How do you expect the preview?
50% screen for each camera?
First camera 100% screen and the second over the first camera with a lower size?
The main problem is that MainRender is designed to support only one input and multiple output but you can use a filter to provide a second input and modify the result as you need.
For example you can use SurfaceFilterRender that allow an input and then mix both input (MainRender and SurfaceFilterRender into an input).
Currently SurfaceFilterRender is designed to do this:
First camera 100% screen and the second over the first camera with a lower size
But you can modify the fragment shader to do it as you want.
Thank you for your reply.
The effect I want is the first method, where each camera occupies half of the screen. The second method is also the effect I want, which has been provided to the third camera for use.
The method I am currently using:
The first CameraRender draw method GLES20.viewPort (0,0, width/2, height);
The second CameraRender draw method GLES20.viewPort (width/2,0, width/2, height);
However, it is not yet clear how to make the texId of the first CameraRender effective in the second one.
How does OpenGLView render the image of two USB cameras? I have instantiated two CameraRender in MainRender, but only one has a screen and the other is black. I don't know how to render the texId of the first CameraRender in the second CameraRender. Can you provide some guidance?
The text was updated successfully, but these errors were encountered: