I am building a VR application for VR glasses. Basically, I want to split the screen in two, and have two GLSurfaceViews (one in each side) showing the same in each one of them.
While investigating a bit, I read in some posts that it is not possible to have more than one GLSurfaceViews in one activity (For example: How can I use Multiple GLSurfaceView components in the same Layout?), but I also read (in that same question) that it is indeed possible, so I didn't get a clear picture.
Anyway, I tried to do it by myself. So, in my code, if I just create one instance of GLSurfaceView, everything works fine. However, if I create 2 instances of a GLSurfaceView, I realised that the renderer is created only once (I don't know why). Thus, since I actually want to draw the same in both surfaces I thought I could just use the same renderer for both surfaceViews. I basically tried to use the first created renderer and use setRenderer() method in the second instance of GLSurfaceView, but this would crash my app.
So, can someone help me to implement two GLSurfaceViews showing the same in the same acitvity (in case this is possible)?