GlesTextureComplication


public final class GlesTextureComplication


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

use Watch Face Format instead

Summary

Public constructors

GlesTextureComplication(
    @NonNull ComplicationSlot complicationSlot,
    @Px int textureWidth,
    @Px int textureHeight,
    int textureType
)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public methods

final void

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final @NonNull ComplicationSlot

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

final void
renderToTexture(
    @NonNull ZonedDateTime zonedDateTime,
    @NonNull RenderParameters renderParameters
)

This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public constructors

GlesTextureComplication

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public GlesTextureComplication(
    @NonNull ComplicationSlot complicationSlot,
    @Px int textureWidth,
    @Px int textureHeight,
    int textureType
)
Parameters
@NonNull ComplicationSlot complicationSlot

The ComplicationSlot to render to texture.

@Px int textureWidth

The width of the texture in pixels to create.

@Px int textureHeight

The height of the texture in pixels to create.

int textureType

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

Public methods

bind

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void bind()

Bind the texture to the active texture target.

getComplicationSlot

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final @NonNull ComplicationSlot getComplicationSlot()

The ComplicationSlot to render to texture.

renderToTexture

Added in 1.0.0
Deprecated in 1.3.0-alpha06
public final void renderToTexture(
    @NonNull ZonedDateTime zonedDateTime,
    @NonNull RenderParameters renderParameters
)

Renders complicationSlot to an OpenGL texture.