- Sceneform SDK for Android
was open sourced and archived ( github.com/google-ar/sceneform-android-sdk
) with version 1.16.0.
- This site ( developers.google.com/sceneform
) serves as the documentation archive for the previous version, Sceneform SDK for Android
1.15.0.
- Do not use version 1.17.0 of the Sceneform Maven artifacts
.
- The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.
ExternalTexture
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Methods
From class
java.lang.Object
Public Constructors
public
ExternalTexture
()
Public Methods
Gets the surface texture created for this ExternalTexture.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eExternalTexture\u003c/code\u003e enables displaying external content like videos in Sceneform by using an Android \u003ccode\u003eSurfaceTexture\u003c/code\u003e and \u003ccode\u003eSurface\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSceneform automatically manages the OpenGL ES texture and updates; manual \u003ccode\u003eupdateTexImage()\u003c/code\u003e calls are not needed.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize an \u003ccode\u003eExternalTexture\u003c/code\u003e, use \u003ccode\u003eMaterial.setExternalTexture()\u003c/code\u003e with a material parameter of type 'samplerExternal'.\u003c/p\u003e\n"],["\u003cp\u003eProvides access to the underlying \u003ccode\u003eSurface\u003c/code\u003e and \u003ccode\u003eSurfaceTexture\u003c/code\u003e through \u003ccode\u003egetSurface()\u003c/code\u003e and \u003ccode\u003egetSurfaceTexture()\u003c/code\u003e methods, respectively.\u003c/p\u003e\n"]]],["`ExternalTexture` creates a `SurfaceTexture` and `Surface` for display in Sceneform, suitable for video or other dynamic content. It automatically generates the OpenGL ES texture and handles `updateTexImage()`. To utilize it, call `setExternalTexture(String, ExternalTexture)` with a material parameter of type 'samplerExternal'. The constructor `ExternalTexture()` generates a new `SurfaceTexture` and `Surface`. Methods `getSurface()` retrieves the associated `Surface`, while `getSurfaceTexture()` retrieves the `SurfaceTexture`.\n"],null,["# ExternalTexture\n\npublic class **ExternalTexture** \nCreates an Android [SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture) and [Surface](https://developer.android.com/reference/android/view/Surface) that can be displayed by Sceneform.\nUseful for displaying video, or anything else that can be drawn to a [SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture).\n\nThe getFilamentEngine OpenGL ES texture is automatically created by Sceneform. Also, [updateTexImage()](https://developer.android.com/reference/android/graphics/SurfaceTexture#updateTexImage()) is automatically called and should not be called manually.\n\nCall [setExternalTexture(String, ExternalTexture)](/sceneform/reference/com/google/ar/sceneform/rendering/Material#setExternalTexture(java.lang.String,%20com.google.ar.sceneform.rendering.ExternalTexture)) to use an ExternalTexture.\nThe material parameter MUST be of type 'samplerExternal'. \n\n### Public Constructors\n\n|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [ExternalTexture](/sceneform/reference/com/google/ar/sceneform/rendering/ExternalTexture#ExternalTexture())() Creates an ExternalTexture with a new Android [SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture) and [Surface](https://developer.android.com/reference/android/view/Surface). |\n\n### Public Methods\n\n|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Surface](https://developer.android.com/reference/android/view/Surface) | [getSurface](/sceneform/reference/com/google/ar/sceneform/rendering/ExternalTexture#getSurface())() Gets the surface created for this ExternalTexture that draws to [getSurfaceTexture()](/sceneform/reference/com/google/ar/sceneform/rendering/ExternalTexture#getSurfaceTexture()) |\n| [SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture) | [getSurfaceTexture](/sceneform/reference/com/google/ar/sceneform/rendering/ExternalTexture#getSurfaceTexture())() Gets the surface texture created for this ExternalTexture. |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------|\n| [Object](https://developer.android.com/reference/java/lang/Object) | clone() |\n| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object) arg0) |\n| void | finalize() |\n| final [Class](https://developer.android.com/reference/java/lang/Class)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](https://developer.android.com/reference/java/lang/String) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public\n**ExternalTexture**\n()\n\nCreates an ExternalTexture with a new Android [SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture) and [Surface](https://developer.android.com/reference/android/view/Surface).\n\nPublic Methods\n--------------\n\n#### public [Surface](https://developer.android.com/reference/android/view/Surface)\n**getSurface**\n()\n\nGets the surface created for this ExternalTexture that draws to [getSurfaceTexture()](/sceneform/reference/com/google/ar/sceneform/rendering/ExternalTexture#getSurfaceTexture()) \n\n#### public [SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture)\n**getSurfaceTexture**\n()\n\nGets the surface texture created for this ExternalTexture."]]