You don't have to use a
GLSurfaceView is a convenience class
written purely in Java. It simplifies the setup
part for applications that want to use OpenGL
rendering in Android, but all of its functionality
is also available through lower level interfaces
in the Android frameworks.
For purely offscreen rendering, you can use the
EGL interfaces to create contexts, surfaces, etc.
Somewhat confusingly, there are two versions in
completely different parts of the Android
package, available since API level 1.
EGL14 in the
android.opengl package, available
since API level 17.
They are fairly similar, but the newer
EGL14 obviously has some more
features. If you're targeting at least API level
17, I would go with the newer version.
Using the methods in the
class, you can then create contexts, surfaces,
etc. For offscreen rendering, one option is to
create a Pbuffer surface for rendering. To
complete the setup, you will typically use
The Android documentation does not really
describe these functions, but you can find the
actual documentation at the Khronos web site: https://www.khronos.org/registry/egl/sdk/docs/man/.