public class GLTextureLoader extends java.lang.Object implements GLGarbageSource
Constructor and Description |
---|
GLTextureLoader()
Create a new texture loader based on the game panel
|
Modifier and Type | Method and Description |
---|---|
void |
clearAllTextures() |
void |
clearAllTextures(javax.media.opengl.GL gl) |
boolean |
clearTexture(javax.media.opengl.GL gl,
java.lang.String id) |
boolean |
clearTexture(java.lang.String id) |
GLTexture |
createTexture(javax.media.opengl.GL gl,
int target,
TextureContent content) |
void |
dispose(javax.media.opengl.GL gl) |
void |
garbage(javax.media.opengl.GL gl) |
GLTexture |
getAcquiredTexture(javax.media.opengl.GL gl,
TextureContent content)
Load a texture with one held reference to prevent garbage collection
|
GLTexture |
getTextureByNameAcquired(java.lang.String name) |
boolean |
isTextureValid(java.lang.String id) |
public GLTextureLoader()
public GLTexture getAcquiredTexture(javax.media.opengl.GL gl, TextureContent content)
gl
- content
- java.io.IOException
- Indicates a failure to access the resourcepublic GLTexture createTexture(javax.media.opengl.GL gl, int target, TextureContent content)
public boolean clearTexture(javax.media.opengl.GL gl, java.lang.String id)
public boolean clearTexture(java.lang.String id)
public void clearAllTextures()
public void clearAllTextures(javax.media.opengl.GL gl)
public GLTexture getTextureByNameAcquired(java.lang.String name)
public boolean isTextureValid(java.lang.String id)
public void dispose(javax.media.opengl.GL gl)
dispose
in interface GLGarbageSource
public void garbage(javax.media.opengl.GL gl)
garbage
in interface GLGarbageSource