I have a requirement where in I need to have two threads of the same process rendering to screen using openGL ES.. I am newbie in android applications and havent done much application development before. I know a bit about openGL ES and I need to test some driver code urgently.
I have two Activity of GLSurfaceView. I use setcontentview and the layout xml file for defining the layout. Each activity has its layout file separately. The size of the rendered displays are small around 10% of the screen and I have made sure that the positions of the display are non-overlapping in the 2 layouts. Initially one activity is launched which in turn launches the 2nd activity through intent mechanism in the "oncreate".
1) I tried have two activities to run at same time but i have not been successful at that. Some documentation referred that while one activity is running the other activity is possible to be in the visible state. I am not sure whether its possible to have both the activities to be visible at the same time.
2) Initially the implementation was that one activity launches the 2nd activity through intent mechanism in the "oncreate". This resulted in 2 activities running but not simultaneously. Is there a way I can have both activities running simultaneously and displaying.
3) Later for creating the second thread I used the "runnable" mechanism and created a thread and invoked the 2nd activity through the "run" of "runnable". While I could confirm that the thread was confirmed I could not see the 2nd activity running.
4) The constraint is due to the fact that I need to have separate eglCreateWindowSurface for each of the 2 rendering threads.
Are there any sample/examples where I can see how 2 activities or 2 threads are running simultaneusly while displaying to the screen?
I have gone through many tutorials and sample code and discussions to find some hint to my problem. Can someone help with some links or explanations