Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
ImageTextureLayered¶
继承: TextureLayered < Texture < Resource < RefCounted < Object
派生: Cubemap, CubemapArray, Texture2DArray
纹理类型的基类,包含多个 ImageTexture 的数据。各个图像具有相同的大小和格式。
描述¶
Texture2DArray、Cubemap 和 CubemapArray 的基类。不能直接使用,但包含了访问派生资源类型所需的所有函数。另请参阅 Texture3D。
方法¶
create_from_images ( Image[] images ) |
|
void |
update_layer ( Image image, int layer ) |
方法说明¶
Error create_from_images ( Image[] images )
从一组 Image 创建一个 ImageTextureLayered。有关预期的数据格式,请参阅 Image.create。第一张图像决定宽度、高度、图像格式和 mipmapping 设置。其他图像必须具有相同的宽度、高度、图像格式和 mipmapping 设置。
每个 Image 代表一个 layer
。
void update_layer ( Image image, int layer )
用这个新图像替换给定 layer
的现有 Image 数据。
给定的 Image 必须与其余引用的图像具有相同的宽度、高度、图像格式、和多级渐远纹理标志。
如果图像格式不受支持,它将被解压缩并转换为一个相似且受支持的 Format。
更新是即时的:它与绘制同步。