# 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 />

```
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/kotlin/androidx/wear/watchface/ComplicationSlot` to a GLES20 texture. To use call `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/GlesTextureComplication#renderToTexture(java.time.ZonedDateTime,androidx.wear.watchface.RenderParameters)` and then `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/GlesTextureComplication#bind()` before drawing.

use Watch Face Format instead

## Summary

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

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[bind](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/GlesTextureComplication#bind())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[renderToTexture](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/GlesTextureComplication#renderToTexture(java.time.ZonedDateTime,androidx.wear.watchface.RenderParameters))( zonedDateTime: https://developer.android.com/reference/java/time/ZonedDateTime.html, renderParameters: https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/GlesTextureComplication#complicationSlot()` **This property 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)

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

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

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

## Public functions

### 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)

```
fun [bind](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/GlesTextureComplication#bind())(): Unit
```

> [!CAUTION]
> **This function 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.

### 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)

```
fun [renderToTexture](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/GlesTextureComplication#renderToTexture(java.time.ZonedDateTime,androidx.wear.watchface.RenderParameters))(
    zonedDateTime: ZonedDateTime,
    renderParameters: RenderParameters
): Unit
```

> [!CAUTION]
> **This function 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/kotlin/androidx/wear/watchface/complications/rendering/GlesTextureComplication#complicationSlot()` to an OpenGL texture.

## Public properties

### complicationSlot

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)

```
val complicationSlot: ComplicationSlot
```

> [!CAUTION]
> **This property 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/kotlin/androidx/wear/watchface/ComplicationSlot` to render to texture.