Note: As of July 10, 2024, watch faces must use the Watch Face Format in order to be installed on new watches that launch with Wear OS 5 pre-installed. Learn more about the user-facing changes in this Help Center article.

Additionally, starting in early 2025 (specific date to be announced during Q4 2024), all new watch faces published on Google Play must use the Watch Face Format.

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.