edu.ohiou.cs456_badabing.sceneapi.basic
Class TextureManager

java.lang.Object
  extended by edu.ohiou.cs456_badabing.sceneapi.basic.TextureManager

public class TextureManager
extends java.lang.Object

Container of a hasmap of texture names associated with JOGL's Texture objects.

Description: Container of a hasmap of texture names associated with JOGL's Texture objects.

Copyright: Lev A Neiman 2008

Company: Ohio University EECS


Field Summary
static java.util.Hashtable<java.lang.String,com.sun.opengl.util.texture.Texture> textures
          Hashtable between texture name and Texture object.
 
Constructor Summary
TextureManager()
           
 
Method Summary
static void clear()
          clears the hash map and texture objects, freeing up the memory.
static com.sun.opengl.util.texture.Texture getTexture(java.lang.String name)
          returns the texture object correspodning to name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textures

public static java.util.Hashtable<java.lang.String,com.sun.opengl.util.texture.Texture> textures
Hashtable between texture name and Texture object.

Constructor Detail

TextureManager

public TextureManager()
Method Detail

clear

public static void clear()
clears the hash map and texture objects, freeing up the memory.


getTexture

public static com.sun.opengl.util.texture.Texture getTexture(java.lang.String name)
returns the texture object correspodning to name. If it doesnt exist, then it will try to load it from file.

Parameters:
name - String
Returns:
Texture