public final class GlesTextureComplication


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

Summary

Public constructors

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

Public methods

final void

Bind the texture to the active texture target.

final @NonNull ComplicationSlot

The ComplicationSlot to render to texture.

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

Renders complicationSlot to an OpenGL texture.

Public constructors

GlesTextureComplication

Added in 1.0.0
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
public final void bind()

Bind the texture to the active texture target.

getComplicationSlot

Added in 1.0.0
public final @NonNull ComplicationSlot getComplicationSlot()

The ComplicationSlot to render to texture.

renderToTexture

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

Renders complicationSlot to an OpenGL texture.