Interface TextureAsset
- All Superinterfaces:
Asset,Destructible,TextureBase
- All Known Implementing Classes:
Texture,TextureArrayLayer
Base class for different types of texture assets.
This can be used for both simple texture and layers inside texture arrays.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voiddestroy()Removes this texture from the resource pool and deletes it.getArray()getPath()Returns the path to the file this asset was loaded from.booleanhasEqualLocation(TextureAsset other) Checks whether two textures are from the same location.booleanMethods inherited from interface dev.prozilla.pine.common.asset.image.TextureBase
bind, getHeight, getId, getWidth, setFilter, setParameter, setWrap, unbind
-
Method Details
-
hasEqualLocation
Checks whether two textures are from the same location.- Parameters:
other- Other texture- Returns:
- True if
otheris equal to this texture or in the same texture array.
-
getPath
String getPath()Description copied from interface:AssetReturns the path to the file this asset was loaded from. -
destroy
default void destroy()Removes this texture from the resource pool and deletes it.- Specified by:
destroyin interfaceAsset- Specified by:
destroyin interfaceDestructible
-
isInArray
boolean isInArray()- Returns:
- True if this texture is part of a texture array.
-
getArray
TextureArray getArray()- Returns:
- The texture array this texture is part of, or
nullif this texture is not in a texture array.
-