ExternalTexture
Inherits: Texture2D < Texture < Resource < RefCounted < Object
Description
Section titled “Description”Texture which displays the content of an external buffer.
Displays the content of an external buffer provided by the platform.
Requires the OES_EGL_image_external extension (OpenGL) or VK_ANDROID_external_memory_android_hardware_buffer extension (Vulkan).
Note: This is currently only supported in Android builds.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| bool | resource_local_to_scene |
false (overrides Resource) |
| Vector2 | size |
Vector2(256, 256) |
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| int | get_external_texture_id() const |
| void | set_external_buffer_id(external_buffer_id: int) |
Property descriptions
Section titled “Property descriptions”size
Vector2 size = Vector2(256, 256)
External texture size.
Method descriptions
Section titled “Method descriptions”get_external_texture_id
int get_external_texture_id() const
Returns the external texture ID.
Depending on your use case, you may need to pass this to platform APIs, for example, when creating an android.graphics.SurfaceTexture on Android.
set_external_buffer_id
void set_external_buffer_id(external_buffer_id: int)
Sets the external buffer ID.
Depending on your use case, you may need to call this with data received from a platform API, for example, SurfaceTexture.getHardwareBuffer() on Android.
