|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.graphics.textures.TextureFactory
public class TextureFactory
Reads texture files and creates OpenGL texture objects that can be
used for real-time halftoning.
The texture files to be read must be named in a configuration file,
textures.conf. A menu name should also be specified for each texture.
The filenames should be listed one per line in the config file,
followed by the equals sign and then the menu name. Here is an
example:
hbars.png=Horizontal Bars
vbars.png=Vertical Bars
hash.png=Hash
noise.png=Noise
Field Summary | |
---|---|
static String |
BEND_CONFIG
Stores the name of the halftoning configuration file, which is currently set to 'halftoning_textures.conf'. |
static String |
BEND_DIRECTORY
Stores the relative pathname of the halftoning textures directory. |
static String |
HALFTONING_CONFIG
Stores the name of the halftoning configuration file, which is currently set to 'halftoning_textures.conf'. |
static String |
HALFTONING_DIRECTORY
Stores the relative pathname of the halftoning textures directory. |
static String |
PATTERNS_CONFIG
Stores the name of the patterns configuration file, which is currently set to 'patterns_textures.conf'. |
static String |
PATTERNS_DIRECTORY
Stores the relative pathname of the patterns textures directory. |
Constructor Summary | |
---|---|
TextureFactory()
Constructs a TextureFactory. |
Method Summary | |
---|---|
Vector<Texture> |
createBendTextures(GL gl)
Creates Texture objects based on files named in BEND_CONFIG. |
Vector<Texture> |
createHalftoningTextures(GL gl)
Creates Texture objects based on files named in HALFTONING_CONFIG. |
Vector<Texture> |
createPatternsTextures(GL gl)
Creates Texture objects based on files named in PATTERNS_CONFIG. |
Vector<Texture> |
createTextures(GL gl,
String directory,
String configName)
Creates Texture objects based on files named in the CONFIG_FILE. |
List<TextureException> |
getErrors()
Returns a list with any exceptions that occurred the last time that createTextures() was called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PATTERNS_DIRECTORY
public static final String PATTERNS_CONFIG
public static final String HALFTONING_DIRECTORY
public static final String HALFTONING_CONFIG
public static final String BEND_DIRECTORY
public static final String BEND_CONFIG
Constructor Detail |
---|
public TextureFactory()
Method Detail |
---|
public Vector<Texture> createPatternsTextures(GL gl)
gl
- the current GL object.public Vector<Texture> createHalftoningTextures(GL gl)
gl
- the current GL object.public Vector<Texture> createBendTextures(GL gl)
gl
- the current GL object.public Vector<Texture> createTextures(GL gl, String directory, String configName)
configName
- the complete name of the config file to read.directory
- the directory for the config and textures files.gl
- the current GL object.public List<TextureException> getErrors()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |