Android.Opengl.GLSurfaceView.SetEGLContextClientVersion Method
Inform the default EGLContextFactory and default EGLConfigChooser which EGLContext client version to pick.

Syntax

[Android.Runtime.Register("setEGLContextClientVersion", "(I)V", "GetSetEGLContextClientVersion_IHandler")]
public virtual void SetEGLContextClientVersion (int version)

Parameters

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

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:

java 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 @lt;uses-feature android:glEsVersion="0x00020000" /> in the activity's AndroidManifest.xml file.

If this method is called, it must be called before GLSurfaceView.SetRenderer(.IRenderer) is called.

This method only affects the behavior of the default EGLContexFactory and the default EGLConfigChooser. If GLSurfaceView.SetEGLContextFactory(.IEGLContextFactory) has been called, then the supplied EGLContextFactory is responsible for creating an OpenGL ES 2.0-compatible context. If GLSurfaceView.SetEGLConfigChooser(.IEGLConfigChooser) has been called, then the supplied EGLConfigChooser is responsible for choosing an OpenGL ES 2.0-compatible config.

[Android Documentation]

Requirements

Namespace: Android.Opengl
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8