public class TLsp2DImageTextureObject extends ALsp2DTextureObject
Constructor and Description |
---|
TLsp2DImageTextureObject(BufferedImage aImage)
Constructs a texture object for the given image with filtering enabled.
|
TLsp2DImageTextureObject(BufferedImage aImage,
boolean aFiltering)
Constructs a texture object for the given image, with the option to enable or disable
texture filtering.
|
TLsp2DImageTextureObject(BufferedImage aImage,
boolean aFiltering,
boolean aRepeat)
Constructs a texture object for the given image, with the options to enable or disable
texture filtering and texture repeating.
|
TLsp2DImageTextureObject(String aSourceString,
BufferedImage aImage,
boolean aFiltering,
boolean aRepeat)
Constructs a texture object for the given image, with the options to enable or disable
texture filtering and texture repeating.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(ILcdGLDrawable aGLDrawable)
Binds the texture object to its appropriate target.
|
void |
destroy(ILcdGLDrawable aGLDrawable)
Deletes the texture object owned by this
ALspTextureObject . |
long |
getBytes()
Returns the number of estimated bytes this texture object
occupies.
|
protected void |
init(ILcdGLDrawable aGLDrawable)
Creates a new OpenGL texture object.
|
void |
setImage(BufferedImage aImage)
Sets the given image.
|
getHeight, getTarget, getWidth
getTextureObject, isDestroyed, unbind
getSourceString, isBound, toString
public TLsp2DImageTextureObject(BufferedImage aImage)
aImage
- the image to create a texture forIllegalArgumentException
- when aImage==null
public TLsp2DImageTextureObject(BufferedImage aImage, boolean aFiltering)
aImage
- the image to create a texture foraFiltering
- indicates whether or not texture interpolation is desiredIllegalArgumentException
- when aImage==null
public TLsp2DImageTextureObject(BufferedImage aImage, boolean aFiltering, boolean aRepeat)
aImage
- the image to create a texture foraFiltering
- whether or not filtering should be enabledaRepeat
- whether or not the texture should be repeatingIllegalArgumentException
- when aImage==null
public TLsp2DImageTextureObject(String aSourceString, BufferedImage aImage, boolean aFiltering, boolean aRepeat)
aSourceString
- the name of the textureaImage
- the image to create a texture foraFiltering
- whether or not filtering should be enabledaRepeat
- whether or not the texture should be repeatingIllegalArgumentException
- when aImage==null
public void setImage(BufferedImage aImage)
aImage
- the new image to set as the textureprotected void init(ILcdGLDrawable aGLDrawable)
ALspTextureObject
glTexImage2D()
).init
in class ALspTextureObject
aGLDrawable
- the drawablepublic void bind(ILcdGLDrawable aGLDrawable)
ALspTextureObject
ALspTextureObject.init(ILcdGLDrawable)
the first time it is
called.bind
in class ALspTextureObject
aGLDrawable
- the drawableALspTextureObject.getTarget()
public void destroy(ILcdGLDrawable aGLDrawable)
ALspTextureObject
ALspTextureObject
.destroy
in class ALspTextureObject
aGLDrawable
- the drawablepublic long getBytes()
ALspTextureObject
getBytes
in class ALspTextureObject