Back to Filament

setExternalStream

docs/android/dokka/filament-android/com.google.android.filament/-texture/set-external-stream.md

1.75.01.5 KB
Original Source

//filament-android/com.google.android.filament/Texture/setExternalStream

setExternalStream

[main]
open fun setExternalStream(engine: Engine, stream: Stream)

Specifies the external stream 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:

  • only the level of detail (LOD) 0 can be specified
  • only NEAREST or LINEAR filtering is supported
  • the size and format of the texture is defined by the external image

Parameters

main

engineEngine this texture is associated to. Must be the instance passed to Builder.build().
streamA Stream object

See also

Stream
Texture.Builder

Throws

IllegalStateExceptionif the sampler type is not SAMPLER_EXTERNAL