IS3D::TexMgr Class Reference

#include <TexMgr.H>

List of all members.

Static Public Member Functions

static Array< std::string > loadFromConfig (const std::string &configName)
static TextureRef get (const std::string &keyName)
static Array< TextureRef > get (const Array< std::string > &keyNames)
static Array< TextureRef > getAll ()
static Array< std::string > getAllKeys ()
static void set (const std::string &keyName, TextureRef tex)
static void remove (const std::string &keyName)
static std::string lookupKeyName (TextureRef tex)

Static Protected Member Functions

static void initErrorTexture ()

Static Protected Attributes

static Table< std::string,
TextureRef > 
_texMap
static TextureRef _errorTexture


Detailed Description

A database of textures accessable by name. Any texture files specified in the ConfigVal LoadTextures will be automatically loaded. Textures in LoadTextures are separated by a semicolon. The format for specifying a texture is:

    <filename>[,alpha-channel-filename] <TexMgr keyname> [texture format] [wrap mode] [interpolate mode];
    

Arguments in <> are required, args in [] are optional. For example, in a config file you could have:

    LoadTextures   file1.jpg                  background-image RGB8 TRANSPARENT_BORDER ; \
                   file2.jpg                  foreground-image ; \
		   file3.jpg,file3-alpha.jpg  myTextureWithAnAlpha ;
   

Possible values for texture format, wrap mode, and interpolate mode are the same as G3D's enumerated constants.


Member Function Documentation

static Array<std::string> IS3D::TexMgr::loadFromConfig ( const std::string &  configName  )  [static]

Loads all ; separated texture entries from a ConfigVal, then returns an an array of TexMgr keyNames for all successfully loaded textures.

static TextureRef IS3D::TexMgr::get ( const std::string &  keyName  )  [static]

static Array<TextureRef> IS3D::TexMgr::get ( const Array< std::string > &  keyNames  )  [static]

static Array<TextureRef> IS3D::TexMgr::getAll (  )  [static]

static Array<std::string> IS3D::TexMgr::getAllKeys (  )  [static]

static void IS3D::TexMgr::set ( const std::string &  keyName,
TextureRef  tex 
) [static]

static void IS3D::TexMgr::remove ( const std::string &  keyName  )  [static]

static std::string IS3D::TexMgr::lookupKeyName ( TextureRef  tex  )  [static]

static void IS3D::TexMgr::initErrorTexture (  )  [static, protected]


Member Data Documentation

Table<std::string, TextureRef> IS3D::TexMgr::_texMap [static, protected]

TextureRef IS3D::TexMgr::_errorTexture [static, protected]


The documentation for this class was generated from the following file:

Generated on Wed Jan 26 06:31:21 2011 for IS3D by  doxygen 1.5.6