deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.rendering.r3d.opengl.rendering.model.texture
Class TexturePool

java.lang.Object
  extended by org.deegree.rendering.r3d.opengl.rendering.model.texture.TexturePool

public class TexturePool
extends Object

The TexturePool holds static references to texture files, used in the scene.

Version:
$Revision: 15512 $, $Date: 2009-01-06 12:12:13 +0100 (Di, 06 Jan 2009) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Constructor Summary
TexturePool()
           
 
Method Summary
static String addTexture(File f)
           
static void addTexture(String key, File textureFile)
          Add the given file with the given key to the map.
static void addTexturesFromDirectory(File textureDir)
          Add all files from the given directory to the pool, use the file name as the key.
static void dispose(String texture)
           
static com.sun.opengl.util.texture.Texture getTexture(RenderContext glRenderContext, String texture)
           
static int getWidth(String texture)
           
static void loadTexture(RenderContext glRenderContext, String texture)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TexturePool

public TexturePool()
Method Detail

addTexturesFromDirectory

public static void addTexturesFromDirectory(File textureDir)
Add all files from the given directory to the pool, use the file name as the key.

Parameters:
textureDir - to scan for files.

addTexture

public static String addTexture(File f)
Parameters:
f - file to be added to the pool
Returns:
the key for the file.

addTexture

public static void addTexture(String key,
                              File textureFile)
Add the given file with the given key to the map.

Parameters:
key - to be used.
textureFile - to be added.

getTexture

public static com.sun.opengl.util.texture.Texture getTexture(RenderContext glRenderContext,
                                                             String texture)
Parameters:
glRenderContext -
texture -
Returns:
the texture mapped to the given string or null if no texture with that id was found.

loadTexture

public static void loadTexture(RenderContext glRenderContext,
                               String texture)
Parameters:
glRenderContext -
texture -

dispose

public static void dispose(String texture)
Parameters:
texture -

getWidth

public static int getWidth(String texture)
Parameters:
texture -
Returns:
the width of the referenced texture of 0 if the texture was not found.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>