AI-generated Key Takeaways
-
ExternalTextureenables displaying external content like videos in Sceneform by using an AndroidSurfaceTextureandSurface. -
Sceneform automatically manages the OpenGL ES texture and updates; manual
updateTexImage()calls are not needed. -
To utilize an
ExternalTexture, useMaterial.setExternalTexture()with a material parameter of type 'samplerExternal'. -
Provides access to the underlying
SurfaceandSurfaceTexturethroughgetSurface()andgetSurfaceTexture()methods, respectively.
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 getFilamentEngine 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 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.