set EGLContext Client Version
Informs 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:
class MyView(context: Context) : GLTextureView(context) {
...
init {
setEGLContextClientVersion(2)
setRenderer(MyRenderer())
}
}
Content copied to clipboard
Note: Activities which require OpenGL ES 2.0 should indicate this by setting uses-feature android:glEsVersion="0x00020000"
in the activity's AndroidManifest.xml file.
If this method is called, it must be called before setRenderer is called.
This method only affects the behavior of the default EGLContextFactory and the default EGLConfigChooser. If setEGLContextFactory has been called, then the supplied EGLConfigChooser is responsible for choosing an OpenGL ES 2.0-compatible config.
Parameters
version
The EGLContext client version to choose. Use 2 for OpenGL ES 2.0