|
static | addTexture (Texture texture) |
| Adds the indicated already-loaded texture to the pool. More...
|
|
static | clearFakeTextureImage () |
| Restores normal behavior of loading the textures actually requested. More...
|
|
static TextureCollection | findAllTextures (str name) |
| Returns the set of all textures found in the pool that match the indicated name (which may contain wildcards). More...
|
|
static Texture | findTexture (str name) |
| Returns the first texture found in the pool that matches the indicated name (which may contain wildcards). More...
|
|
static int | garbageCollect () |
| Releases only those textures in the pool that have a reference count of exactly 1; i.e. More...
|
|
static Texture | getAlphaScaleMap () |
| Returns a standard Texture object that has been created with Texture::generate_alpha_scale_map(). More...
|
|
static const Filename | getFakeTextureImage () |
| Returns the filename that was specified with a previous call to set_fake_texture_image(). More...
|
|
static Texture | getNormalizationCubeMap (int size) |
| Returns a standard Texture object that has been created with Texture::generate_normalization_cube_map(). More...
|
|
static Texture | getTexture (const Filename filename, const Filename alpha_filename, int primary_file_num_channels, int alpha_file_channel, bool read_mipmaps) |
| Returns the texture that has already been previously loaded, or NULL otherwise. More...
|
|
static Texture | getTexture (const Filename filename, int primary_file_num_channels, bool read_mipmaps) |
| Returns the texture that has already been previously loaded, or NULL otherwise. More...
|
|
static bool | hasFakeTextureImage () |
| Returns true if fake_texture_image mode has been enabled, false if we are in the normal mode. More...
|
|
static bool | hasTexture (const Filename filename) |
| Returns true if the texture has ever been loaded, false otherwise. More...
|
|
static | listContents () |
| Lists the contents of the texture pool to cout. More...
|
|
static | listContents (Ostream out) |
| Lists the contents of the texture pool to the indicated output stream. More...
|
|
static Texture | load2dTextureArray (const Filename filename_pattern, bool read_mipmaps, const LoaderOptions options) |
| Loads a 2-D texture array that is specified with a series of n pages, all numbered in sequence, and beginning with index 0. More...
|
|
static Texture | load3dTexture (const Filename filename_pattern, bool read_mipmaps, const LoaderOptions options) |
| Loads a 3-D texture that is specified with a series of n pages, all numbered in sequence, and beginning with index 0. More...
|
|
static Texture | loadCubeMap (const Filename filename_pattern, bool read_mipmaps, const LoaderOptions options) |
| Loads a cube map texture that is specified with a series of 6 pages, numbered 0 through 5. More...
|
|
static Texture | loadTexture (const Filename filename, const Filename alpha_filename, int primary_file_num_channels, int alpha_file_channel, bool read_mipmaps, const LoaderOptions options) |
| Loads the given filename up into a texture, if it has not already been loaded, and returns the new texture. More...
|
|
static Texture | loadTexture (const Filename filename, int primary_file_num_channels, bool read_mipmaps, const LoaderOptions options) |
| Loads the given filename up into a texture, if it has not already been loaded, and returns the new texture. More...
|
|
static Texture | makeTexture (str extension) |
| Creates a new Texture object of the appropriate type for the indicated filename extension, according to the types that have been registered via register_texture_type(). More...
|
|
static | rehash () |
| Should be called when the model-path changes, to blow away the cache of texture pathnames found along the model-path. More...
|
|
static | releaseAllTextures () |
| Releases all textures in the pool and restores the pool to the empty state. More...
|
|
static | releaseTexture (Texture texture) |
| Removes the indicated texture from the pool, indicating it will never be loaded again; the texture may then be freed. More...
|
|
static | setFakeTextureImage (const Filename filename) |
| Sets a bogus filename that will be loaded in lieu of any textures requested from this point on. More...
|
|
static bool | verifyTexture (const Filename filename) |
| Loads the given filename up into a texture, if it has not already been loaded, and returns true to indicate success, or false to indicate failure. More...
|
|
static | write (Ostream out) |
| Lists the contents of the texture pool to the indicated output stream. More...
|
|
This is the preferred interface for loading textures from image files.
It unifies all references to the same filename, so that multiple models that reference the same textures don't waste texture memory unnecessarily.
static Texture loadTexture |
( |
const Filename |
filename, |
|
|
const Filename |
alpha_filename, |
|
|
int |
primary_file_num_channels, |
|
|
int |
alpha_file_channel, |
|
|
bool |
read_mipmaps, |
|
|
const LoaderOptions |
options |
|
) |
| |
|
static |
Loads the given filename up into a texture, if it has not already been loaded, and returns the new texture.
If a texture with the same filename was previously loaded, returns that one instead. If the texture file cannot be found, returns NULL.
If read_mipmaps is true, both filenames should contain a hash mark ('#'), which will be filled in with the mipmap level number; and the texture will be defined with a series of images, two for each mipmap level.
Loads the given filename up into a texture, if it has not already been loaded, and returns the new texture.
If a texture with the same filename was previously loaded, returns that one instead. If the texture file cannot be found, returns NULL.
If read_mipmaps is true, the filename should contain a hash mark ('#'), which will be filled in with the mipmap level number; and the texture will be defined with a series of images, one for each mipmap level.