60 return get_global_ptr()->ns_load_texture(filename, primary_file_num_channels,
61 read_mipmaps, options);
81 int primary_file_num_channels,
int alpha_file_channel,
84 primary_file_num_channels,
86 read_mipmaps, options);
106 return get_global_ptr()->ns_load_3d_texture(filename_pattern, read_mipmaps,
127 return get_global_ptr()->ns_load_2d_texture_array(filename_pattern, read_mipmaps,
148 return get_global_ptr()->ns_load_cube_map(filename_pattern, read_mipmaps,
351 make_texture(
const string &extension) {
static void list_contents()
Lists the contents of the texture pool to cout.
static void clear_fake_texture_image()
Restores normal behavior of loading the textures actually requested.
static Texture * load_cube_map(const Filename &filename_pattern, bool read_mipmaps=false, const LoaderOptions &options=LoaderOptions())
Loads a cube map texture that is specified with a series of 6 pages, numbered 0 through 5...
static int garbage_collect()
Releases only those textures in the pool that have a reference count of exactly 1; i...
Specifies parameters that may be passed to the loader.
static Texture * find_texture(const string &name)
Returns the first texture found in the pool that matches the indicated name (which may contain wildca...
static void release_texture(Texture *texture)
Removes the indicated texture from the pool, indicating it will never be loaded again; the texture ma...
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
static void rehash()
Should be called when the model-path changes, to blow away the cache of texture pathnames found along...
static bool has_fake_texture_image()
Returns true if fake_texture_image mode has been enabled, false if we are in the normal mode...
static bool verify_texture(const Filename &filename)
Loads the given filename up into a texture, if it has not already been loaded, and returns true to in...
static TextureCollection find_all_textures(const string &name="*")
Returns the set of all textures found in the pool that match the indicated name (which may contain wi...
static Texture * get_alpha_scale_map()
Returns a standard Texture object that has been created with Texture::generate_alpha_scale_map().
The name of a file, such as a texture file or an Egg file.
static const Filename & get_fake_texture_image()
Returns the filename that was specified with a previous call to set_fake_texture_image().
static void set_fake_texture_image(const Filename &filename)
Sets a bogus filename that will be loaded in lieu of any textures requested from this point on...
static Texture * get_normalization_cube_map(int size)
Returns a standard Texture object that has been created with Texture::generate_normalization_cube_map...
static bool has_texture(const Filename &filename)
Returns true if the texture has ever been loaded, false otherwise.
Manages a list of Texture objects, as returned by TexturePool::find_all_textures().
static Texture * load_texture(const Filename &filename, int primary_file_num_channels=0, bool read_mipmaps=false, const LoaderOptions &options=LoaderOptions())
Loads the given filename up into a texture, if it has not already been loaded, and returns the new te...
static TexturePool * get_global_ptr()
Initializes and/or returns the global pointer to the one TexturePool object in the system...
static void add_texture(Texture *texture)
Adds the indicated already-loaded texture to the pool.
static void release_all_textures()
Releases all textures in the pool and restores the pool to the empty state.
static Texture * load_3d_texture(const Filename &filename_pattern, bool read_mipmaps=false, const LoaderOptions &options=LoaderOptions())
Loads a 3-D texture that is specified with a series of n pages, all numbered in sequence, and beginning with index 0.
static Texture * load_2d_texture_array(const Filename &filename_pattern, bool read_mipmaps=false, const LoaderOptions &options=LoaderOptions())
Loads a 2-D texture array that is specified with a series of n pages, all numbered in sequence...