Josh
Josh

Reputation: 13

Does GLSurfaceView.onPause() destroy the context?

I'm using GLSurfaceView.onPause() to manage resources (i.e. stop the rendering thread to allow a more responsive view to be presented). It appears to be require the surface to be re-created but I haven't seen this detailed in the documentation.

Can someone confirm that this is the case?

Cheers, Josh

Upvotes: 1

Views: 3055

Answers (2)

Renard
Renard

Reputation: 6929

Yes that is the case. But if you want to improve the responsiveness of another view or dialog for a limited amount of time you have some other options.

Upvotes: 4

Bharat Sharma
Bharat Sharma

Reputation: 3966

yes it will be recreated on pause because glView extends SurfaceView and SurfaceView always recreates when activity goes on pause.

Upvotes: 0

Related Questions