media~TextureManager(applicationContext)

Manages textures.

new TextureManager(applicationContext)

Parameters:
Name Type Description
applicationContext ApplicationContext The application context.

Members

textureTypes

"c" or 0 for primary diffuse texture (RGB) "u" or 1 for generic secondary texture "d" for decals (RGBA), blended into the diffuse texture if running in fixed-function mode. To disable this combining, specify secondary textures as generic with 1 or "u" "n" for normal maps (XYZ) "g" for glow maps (RGB), blended into the diffuse texture if running in fixed-function mode. To disable this combining, specify secondary textures as generic with 1 or "u" "s" for specularity maps (grey-scale), put in alpha channel of diffuse ("c") "z" for depth maps (Z), put in alpha channel of normal ("n") maps "e" for environment maps (skybox), uses the same syntax as "loadsky", and set a custom environment map (overriding the "envmap" entities) to use in environment-mapped shaders ("bumpenv*world")

Methods

afterPropertiesSet()

Initialization after the components in the application context have been constructed.

findTextureFilesByTypes(versionNode, versionPath)

Finds the texture files by type (diffuse, normals, specularity). The filename must be {textureType}.{fileExtension}. For example: diffuse.jpg
Parameters:
Name Type Description
versionNode Tree.Node The tree node of a texture representing a texture with multiple texture files.
versionPath string The path to the directory which contains the texture files.

setDependencies()

Sets the dependencies from the application context.

updateTextures()

Reads in the textures from filesystem into the Inexor Tree. Tree path: /[repository_name]/[media_type]/[author_name/author_group_name]/[media_name]/v[version]/