Package ly.img.android.opengl.egl

Types

ContextFactory
Link copied to clipboard
open class ContextFactory
EGLConfigChooser
Link copied to clipboard

An interface for choosing an EGLConfig configuration from a list of potential configurations.

interface EGLConfigChooser
EGLContextFactory
Link copied to clipboard

An interface for customizing the eglCreateContext and eglDestroyContext calls.

interface EGLContextFactory
EGLContextHelper
Link copied to clipboard

An EGL helper class.

open class EGLContextHelper
GLSurfaceView
Link copied to clipboard
abstract class GLSurfaceView : StateHandlerBindable
GLThread
Link copied to clipboard

A generic GL Thread. Takes care of initializing EGL and GL. Delegates to a Renderer instance to do the actual drawing. Can be configured to render continuously or on request.

All potentially blocking synchronization is done through the glThreadManager object. This avoids multiple-lock ordering issues.

class GLThread : TerminableThread, GlThreadRunner
Renderer
Link copied to clipboard

A generic renderer interface.

The renderer is responsible for making OpenGL calls to render a frame.

GLSurfaceView clients typically create their own classes that implement this interface, and then call to register the renderer with the GLSurfaceView.

Threading The renderer will be called on a separate thread, so that rendering performance is decoupled from the UI thread. Clients typically need to communicate with the renderer from the UI thread, because that's where input events are received. Clients can communicate using any of the standard Java techniques for cross-thread communication, or they can use the { GLSurfaceView#queueEvent(Runnable) } convenience method. EGL Context Lost There are situations where the EGL rendering context will be lost. This typically happens when device wakes up after going to sleep. When the EGL context is lost, all OpenGL resources (such as textures) that are associated with that context will be automatically deleted. In order to keep rendering correctly, a renderer must recreate any lost resources that it still needs. The onSurfaceCreated method is a convenient place to do this.

interface Renderer