# GlesTextureComplication

Artifact: [androidx.wear.watchface:watchface-complications-rendering](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/complications/rendering/GlesTextureComplication.kt+class:androidx.wear.watchface.complications.rendering.GlesTextureComplication) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***

<br />

```
public final class GlesTextureComplication
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Helper for rendering a `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` to a GLES20 texture. To use call `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#renderToTexture(java.time.ZonedDateTime,androidx.wear.watchface.RenderParameters)` and then `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#bind()` before drawing.

use Watch Face Format instead

## Summary

| ### Public constructors |
|---|
| `[GlesTextureComplication](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#GlesTextureComplication(androidx.wear.watchface.ComplicationSlot,kotlin.Int,kotlin.Int,kotlin.Int))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot complicationSlot, @https://developer.android.com/reference/androidx/annotation/Px int textureWidth, @https://developer.android.com/reference/androidx/annotation/Px int textureHeight, int textureType )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `final void` | `[bind](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#bind())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` | `[getComplicationSlot](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#getComplicationSlot())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final void` | `[renderToTexture](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#renderToTexture(java.time.ZonedDateTime,androidx.wear.watchface.RenderParameters))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/ZonedDateTime.html zonedDateTime, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/RenderParameters renderParameters )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### GlesTextureComplication

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public [GlesTextureComplication](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#GlesTextureComplication(androidx.wear.watchface.ComplicationSlot,kotlin.Int,kotlin.Int,kotlin.Int))(
    @NonNull ComplicationSlot complicationSlot,
    @Px int textureWidth,
    @Px int textureHeight,
    int textureType
)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot complicationSlot` | The `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` to render to texture. |
| `@https://developer.android.com/reference/androidx/annotation/Px int textureWidth` | The width of the texture in pixels to create. |
| `@https://developer.android.com/reference/androidx/annotation/Px int textureHeight` | The height of the texture in pixels to create. |
| `int textureType` | The texture type, e.g. `https://developer.android.com/reference/android/opengl/GLES20.html#GL_TEXTURE_2D`. |

## Public methods

### bind

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [bind](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#bind())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Bind the texture to the active texture target.

### getComplicationSlot

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final @NonNull ComplicationSlot [getComplicationSlot](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#getComplicationSlot())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` to render to texture.

### renderToTexture

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final void [renderToTexture](https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#renderToTexture(java.time.ZonedDateTime,androidx.wear.watchface.RenderParameters))(
    @NonNull ZonedDateTime zonedDateTime,
    @NonNull RenderParameters renderParameters
)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Renders `https://developer.android.com/reference/androidx/wear/watchface/complications/rendering/GlesTextureComplication#complicationSlot()` to an OpenGL texture.