:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ExternalTexture.xml. .. _class_ExternalTexture: ExternalTexture =============== **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Texture which displays the content of an external buffer. .. rst-class:: classref-introduction-group Description ----------- 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. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------+ | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | +-------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`size` | ``Vector2(256, 256)`` | +-------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_external_texture_id`\ (\ ) |const| | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_external_buffer_id`\ (\ external_buffer_id\: :ref:`int`\ ) | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ExternalTexture_property_size: .. rst-class:: classref-property :ref:`Vector2` **size** = ``Vector2(256, 256)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_size**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_size**\ (\ ) External texture size. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ExternalTexture_method_get_external_texture_id: .. rst-class:: classref-method :ref:`int` **get_external_texture_id**\ (\ ) |const| :ref:`🔗` 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. .. rst-class:: classref-item-separator ---- .. _class_ExternalTexture_method_set_external_buffer_id: .. rst-class:: classref-method |void| **set_external_buffer_id**\ (\ external_buffer_id\: :ref:`int`\ ) :ref:`🔗` 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. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`