Class of android.opengl · GLSurfaceView.java · Android's reference
public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback2
GLSurfaceView ← SurfaceView ← View
A SurfaceView that a Renderer draws into with GLES, on a thread of its own (the GL thread): it makes the EGL display, context and window surface (the runtime's EGL, snx.android.opengl.Egl10, the one the app's native GLES calls see current), calls onSurfaceCreated once for each context, onSurfaceChanged at each size, then onDrawFrame and a swap for each frame, continuously or when asked. Events queued with queueEvent run on the GL thread before the next frame. onPause stops drawing and gives up the surface, and the context too unless it is kept (setPreserveEGLContextOnPause); onResume starts again, with onSurfaceCreated for a new context.
public static final int RENDERMODE_WHEN_DIRTY = 0 sourcepublic static final int RENDERMODE_CONTINUOUSLY = 1 sourcepublic static final int DEBUG_CHECK_GL_ERROR = 1 sourcepublic static final int DEBUG_LOG_GL_CALLS = 2 sourcepublic GLSurfaceView(Context context) sourcepublic GLSurfaceView(Context context, AttributeSet attrs) sourcepublic void setGLWrapper(GLWrapper glWrapper) sourcepublic void setDebugFlags(int debugFlags) sourcepublic int getDebugFlags() sourcepublic void setPreserveEGLContextOnPause(boolean preserveOnPause) sourcepublic boolean getPreserveEGLContextOnPause() sourcepublic void setRenderer(Renderer renderer) sourcepublic void setEGLContextFactory(EGLContextFactory factory) sourcepublic void setEGLWindowSurfaceFactory(EGLWindowSurfaceFactory factory) sourcepublic void setEGLConfigChooser(EGLConfigChooser configChooser) sourcepublic void setEGLConfigChooser(boolean needDepth) sourcepublic void setEGLConfigChooser(int redSize, int greenSize, int blueSize, int alphaSize, int depthSize, int stencilSize) sourcepublic void setEGLContextClientVersion(int version) sourcepublic void setRenderMode(int renderMode) sourcepublic int getRenderMode() sourcepublic void requestRender() sourcepublic void queueEvent(Runnable r) sourcepublic void onPause() sourcepublic void onResume() sourcepublic void surfaceCreated(SurfaceHolder holder) sourcepublic void surfaceDestroyed(SurfaceHolder holder) sourcepublic void surfaceChanged(SurfaceHolder holder, int format, int w, int h) sourcepublic void surfaceRedrawNeeded(SurfaceHolder holder) sourceprotected void onDetachedFromWindow() sourceMade from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.