# ETC1Util.ETC1Texture

Added in[API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# ETC1Texture

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/opengl/ETC1Util.ETC1Texture "View this page in Java")  

```
open class ETC1Texture
```

|---|----------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                             ||
| ↳ | [android.opengl.ETC1Util.ETC1Texture](https://developer.android.com/reference/kotlin/android/opengl/ETC1Util.ETC1Texture#) |

A utility class encapsulating a compressed ETC1 texture.

## Summary

|                                                                                                                                                                                                                     Public constructors                                                                                                                                                                                                                      ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [ETC1Texture](https://developer.android.com/reference/kotlin/android/opengl/ETC1Util.ETC1Texture#ETC1Texture(kotlin.Int,%20kotlin.Int,%20java.nio.ByteBuffer))`(`width:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `height:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[ByteBuffer](https://developer.android.com/reference/kotlin/java/nio/ByteBuffer.html#)!`)` <br /> |

|                                                                                                                    Public methods                                                                                                                     ||
|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[ByteBuffer](https://developer.android.com/reference/kotlin/java/nio/ByteBuffer.html#)! | [getData](https://developer.android.com/reference/kotlin/android/opengl/ETC1Util.ETC1Texture#getData())`()` Get the compressed data of the texture.      |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)              | [getHeight](https://developer.android.com/reference/kotlin/android/opengl/ETC1Util.ETC1Texture#getHeight())`()` Get the height of the texture in pixels. |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)              | [getWidth](https://developer.android.com/reference/kotlin/android/opengl/ETC1Util.ETC1Texture#getWidth())`()` Get the width of the texture in pixels.    |

## Public constructors

### ETC1Texture

Added in[API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
ETC1Texture(
    width: Int, 
    height: Int, 
    data: ByteBuffer!)
```

## Public methods

### getData

Added in[API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getData(): ByteBuffer!
```

Get the compressed data of the texture.

|                                                   Return                                                   ||
|-----------------------------------------------------------------------------------------|-------------------|
| [ByteBuffer](https://developer.android.com/reference/kotlin/java/nio/ByteBuffer.html#)! | the texture data. |

### getHeight

Added in[API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getHeight(): Int
```

Get the height of the texture in pixels.

|                                                     Return                                                      ||
|----------------------------------------------------------------------------|-------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the width of the texture in pixels. |

### getWidth

Added in[API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getWidth(): Int
```

Get the width of the texture in pixels.

|                                                     Return                                                      ||
|----------------------------------------------------------------------------|-------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the width of the texture in pixels. |