Class Texture
java.lang.Object
javaforce.gl.Texture
Stores a 2D Texture (image).
Textures are usually loaded after a new model is loaded.
All model's share the same set of textures.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind()intgetImage()intgetWidth()booleanload()booleanloadJPG(InputStream is) booleanbooleanloadPNG(InputStream is) booleanvoidset(int[] pixels, int x, int y) voidvoidunload()
-
Field Details
-
image
-
refcnt
public int refcnt -
tid
public int tid -
loaded
public boolean loaded -
idx
public int idx -
name
-
-
Constructor Details
-
Texture
public Texture(int idx) -
Texture
public Texture(int idx, int width, int height)
-
-
Method Details
-
getImage
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
set
public void set(int[] pixels, int x, int y) -
setImage
-
loadPNG
-
loadPNG
-
loadJPG
-
loadJPG
-
load
public boolean load() -
unload
public void unload() -
bind
public void bind()
-