class GlesTextureComplication


Helper for rendering a ComplicationSlot to a GLES20 texture. To use call renderToTexture and then bind before drawing.

Summary

Public constructors

GlesTextureComplication(
    complicationSlot: ComplicationSlot,
    textureWidth: @Px Int,
    textureHeight: @Px Int,
    textureType: Int
)

Public functions

Unit

Bind the texture to the active texture target.

Unit
renderToTexture(
    zonedDateTime: ZonedDateTime,
    renderParameters: RenderParameters
)

Renders complicationSlot to an OpenGL texture.

Public properties

ComplicationSlot

The ComplicationSlot to render to texture.

Public constructors

GlesTextureComplication

Added in 1.0.0
GlesTextureComplication(
    complicationSlot: ComplicationSlot,
    textureWidth: @Px Int,
    textureHeight: @Px Int,
    textureType: Int
)
Parameters
complicationSlot: ComplicationSlot

The ComplicationSlot to render to texture.

textureWidth: @Px Int

The width of the texture in pixels to create.

textureHeight: @Px Int

The height of the texture in pixels to create.

textureType: Int

The texture type, e.g. GLES20.GL_TEXTURE_2D.

Public functions

bind

Added in 1.0.0
fun bind(): Unit

Bind the texture to the active texture target.

renderToTexture

Added in 1.0.0
fun renderToTexture(
    zonedDateTime: ZonedDateTime,
    renderParameters: RenderParameters
): Unit

Renders complicationSlot to an OpenGL texture.

Public properties

complicationSlot

Added in 1.0.0
val complicationSlotComplicationSlot

The ComplicationSlot to render to texture.