SurfaceQuadShaderProgramOES

OES external-texture variant of SurfaceQuadShaderProgram used when the interior texture has target = GL_TEXTURE_EXTERNAL_OES (typically a SurfaceTexture on Android driven by MediaPlayer / MediaCodec / Camera2). Identical homography surface-quad shader; only the fragment-stage sampler type changes:

  • #extension GL_OES_EGL_image_external : require at the top of the fragment source, and

  • samplerExternalOES in place of sampler2D for texSampler.

Both edits are derived from the parent's source at construction so the kernel stays the single source of truth: touch SurfaceQuadShaderProgram's shader strings and the OES variant follows automatically.

Available on Android (GLES 2+ via the GL_OES_EGL_image_external extension); other targets have no OES producer wired up.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Indicates the approximate size of the OpenGL resources referenced by this GPU program.

Functions

Link copied to clipboard
fun enablePickMode(enable: Boolean)
Link copied to clipboard
fun enableTexture(enable: Boolean)
Link copied to clipboard
fun loadColor(color: Color)
Link copied to clipboard
fun loadHomography(matrix: Matrix3)

Load the ground-to-image Matrix3 for this draw. The fragment shader applies it to each fragment's local (lon, lat) and divides by w to land in unit-square image space. Skips the upload when the matrix matches what's already on the GPU - covers the common case of static photos and paused video, where re-binding the same surface drawable on every render frame would otherwise re-upload an unchanged value.

Link copied to clipboard
Link copied to clipboard
fun loadOpacity(opacity: Float)
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