# EGLImageKHR

Artifact: [androidx.graphics:graphics-core](https://developer.android.com/jetpack/androidx/releases/graphics) [View Source](https://cs.android.com/search?q=file:androidx/opengl/EGLImageKHR.kt+class:androidx.opengl.EGLImageKHR) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/graphics#1.0.0)

*** ** * ** ***


```
public final class EGLImageKHR implements EGLHandle
```

<br />

*** ** * ** ***

EGLImageKHR is an object which can be used to create EGLImage target resources (inside client APIs). This is similar to EGL's EGLImage API except the KHR suffix indicates it is generated as part of the extension APIs namely through `https://developer.android.com/reference/androidx/opengl/EGLExt#eglCreateImageFromHardwareBuffer(android.opengl.EGLDisplay,android.hardware.HardwareBuffer)`

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/opengl/EGLImageKHR#EGLImageKHR(kotlin.Long)(long nativeHandle)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/opengl/EGLImageKHR#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `long` | `https://developer.android.com/reference/androidx/opengl/EGLImageKHR#getNativeHandle()()` Returns the native handle of the wrapped EGL object. |
| `int` | `https://developer.android.com/reference/androidx/opengl/EGLImageKHR#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/opengl/EGLImageKHR#toString()()` |

## Public constructors

### EGLImageKHR

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/graphics#1.0.0)

```
public EGLImageKHR(long nativeHandle)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getNativeHandle

```
public long getNativeHandle()
```

Returns the native handle of the wrapped EGL object. This handle can be cast to the corresponding native type on the native side.

For example, EGLDisplay dpy = (EGLDisplay)handle;

| Returns |
|---|---|
| `long` | the native handle of the wrapped EGL object. |

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```