Class ExternalTexture


  • public class ExternalTexture
    extends java.lang.Object
    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, 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 Android SurfaceTexture and Surface.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      android.view.Surface getSurface()
      Gets the surface created for this ExternalTexture that draws to getSurfaceTexture()
      android.graphics.SurfaceTexture getSurfaceTexture()
      Gets the surface texture created for this ExternalTexture.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExternalTexture

        public ExternalTexture()
        Creates an ExternalTexture with a new Android SurfaceTexture and Surface.
    • 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 to getSurfaceTexture()