|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgizmoball.graphics.TextureHandler
public class TextureHandler
A class to handle using OpenGL textures. It can use textures from files, or create textures from colors. The textures are applied to the current OpenGL context. It caches textures, so changing files around while the program is running will not update the textures. Using more than one TextureHandler at once can lead to bad results. It does not have any observable state.
Constructor Summary | |
---|---|
TextureHandler(java.lang.String textureDirectory)
Creates a new TextureHandler, that looks in the specified directory for textures. |
Method Summary | |
---|---|
void |
useColor(java.awt.Color c)
Applies a texture, based on the given color. |
void |
useTexture(java.lang.String name)
Applies a texture, that is based on the file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextureHandler(java.lang.String textureDirectory)
Method Detail |
---|
public void useTexture(java.lang.String name)
public void useColor(java.awt.Color c)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |