ImageTextureLayered
Base class for texture types which contain the data of multiple ImageTexture
s. Each image is of the same size and format.
class ImageTextureLayered
Base class for Texture2DArray
, Cubemap
and CubemapArray
. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also Texture3D
.
Superclasses
class TextureLayered
Base class for texture types which contain the data of multiple
Image
s. Each image is of the same size and format.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
func createFromImages(ObjectCollection<Image>
) -> GodotError Creates an
ImageTextureLayered
from an array ofImage
s. Seecreate(width:height:useMipmaps:format:)
for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images must have the same width, height, image format and mipmapping setting.func updateLayer(image: Image?, layer: Int32
) Replaces the existing
Image
data at the givenlayer
with this new image.
Subclasses
class Cubemap
Six square textures representing the faces of a cube. Commonly used as a skybox.
class CubemapArray
An array of
Cubemap
s, stored together and with a single reference.class Texture2DArray
A single texture resource which consists of multiple, separate images. Each image has the same dimensions and number of mipmap levels.