OpenGlRenderer

OpenGLRenderer renders texture image to the output surface.

OpenGLRenderer's methods must run on the same thread, so called GL thread. The GL thread is locked as the thread running the .init method, otherwise an IllegalStateException will be thrown when other methods are called.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected var mCurrentSurface: Surface?
Link copied to clipboard
protected var mEglConfig: EGLConfig?
Link copied to clipboard
protected var mEglContext: EGLContext
Link copied to clipboard
protected var mEglDisplay: EGLDisplay
Link copied to clipboard
protected var mGlThread: Thread?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected var mSurfaceAttrib: IntArray
Link copied to clipboard
protected var mTempSurface: EGLSurface
Link copied to clipboard

Functions

Link copied to clipboard
protected fun createOutputSurfaceInternal(surface: Surface, viewportRect: Rect): OutputSurface?
Link copied to clipboard
protected fun getOutSurfaceOrThrow(surface: Surface): OutputSurface
Link copied to clipboard

Initializes the OpenGLRenderer

Link copied to clipboard
protected fun makeCurrent(eglSurface: EGLSurface)
Link copied to clipboard

Register the output surface.

Link copied to clipboard
fun release()

Releases the OpenGLRenderer

Link copied to clipboard
protected fun removeOutputSurfaceInternal(surface: Surface, unregister: Boolean)
Link copied to clipboard
fun render(timestampNs: Long, textureTransform: FloatArray, surface: Surface, viewportRect: Rect)

Renders the texture image to the output surface.

Link copied to clipboard

Sets the input format.

Link copied to clipboard

Unregister the output surface.

Link copied to clipboard
protected fun useAndConfigureProgramWithTexture(textureId: Int)