Class ExternalTexture
- java.lang.Object
-
- com.google.ar.sceneform.rendering.ExternalTexture
-
public class ExternalTexture extends java.lang.Object
Creates an AndroidSurfaceTexture
andSurface
that can be displayed by Sceneform. Useful for displaying video, or anything else that can be drawn to aSurfaceTexture
.The getFilamentEngine OpenGL ES texture is automatically created by Sceneform. Also,
SurfaceTexture.updateTexImage()
is automatically called and should not be called manually.Call
Material.setExternalTexture(String, ExternalTexture)
to use an ExternalTexture. The material parameter MUST be of type 'samplerExternal'.
-
-
Constructor Summary
Constructors Constructor Description ExternalTexture()
Creates an ExternalTexture with a new AndroidSurfaceTexture
andSurface
.ExternalTexture(int textureId, int width, int height)
Creates an ExternalTexture from an OpenGL ES textureId without a SurfaceTexture.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.android.filament.Stream
getFilamentStream()
com.google.android.filament.Texture
getFilamentTexture()
android.view.Surface
getSurface()
Gets the surface created for this ExternalTexture that draws togetSurfaceTexture()
android.graphics.SurfaceTexture
getSurfaceTexture()
Gets the surface texture created for this ExternalTexture.
-
-
-
Constructor Detail
-
ExternalTexture
public ExternalTexture()
Creates an ExternalTexture with a new AndroidSurfaceTexture
andSurface
.
-
ExternalTexture
public ExternalTexture(int textureId, int width, int height)
Creates an ExternalTexture from an OpenGL ES textureId without a SurfaceTexture. For internal use only.
-
-
Method Detail
-
getSurfaceTexture
public android.graphics.SurfaceTexture getSurfaceTexture()
Gets the surface texture created for this ExternalTexture.
-
getSurface
public android.view.Surface getSurface()
Gets the surface created for this ExternalTexture that draws togetSurfaceTexture()
-
getFilamentTexture
public com.google.android.filament.Texture getFilamentTexture()
-
getFilamentStream
public com.google.android.filament.Stream getFilamentStream()
-
-