I am currently trying to create a renderer that uses opengl ES 2.0 to draw various primitives and textures. I have created a class that subclasses AndroidGameView, I am creating an instance of that view in my main activity and adding it to the layout. I have been successful in rendering graphics into the game view.
The problem occurs when I attempt to move to a new activity and back. Upon restarting the original activity and creating a new instance of my AndroidGameView subclass (Run() is called in the constructor), the AndroidGameView run loop does not appear to restart as evidenced by OnRenderFrame never getting called again. The surface is created on restart because I do get a call to SurfaceCreated, but OnRenderFrame is never called again. All examples I have seen for AndroidGameView implementation have started the run loop once and depended on the application exiting to end the loop so I am not sure if I can do what I am trying to do. Is it possible to restart the run loop successfully without exiting the application? It seems like this should be possible since, with Android, you cannot rely on the OS not killing your view when it is stopped or paused. Just wondering if this could be the result of a bug in AndroidGameView or if I am just using it incorrectly. Thanks -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Cannot-stop-and-restart-AndroidGameView-run-loop-successfully-tp4648812p4648812.html Sent from the Mono for Android mailing list archive at Nabble.com. _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid