GLSurfaceView/Renderer Destruction

Problems with Canvas, OpenGL, etc...

GLSurfaceView/Renderer Destruction

Postby merwin2 » Thu Dec 16, 2010 5:55 am


Is there a way to tell the view or renderer to stop what it's doing and start cleaning up?

My problem is that I'm currently calling finish() in the graphics activity to go back to my initial activity that started the graphics activity. What appears to be happening is my initial activity gets the result and starts processing while the screen still shows the graphics (as I imagine it's destroying the surface and all that fun stuff).

*EDIT* I should add that there is a very large 3D object I'm drawing, hence the issues

What I would like to do is somehow say "myRenderer.cleanUp()" and then in the onSurfaceDestroy() call ((Activity) context).finish().

( I realize "cleanUp()" is a fake method" ).

Is there any way to do this? Does anyone else close down a graphics activity to go back to a calling activity? How do you do this cleanly?

Thanks in advance.

Posts: 6
Joined: Mon Apr 26, 2010 4:00 pm


Re: GLSurfaceView/Renderer Destruction

Postby PkL728 » Wed Dec 29, 2010 6:26 pm

Any other ideas for this one? I am having a similar problem. I have a GLSurfaceView activity and when I call .finish() on it to switch back to the primary activity I get a 2-3 second black screen.
Junior Developer
Junior Developer
Posts: 11
Joined: Mon Feb 22, 2010 6:33 am

Re: GLSurfaceView/Renderer Destruction

Postby pawnrob » Sat Feb 04, 2012 1:46 pm

Anyone got any advice on this?
Im suffering the same 2 - 3 sec black window and often a ANR message box to go with it :(
Once Poster
Once Poster
Posts: 1
Joined: Sat Feb 04, 2012 1:45 pm


Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 3 guests