docs/android/dokka/filament-android/com.google.android.filament/-texture/set-external-image.md
//filament-android/com.google.android.filament/Texture/setExternalImage
[main]
open fun setExternalImage(engine: Engine, eglImage: Long)
Specifies the external image to associate with this Texture.
This Texture instance must use SAMPLER_EXTERNAL.
Typically the external image is OS specific, and can be a video or camera frame. There are many restrictions when using an external image as a texture, such as:
main
| engine | Engine this texture is associated to. Must be the instance passed to Builder.build(). |
| eglImage | An opaque handle to a platform specific image. Supported types are eglImageOES on Android and CVPixelBufferRef on iOS. |
| On iOS the following pixel formats are supported: |
`kCVPixelFormatType_32BGRA` - `kCVPixelFormatType_420YpCbCr8BiPlanarFullRange` |
| Texture.Builder |
[main]
open fun setExternalImage(engine: Engine, externalImageRef: Any)
Specifies the external image to associate with this Texture.
Typically, the external image is OS specific, and can be a video or camera frame. There are many restrictions when using an external image as a texture, such as:
main
| engine | Engine this texture is associated to. Must be the instance passed to Builder.build(). |
| externalImageRef | An OS specific Object. On Android it must be a android.hardware.HardwareBuffer |