public interface WWTexture
BufferedImage
.
The interface contains a method, isTextureInitializationFailed()
to determine whether the instance failed to
convert an image source to a texture. If such a failure occurs, the method returns true and no further attempts are
made to create the texture.Modifier and Type | Method and Description |
---|---|
void |
applyInternalTransform(DrawContext dc)
Applies any necessary transformations to the texture prior to its being rendered.
|
boolean |
bind(DrawContext dc)
Makes this texture the current texture for rendering.
|
int |
getHeight(DrawContext dc)
Returns the texture's height
|
java.lang.Object |
getImageSource()
Returns the texture's image source.
|
TextureCoords |
getTexCoords()
Returns the texture's texture coordinates, which may be other than [0,0],[1,1] if the texture size is not a power
of two or the texture must be flipped when rendered.
|
int |
getWidth(DrawContext dc)
Returns the texture's width.
|
boolean |
isTextureCurrent(DrawContext dc)
Indicates whether the texture is currently available for use without regenerating it from its image source.
|
boolean |
isTextureInitializationFailed()
Indicates whether an attempt to initialize the texture failed, which occurs when the image source is a
non-existent image file or for other reasons specific to the image source.
|
void applyInternalTransform(DrawContext dc)
dc
- the current draw context.java.lang.IllegalArgumentException
- if the draw context is null.boolean bind(DrawContext dc)
dc
- the current draw context.int getHeight(DrawContext dc)
dc
- the current draw contextjava.lang.Object getImageSource()
TextureCoords getTexCoords()
int getWidth(DrawContext dc)
dc
- the current draw contextboolean isTextureCurrent(DrawContext dc)
dc
- the current draw contextjava.lang.IllegalArgumentException
- if the draw context is null.boolean isTextureInitializationFailed()