
422 V Mobile Devices
OpenGL ES. OpenGL ES contexts on Android are created and managed by
EGL, the previously described interface between OpenGL ES and the underlying
windowing system. Therefore, to create an OpenCL context for interoperability,
the properties array must be initialized such that it holds the EGL context and
display.
There are two classes in the Android framework API that allow a developer
to create and manipulate graphics with the OpenGL ES API:
GLSurfaceView and
GLSurfaceView.Renderer.
GLSurfaceView. This class provides a canvas where we can draw and manipulate
objects using OpenGL ES API calls. More importantly,
GLSurfaceView manages