AI-generated Key Takeaways
-
Config.TextureUpdateMode describes how ARCore updates the camera texture.
-
The default mode is BIND_TO_TEXTURE_EXTERNAL_OES, which provides the camera image through a GL_TEXTURE_EXTERNAL_OES texture.
-
EXPOSE_HARDWARE_BUFFER mode provides the camera image through a HardwareBuffer, which is accessible via Frame.getHardwareBuffer().
-
EXPOSE_HARDWARE_BUFFER mode is only available on Android API levels 27 and above.
public static final enum
Config.TextureUpdateMode
Describes how ARCore will update the camera texture. See Vulkan Rendering developer guide for more information.
The default value is BIND_TO_TEXTURE_EXTERNAL_OES. Use
Config.setTextureUpdateMode(Config.TextureUpdateMode) to set the desired mode.
Inherited Methods
Enum Values
public static final Config.TextureUpdateMode BIND_TO_TEXTURE_EXTERNAL_OES
BIND_TO_TEXTURE_EXTERNAL_OES
public static final Config.TextureUpdateMode BIND_TO_TEXTURE_EXTERNAL_OES
ARCore provides the camera image through the GL_TEXTURE_EXTERNAL_OES texture provided
to Session.setCameraTextureName(int) or Session.setCameraTextureNames(int[]).
This is the default mode.
public static final Config.TextureUpdateMode EXPOSE_HARDWARE_BUFFER
EXPOSE_HARDWARE_BUFFER
public static final Config.TextureUpdateMode EXPOSE_HARDWARE_BUFFER
ARCore provides the camera image through a HardwareBuffer. The
hardware buffer for a Frame is accessible via Frame.getHardwareBuffer(). See
documentation on Native Hardware
Buffer in the Android NDK.
The client app is responsible for binding it to a GL_TEXTURE_EXTERNAL_OES (OpenGL
ES) or VkImage (Vulkan).
When a configuration is active with EXPOSE_HARDWARE_BUFFER, texture names provided to Session.setCameraTextureName(int) and Session.setCameraTextureNames(int[]).are
ignored.
This is only available on Android API levels 27 and above. Using Session.configure(Config) to set EXPOSE_HARDWARE_BUFFER on
an incompatible device will throw UnsupportedConfigurationException.