public class Texture
extends java.lang.Object
Simple Texture containing the texture ID generated by OGL
and various attributes. Can be called upon to bind and paint itself.
This is a modified version of the Texture class from: org.lwjgl.examples.spaceinvaders.Texture
| Constructor and Description |
|---|
Texture(int textureID,
int width,
int height)
Creates a new Texture
|
Texture(int textureID,
int width,
int height,
float widthRatio,
float heightRatio,
int textureWidth,
int textureHeight)
Creates a new Texture
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight() |
int |
getTextureID() |
int |
getWidth() |
java.lang.String |
toString()
Returns a string representation of the image
|
public Texture(int textureID,
int width,
int height)
textureID - Texture IDwidth - Width of imageheight - Height of imagepublic Texture(int textureID,
int width,
int height,
float widthRatio,
float heightRatio,
int textureWidth,
int textureHeight)
textureID - Texture IDwidth - Width of imageheight - Height of imagewidthRatio - Ratio of texture widthheightRatio - Ratio of texture heighttextureWidth - Actual width of texturetextureHeight - Actual height of texturepublic int getTextureID()
public int getHeight()
public int getWidth()
public java.lang.String toString()
toString in class java.lang.Object