ExternalTexture

public class ExternalTexture

Creates an Android SurfaceTexture and Surface that can be displayed by Sceneform. Useful for displaying video, or anything else that can be drawn to a SurfaceTexture.

The underlying OpenGL ES texture is automatically created by Sceneform. Also, updateTexImage() is automatically called and should not be called manually.

Call setExternalTexture(String, ExternalTexture) to use an ExternalTexture. The material parameter MUST be of type 'samplerExternal'.

Public Constructors

ExternalTexture()
Creates an ExternalTexture with a new Android SurfaceTexture and Surface.

Public Methods

Surface
getSurface()
Gets the surface created for this ExternalTexture that draws to getSurfaceTexture()
SurfaceTexture
getSurfaceTexture()
Gets the surface texture created for this ExternalTexture.

Inherited Methods

Public Constructors

public ExternalTexture ()

Creates an ExternalTexture with a new Android SurfaceTexture and Surface.

Public Methods

public Surface getSurface ()

Gets the surface created for this ExternalTexture that draws to getSurfaceTexture()

public SurfaceTexture getSurfaceTexture ()

Gets the surface texture created for this ExternalTexture.

Send feedback about...