Interface TextureBase
- All Superinterfaces:
Resource
- All Known Implementing Classes:
Texture
,TextureArrayLayer
Base class for different types of textures.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bind()
Binds this texture.default void
destroy()
Removes this texture from the resource pool and deletes it.getArray()
int
int
getId()
getPath()
int
getWidth()
boolean
hasEqualLocation
(TextureBase other) Checks whether two textures are from the same location.boolean
void
unbind()
Unbinds this texture.
-
Method Details
-
bind
void bind()Binds this texture. -
unbind
void unbind()Unbinds this texture. -
hasEqualLocation
Checks whether two textures are from the same location.- Parameters:
other
- Other texture- Returns:
- True if
other
is equal to this texture or in the same texture array.
-
getId
int getId() -
getWidth
int getWidth()- Returns:
- The width of this texture, in pixels.
-
getHeight
int getHeight()- Returns:
- The height of this texture, in pixels.
-
getPath
String getPath() -
destroy
default void destroy()Removes this texture from the resource pool and deletes it. -
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
null
if this texture is not in a texture array.
-