다음을 통해 공유


GLSurfaceView.PreserveEGLContextOnPause Property

Definition

Control whether the EGL context is preserved when the GLSurfaceView is paused and resumed.

public virtual bool PreserveEGLContextOnPause { [Android.Runtime.Register("getPreserveEGLContextOnPause", "()Z", "GetGetPreserveEGLContextOnPauseHandler")] get; [Android.Runtime.Register("setPreserveEGLContextOnPause", "(Z)V", "GetSetPreserveEGLContextOnPause_ZHandler")] set; }
[<get: Android.Runtime.Register("getPreserveEGLContextOnPause", "()Z", "GetGetPreserveEGLContextOnPauseHandler")>]
[<set: Android.Runtime.Register("setPreserveEGLContextOnPause", "(Z)V", "GetSetPreserveEGLContextOnPause_ZHandler")>]
member this.PreserveEGLContextOnPause : bool with get, set

Property Value

true if the EGL context will be preserved when paused

Attributes

Remarks

Property getter documentation:

Java documentation for android.opengl.GLSurfaceView.getPreserveEGLContextOnPause().

Property setter documentation:

Control whether the EGL context is preserved when the GLSurfaceView is paused and resumed.

If set to true, then the EGL context may be preserved when the GLSurfaceView is paused.

Prior to API level 11, whether the EGL context is actually preserved or not depends upon whether the Android device can support an arbitrary number of EGL contexts or not. Devices that can only support a limited number of EGL contexts must release the EGL context in order to allow multiple applications to share the GPU.

If set to false, the EGL context will be released when the GLSurfaceView is paused, and recreated when the GLSurfaceView is resumed.

The default is false.

Java documentation for android.opengl.GLSurfaceView.setPreserveEGLContextOnPause(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to