Share via


GLSurfaceView.SetEGLContextClientVersion(Int32) Method

Definition

Inform the default EGLContextFactory and default EGLConfigChooser which EGLContext client version to pick.

[Android.Runtime.Register("setEGLContextClientVersion", "(I)V", "GetSetEGLContextClientVersion_IHandler")]
public virtual void SetEGLContextClientVersion (int version);
[<Android.Runtime.Register("setEGLContextClientVersion", "(I)V", "GetSetEGLContextClientVersion_IHandler")>]
abstract member SetEGLContextClientVersion : int -> unit
override this.SetEGLContextClientVersion : int -> unit

Parameters

version
Int32

The EGLContext client version to choose. Use 2 for OpenGL ES 2.0

Attributes

Remarks

Inform the default EGLContextFactory and default EGLConfigChooser which EGLContext client version to pick.

Use this method to create an OpenGL ES 2.0-compatible context. Example:

public MyView(Context context) {
                    super(context);
                    setEGLContextClientVersion(2); // Pick an OpenGL ES 2.0 context.
                    setRenderer(new MyRenderer());
                }

Note: Activities which require OpenGL ES 2.0 should indicate this by setting

Java documentation for android.opengl.GLSurfaceView.setEGLContextClientVersion(int).

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