語言

GLSurfaceView.PreserveEGLContextOnPause 屬性

定義

控制當 GLSurfaceView 暫停並恢復時,EGL 上下文是否被保留。

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

屬性值

若 EGL 上下文在暫停時會被保留,則為真

屬性

備註

財產取得者文件:

Java 文件 android.opengl.GLSurfaceView.getPreserveEGLContextOnPause()。

屬性設定文件:

控制當 GLSurfaceView 暫停並恢復時,EGL 上下文是否被保留。

若設為 true,則當 GLSurfaceView 暫停時,EGL 上下文可被保留。

在 API 等級 11 之前,EGL 上下文是否被實際保留,取決於 Android 裝置是否能支援任意數量的 EGL 上下文。 只能支援有限數量 EGL 情境的裝置必須釋放 EGL 情境,以便多個應用程式共享 GPU。

若設為 false,當 GLSurfaceView 暫停時會釋放 EGL 上下文,並在 GLSurfaceView 恢復時重新建立。

預設值為 false。

Java 文件 android.opengl.GLSurfaceView.setPreserveEGLContextOnPause(boolean)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於