public class Texture
extends java.lang.Object
Constructor and Description |
---|
Texture(int target,
int textureID)
Create a new texture
|
Modifier and Type | Method and Description |
---|---|
void |
bind(javax.media.opengl.GL2 gl)
Bind the specified GL context to a texture
|
void |
delete(javax.media.opengl.GL2 gl)
Delete the current texture in a context
|
float |
getHeight()
Get the height of the physical texture
|
int |
getImageHeight()
Get the height of the original image
|
int |
getImageWidth()
Get the width of the original image
|
int |
getTextureId()
Get the GL texture ID
|
float |
getWidth()
Get the width of the physical texture
|
void |
setHeight(int height)
Set the height of the image
|
void |
setTextureHeight(int texHeight)
Set the height of this texture
|
void |
setTextureWidth(int texWidth)
Set the width of this texture
|
void |
setWidth(int width)
Set the width of the image
|
public Texture(int target, int textureID)
target
- The GL targettextureID
- The GL texture IDpublic int getTextureId()
public void bind(javax.media.opengl.GL2 gl)
gl
- The GL context to bind topublic void delete(javax.media.opengl.GL2 gl)
public void setHeight(int height)
height
- The height of the imagepublic void setWidth(int width)
width
- The width of the imagepublic int getImageHeight()
public int getImageWidth()
public float getHeight()
public float getWidth()
public void setTextureHeight(int texHeight)
texHeight
- The height of the texturepublic void setTextureWidth(int texWidth)
texWidth
- The width of the texture