OesExternalTexture

open class OesExternalTexture(width: Int, height: Int) : Texture

Texture wrapper for external producers (typically Android SurfaceTexture from MediaPlayer / MediaCodec / Camera2) bound to GL_TEXTURE_EXTERNAL_OES. Storage is owned by the external producer; this class never calls glTexImage2D. Sample with the OES shader variant (samplerExternalOES) - the standard sampler2D won't bind to this target.

width and height are advisory (used by callers that need a nominal size); the actual texture dimensions follow whatever the external source produces. The internal format / type fields are unused for OES samples but kept for the Texture superclass contract.

Available on Android (GLES 2+ via the GL_OES_EGL_image_external extension). Other targets have no producer wired up and shouldn't construct this directly.

Inheritors

MediaSurfaceTexture

Constructors

Link copied to clipboard
constructor(width: Int, height: Int)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Caller opt-out for mipmap generation.

Link copied to clipboard
val height: Int
Link copied to clipboard
val target: Int
Link copied to clipboard
val width: Int

Functions

Link copied to clipboard
Link copied to clipboard
fun getTexParameter(name: Int): Int
Link copied to clipboard
Link copied to clipboard
open override fun release(dc: DrawContext)

Frees any resources associated with this instance. After this method returns the rendering resource is invalid, and any associated GL object is deleted.

Link copied to clipboard
fun setTexParameter(name: Int, param: Int)