GLTexture View
View to draw using OpenGL on a TextureView. This can be used as a replacement of GLSurfaceView in situations where advanced view composition is required such as when drawing with view transparency or animating certain view properties (such as alpha transparency channel).
Parameters
Android context.
XML layout attributes.
style to be used.
Types
An interface for choosing an EGLConfig configuration from a list of potential configurations.
An interface for customizing the eglCreateContext and eglDestroyContext calls.
An interface to customize the eglCreateWindowSurface and eglDestroySurface calls.
Properties
Gets or sets current debug flags. The value is constructed by OR-together zero or more of the DEBUG_CHECK_* constants. The debug flags take effect whenever a surface is created. The default value is zero.
Controls whether the EGL context is preserved when the GLTextureView is paused and resumed.
Gets or sets the rendering mode. When renderMode is RENDER_MODE_CONTINUOUSLY, the renderer is called repeatedly to re-render the scene. When renderMode is RENDER_MODE_WHEN_DIRTY, the renderer only renders when the surface is created, or when requestRender is called. Defaults to RENDER_MODE_CONTINUOUSLY.
Functions
Informs the view that the activity has resumed. The owner of this view must call this method when the activity is resumed. Calling this method will recreate the OpenGL scene and resume the rendering thread. Calling this method before a renderer is set has no effect.
Queues a runnable to be run on the GL rendering thread. This can be used to communicate with the renderer on the rendering thread. Calling this method before a renderer is set has no effect.
Requests tha the renderer renders a frame. This method is typically used when the render mode has ben set to RENDER_MODE_WHEN_DIRTY, so that frames are only rendered on demand. May be called from any thread. Calling it before a renderer has been set has no effect.
Installs a custom EGLConfigChooser. If this method is called, it must be called before setRenderer is called.
Installs a config chooser which will choose a config as close to 16-bit RGB as possible, with or without an optional depth buffer as close to 16-bits as possible.
Installs a config chooser which will choose a config with at least the specified depthSize and stencilSize, and exactly the specified redSize, greenSize, blueSize and alphaSize.
Informs the default EGLContextFactory and default EGLConfigChooser which EGLContext client version to pick.
Installs a custom EGLContextFactory. If this method is called, it must be called before setRenderer is called.
Installs a custom EGLWindowSurfaceFactory. If this method is called, it must be called before setRenderer is called.
Sets the glWrapper. If the glWrapper is not null, its GLWrapper.wrap method is called whenever a surface is created. A GLWrapper can be used to wrap the GL object that's passed to the renderer. Wrapping a GL object enables examining and modifying the behavior of the GL calls made by the renderer.
Sets the renderer associated with this view. Also starts the thread that will call the renderer, which in turn causes the rendering to start.