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.
|
com.jogamp.opengl.util.texture.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)
If the implementing instance's internal texture has not been created from its image source, the implementing class determines when the texture is retrieved and available.
If a texture cannot be created from its image source it cannot be bound. This method returns an indication of whether the texture was bound or was not bound due to a failure during creation.
dc
- the current draw context.int getHeight(DrawContext dc)
dc
- the current draw contextjava.lang.Object getImageSource()
com.jogamp.opengl.util.texture.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()